#include <IAgoraMediaEngine.h>
|
enum | PLANE_TYPE { Y_PLANE = 0
, U_PLANE = 1
, V_PLANE = 2
, NUM_OF_PLANES = 3
} |
|
enum | VIDEO_TYPE {
VIDEO_TYPE_UNKNOWN = 0
, VIDEO_TYPE_I420 = 1
, VIDEO_TYPE_IYUV = 2
, VIDEO_TYPE_RGB24 = 3
,
VIDEO_TYPE_ABGR = 4
, VIDEO_TYPE_ARGB = 5
, VIDEO_TYPE_ARGB4444 = 6
, VIDEO_TYPE_RGB565 = 7
,
VIDEO_TYPE_ARGB1555 = 8
, VIDEO_TYPE_YUY2 = 9
, VIDEO_TYPE_YV12 = 10
, VIDEO_TYPE_UYVY = 11
,
VIDEO_TYPE_MJPG = 12
, VIDEO_TYPE_NV21 = 13
, VIDEO_TYPE_NV12 = 14
, VIDEO_TYPE_BGRA = 15
,
VIDEO_TYPE_RGBA = 16
, VIDEO_TYPE_I422 = 17
} |
|
◆ PLANE_TYPE
Plane 类型
枚举值 |
---|
Y_PLANE | |
U_PLANE | |
V_PLANE | |
NUM_OF_PLANES | |
◆ VIDEO_TYPE
视频帧类型
枚举值 |
---|
VIDEO_TYPE_UNKNOWN | 0: 未知类型
|
VIDEO_TYPE_I420 | 1: I420
|
VIDEO_TYPE_IYUV | 2: IYUV
|
VIDEO_TYPE_RGB24 | 3: RGB24
|
VIDEO_TYPE_ABGR | 4: ABGR
|
VIDEO_TYPE_ARGB | 5: ARGB
|
VIDEO_TYPE_ARGB4444 | 6: ARGB4444
|
VIDEO_TYPE_RGB565 | 7: RGB565
|
VIDEO_TYPE_ARGB1555 | 8: ARGB1555
|
VIDEO_TYPE_YUY2 | 9: YUY2
|
VIDEO_TYPE_YV12 | 10: YV12
|
VIDEO_TYPE_UYVY | 11: UYVY
|
VIDEO_TYPE_MJPG | 12: MJPG
|
VIDEO_TYPE_NV21 | 13: NV21
|
VIDEO_TYPE_NV12 | 14: NV12
|
VIDEO_TYPE_BGRA | 15: BGRA
|
VIDEO_TYPE_RGBA | 16: RGBA
|
VIDEO_TYPE_I422 | 17: I422
|
◆ release()
virtual void agora::media::IVideoFrame::release |
( |
| ) |
|
|
pure virtual |
◆ buffer()
virtual const unsigned char * agora::media::IVideoFrame::buffer |
( |
PLANE_TYPE |
type | ) |
const |
|
pure virtual |
◆ copyFrame()
virtual int agora::media::IVideoFrame::copyFrame |
( |
IVideoFrame ** |
dest_frame | ) |
const |
|
pure virtual |
拷贝帧
如果要求的尺寸大于分配的尺寸,会重新分配足够尺寸的缓存
- 参数
-
- 返回
-
◆ convertFrame()
virtual int agora::media::IVideoFrame::convertFrame |
( |
VIDEO_TYPE |
dst_video_type, |
|
|
int |
dst_sample_size, |
|
|
unsigned char * |
dst_frame |
|
) |
| const |
|
pure virtual |
转换帧
- 注解
- 假设源帧和目标帧的高度一致
- 参数
-
dst_video_type | 输出视频类型 |
dst_sample_size | 仅用于解析 MJPG |
dst_frame | 指向目标帧的指针,详见: IVideoFrame |
- 返回
-
◆ allocated_size()
virtual int agora::media::IVideoFrame::allocated_size |
( |
PLANE_TYPE |
type | ) |
const |
|
pure virtual |
◆ stride()
virtual int agora::media::IVideoFrame::stride |
( |
PLANE_TYPE |
type | ) |
const |
|
pure virtual |
◆ width()
virtual int agora::media::IVideoFrame::width |
( |
| ) |
const |
|
pure virtual |
◆ height()
virtual int agora::media::IVideoFrame::height |
( |
| ) |
const |
|
pure virtual |
◆ timestamp()
virtual unsigned int agora::media::IVideoFrame::timestamp |
( |
| ) |
const |
|
pure virtual |
◆ render_time_ms()
virtual int64_t agora::media::IVideoFrame::render_time_ms |
( |
| ) |
const |
|
pure virtual |
◆ IsZeroSize()
virtual bool agora::media::IVideoFrame::IsZeroSize |
( |
| ) |
const |
|
pure virtual |
用于确认平面大小是否为 0
- 返回
- true: 平面大小为 0
- false: 平面大小不为 0
◆ GetVideoType()
virtual VIDEO_TYPE agora::media::IVideoFrame::GetVideoType |
( |
| ) |
const |
|
pure virtual |