API-播放库

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

播放库开发说明1.0.0.1

版权声明:任何组织和个人,在未经本公司允许时,不得随意传播,版权所有,翻版必究。

目录

修改历史 (2)

目录 (3)

结构体 (4)

OSD (4)

完整帧结构体,与网络库相同 (4)

回调函数 (5)

typedef BOOL(CALLBACK*WaveDataCallback)(const char*pData,unsigned int nDataLen,void *pContext); (5)

接口 (5)

STREAM_PLAY_API BOOL_stdcall x_player_initPlayLib(void); (5)

STREAM_PLAY_API BOOL_stdcall x_player_uninitPlayLib(void); (5)

STREAM_PLAY_API unsigned long_stdcall x_player_createPlayInstance(int nStreamType=0);

//0:H2641:JPEG (6)

STREAM_PLAY_API BOOL_stdcall x_player_destroyPlayInstance(unsigned long player_id); (6)

STREAM_PLAY_API BOOL_stdcall x_player_startPlay(unsigned long player_id); (6)

STREAM_PLAY_API BOOL_stdcall x_player_stopPlay(unsigned long player_id); (6)

STREAM_PLAY_API BOOL_stdcall x_player_inputNetFrame(unsigned long player_id,char*buf, int size); (6)

STREAM_PLAY_API BOOL_stdcall x_player_setPlayWnd(unsigned long player_id,HWND hwnd);

(7)

STREAM_PLAY_API HWND_stdcall x_player_getPlayWnd(unsigned long player_id); (7)

STREAM_PLAY_API BOOL_stdcall x_player_openSound(unsigned long player_id); (7)

STREAM_PLAY_API BOOL_stdcall x_player_closeSound(unsigned long player_id); (7)

STREAM_PLAY_API BOOL_stdcall x_player_capturePicture(unsigned long player_id,char

*file_name); (7)

STREAM_PLAY_API BOOL_stdcall x_player_setOsdString(unsigned long player_id,int index, osd_info_t*p_osd_info);//index0~15 (8)

STREAM_PLAY_API BOOL_stdcall x_player_removeOsdstring(unsigned long player_id,int index);

(8)

STREAM_PLAY_API BOOL_stdcall x_player_setRenderEffect(unsigned long player_id,int type);8 STREAM_PLAY_API BOOL_stdcall x_player_startlocalrecord(unsigned long player_id,char

*recordfile_name); (8)

STREAM_PLAY_API BOOL_stdcall x_player_stoplocalrecord(unsigned long player_id); (9)

STREAM_PLAY_API BOOL_stdcall x_player_getrecordstatus(unsigned long player_id); (9)

STREAM_PLAY_API unsigned long_stdcall x_player_createDualtalkInstance(); (9)

STREAM_PLAY_API BOOL_stdcall x_player_destroyDualtalkInstance(unsigned long talk_id); (9)

STREAM_PLAY_API BOOL_stdcall x_player_StartDualTalk(unsigned long

talk_id,WaveDataCallback callback,void*dwUser); (9)

STREAM_PLAY_API BOOL_stdcall x_player_StopDualTalk(unsigned long talk_id); (9)

结构体

OSD

#define MAX_SET_OSD_NUM16//最多可设置OSD的数目

typedef struct__osd_info_t

{

char font[24];

int font_width;

int font_height;

unsigned char osd_color_red;//0-255

unsigned char osd_color_green;//0-255

unsigned char osd_color_blue;//0-255

RECT osd_rect;

char osd_string[128];

int isTime;//为1表示osd_string后面还要显示时间

}osd_info_t;

完整帧结构体,与网络库相同

/*完整帧结构体*/

#define MAX_FRAME_BUF_SIZE(128*1024)//帧缓冲区大小

typedef struct_stFrameHead

{

unsigned char type;

//0->264的vdieo的I帧

//1->264的P帧

//2->无

//3->jpeg

//4->record video

//5->record audio

//6->audio

//8->talk audio,是指客户端沿着此通道发送过来的音频数据

//0x20->表示移动报警,

//0x21->表示GPIO报警

//0x22->表示移动报警撤防

//0x23->表示GPIO报警撤防

//200表示用户名/密码错

//201表示最大用户数

//202表示请求流类型错误

unsigned char size;

//0->320x180

//1->320x240

//2->640x480

//3->640x360

相关文档
最新文档