forked from intel/player-ffmpeg-yami
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvideo_gl_render.h
51 lines (45 loc) · 2.08 KB
/
video_gl_render.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* video_render_gl.h - simple texture rendering for video frame with gles v2
*
* Copyright (C) 2013-2014 Intel Corporation
* Author: Zhao, Halley<[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
#ifndef __VIDEO_GL_RENDER_H__
#define __VIDEO_GL_RENDER_H__
#include <stdint.h>
#include <stdio.h>
#include <assert.h>
// type 0: raw yuv data, 1: drm name (flink), 2: dma_buf handle
int drawVideo(uintptr_t handle, int type, uint32_t width, uint32_t height, uint32_t pitch);
// int init_egl(uint32_t width, uint32_t height, int is_dmabuf);
int deinit_egl();
#ifdef PLAYER_DEBUG
#define DEBUG(format, ...) printf(" %s, %d, " format, __FILE__, __LINE__, ##__VA_ARGS__)
#else
#define DEBUG(...)
#endif
#define PRINTF printf
#define ERROR(format, ...) fprintf(stderr, "!!ERROR %s, %d, " format, __FILE__, __LINE__, ##__VA_ARGS__)
#ifndef ASSERT
#define ASSERT(expr) do { \
if (!(expr)) \
ERROR(); \
assert(expr); \
} while(0)
#endif
#endif // __VIDEO_GL_RENDER_H__