• 支持H.264/G.711/G.726/AAC视频格式RTSP开源推流组件libEasyPusher库接口调用说明


    RTSP/RTP推流平台背景分析

    EasyPusher是推送流媒体音/视频流给开源流媒体服务器EasyDarwin的标准RTSP/RTP协议推送库,全平台支持(包括Windows/Linux(32 & 64),ARM各平台,Android、IOS),通过EasyPusher我们就可以避免接触到稍显复杂的RTSP/RTP/RTCP推送流程,只需要调用EasyPusher的几个API接口,就能轻松稳定地把流媒体音视频数据推送给EasyDarwin服务器进行转发和分发。

    libEasyPusher库接口调用说明

    API接口函数定义

    函数说明:创建推送句柄,返回为句柄值
    Easy_API Easy_Handle Easy_APICALL EasyPusher_Create();

    函数说明:释放推送句柄
    Easy_API Easy_U32 Easy_APICALL EasyPusher_Release(Easy_Handle handle);

    函数说明: 设置流传输事件回调
    参数说明:userptr传输自定义对象指针
    Easy_API Easy_U32 Easy_APICALL EasyPusher_SetEventCallback(Easy_Handle handle, EasyPusher_Callback callback, int id, void *userptr);

    函数说明:开始流传输
    参数说明:serverAddr:流媒体服务器地址、port:流媒体端口、streamName:流名称<xxx.sdp>、username/password:推送携带的用户名密码、pstruStreamInfo:推送的媒体定义、bufferKSize:以k为单位的缓冲区大小<512~2048之间,默认512> bool createlogfile:创建日志文件
    Easy_API Easy_U32 Easy_APICALL EasyPusher_StartStream(Easy_Handle handle, char* serverAddr, Easy_U16 port, char* streamName, int rtpOverTcp/1-tcp, 2-udp/, char *username, char password, EASY_MEDIA_INFO_T pstruStreamInfo, Easy_U32 bufferKSize, Easy_Bool createlogfile );

    函数说明:停止流传输
    Easy_API Easy_U32 Easy_APICALL EasyPusher_StopStream(Easy_Handle handle);
    函数说明:推流 frame,具体推送的流媒体帧
    Easy_API Easy_U32 Easy_APICALL EasyPusher_PushFrame(Easy_Handle handle, EASY_AV_Frame* frame );

  • 相关阅读:
    Android 简单案例:可移动的View
    Android 简单案例:onSaveInstanceState 和 onRestoreInstanceState
    Android 简单案例:继承BaseAdapter实现Adapter
    Android ImageResizer:inSampleSize
    Android 动画fillAfter和fillBefore
    Android Runtime.getRuntime().exec
    Android Fingerprint系列之google原生界面
    GIF录制工具
    Android Graphviz 安装
    Google Java编程风格指南
  • 原文地址:https://www.cnblogs.com/TSINGSEE/p/11812438.html
Copyright © 2020-2023  润新知