qt_rtmp_demo/media/librtmp_send264.h

42 lines
920 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/**
* Simplest Librtmp Send 264
*
* 雷霄骅,张晖
* leixiaohua1020@126.com
* zhanghuicuc@gmail.com
* 中国传媒大学/数字电视技术
* Communication University of China / Digital TV Technology
* http://blog.csdn.net/leixiaohua1020
*
* 本程序用于将内存中的H.264数据推送至RTMP流媒体服务器。
*
*/
/**
* 初始化并连接到服务器
*
* @param url 服务器上对应webapp的地址
*
* @成功则返回1 , 失败则返回0
*/
int RTMP264_Connect(const char* url);
/**
* 将内存中的一段H.264编码的视频数据利用RTMP协议发送到服务器
*
* @param read_buffer 回调函数,当数据不足的时候,系统会自动调用该函数获取输入数据。
* 2个参数功能
* uint8_t *buf外部数据送至该地址
* int buf_size外部数据大小
* 返回值:成功读取的内存大小
* @成功则返回1 , 失败则返回0
*/
int RTMP264_Send(int (*read_buffer)(unsigned char *buf, int buf_size));
/**
* 断开连接,释放相关的资源。
*
*/
void RTMP264_Close();