資源簡介
GB28181協議,支持H264編碼格式輸出視頻,支持海康大華等平臺

代碼片段和文件信息
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?“cJSON.h“
#include?“mxml.h“
#include?“HTTPDigest.h“
#include?“mediaServer.h“
#include?“pstream.h“
liveVideoStreamParams?g_liveVideoParams;
static?void?RegisterSuccess(struct?eXosip_t?*?peCtxeXosip_event_t?*je)
{
????int?iReturnCode?=?0?;
????osip_message_t?*?pSRegister?=?NULL;
????iReturnCode?=?eXosip_message_build_answer?(peCtxje->tid200&pSRegister);
????if?(?iReturnCode?==?0?&&?pSRegister?!=?NULL?)
????{
????????eXosip_lock(peCtx);
????????eXosip_message_send_answer?(peCtxje->tid200pSRegister);
????????eXosip_unlock(peCtx);
????????//osip_message_free(pSRegister);
????}
}
void?RegisterFailed(struct?eXosip_t?*?peCtxeXosip_event_t?*je)?{
????int?iReturnCode?=?0?;
????osip_message_t?*?pSRegister?=?NULL;
????iReturnCode?=?eXosip_message_build_answer?(peCtxje->tid401&pSRegister);
????if?(?iReturnCode?==?0?&&?pSRegister?!=?NULL?)
????{
????????eXosip_lock(peCtx);
????????eXosip_message_send_answer?(peCtxje->tid401pSRegister);
????????eXosip_unlock(peCtx);
????}
}
static?int?doParaseJson(char?*buf)?{
????int?i;
????cJSON?*?root?=?cJSON_Parse(buf);
????if(root?!=?NULL)?{
????????cJSON?*?pSubRoot?=?cJSON_GetobjectItem(root?“gb28181“);
????????if(pSubRoot?!=?NULL)?{
????????????cJSON?*?pSub?=?cJSON_GetobjectItem(pSubRoot?“platform_id“);
????????????if(pSub?!=?NULL)?{
????????????????APP_DEBUG(“platform_id:%s“?pSub->valuestring);
????????????????strncpy(g_liveVideoParams.gb28181Param.platformSipId?pSub->valuestring?256);
????????????}
????????????pSub?=?cJSON_GetobjectItem(pSubRoot?“platform_port“);
????????????if(pSub?!=?NULL)?{
????????????????APP_DEBUG(“platform_port:%d“?pSub->valueint);
????????????????g_liveVideoParams.gb28181Param.platformSipPort?=?pSub->valueint;
????????????}
????????????pSub?=?cJSON_GetobjectItem(pSubRoot?“platform_ip“);
????????????if(pSub?!=?NULL)?{
????????????????APP_DEBUG(“platform_ip:%s“?pSub->valuestring);
????????????????strncpy(g_liveVideoParams.gb28181Param.platformIpAddr?pSub->valuestring?128);
????????????}
????????????pSub?=?cJSON_GetobjectItem(pSubRoot?“local_id“);
????????????if(pSub?!=?NULL)?{
????????????????APP_DEBUG(“local_id:%s“?pSub->valuestring);
????????????????strncpy(g_liveVideoParams.gb28181Param.localSipId?pSub->valuestring?256);
????????????}
????????????pSub?=?cJSON_GetobjectItem(pSubRoot?“local_port“);
????????????if(pSub?!=?NULL)?{
????????????????APP_DEBUG(“local_port:%d“?pSub->valueint);
????????????????g_liveVideoParams.gb28181Param.localSipPort?=?pSub->valueint;
????????????}
????????????pSub?=?cJSON_GetobjectItem(pSubRoot?“local_ip“);
????????????if(pSub?!=?NULL)?{
????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-10-09?09:40??gb28181ToH264-master\
?????文件?????????328??2017-10-09?09:40??gb28181ToH264-master\Makefile
?????文件?????????970??2017-10-09?09:40??gb28181ToH264-master\README.md
?????文件?????????615??2017-10-09?09:40??gb28181ToH264-master\config.json
?????文件???????30956??2017-10-09?09:40??gb28181ToH264-master\main.cpp
?????目錄???????????0??2017-10-09?09:40??gb28181ToH264-master\work\
?????目錄???????????0??2017-10-09?09:40??gb28181ToH264-master\work\MD5\
?????文件????????4997??2017-10-09?09:40??gb28181ToH264-master\work\MD5\HTTPDigest.c
?????文件????????1326??2017-10-09?09:40??gb28181ToH264-master\work\MD5\HTTPDigest.h
?????文件???????13552??2017-10-09?09:40??gb28181ToH264-master\work\MD5\HTTPDigest.o
?????文件???????10350??2017-10-09?09:40??gb28181ToH264-master\work\MD5\MD5.c
?????文件????????2259??2017-10-09?09:40??gb28181ToH264-master\work\MD5\MD5.h
?????文件???????18280??2017-10-09?09:40??gb28181ToH264-master\work\MD5\MD5.o
?????文件?????????365??2017-10-09?09:40??gb28181ToH264-master\work\MD5\MD5.pro
?????文件???????17804??2017-10-09?09:40??gb28181ToH264-master\work\MD5\MD5.pro.user
?????文件???????17772??2017-10-09?09:40??gb28181ToH264-master\work\MD5\MD5.pro.user.d43ec66
?????文件???????34528??2017-10-09?09:40??gb28181ToH264-master\work\MD5\libmd5.a
?????文件?????????561??2017-10-09?09:40??gb28181ToH264-master\work\MD5\makefile
?????文件????????2915??2017-10-09?09:40??gb28181ToH264-master\work\MD5\test.c
?????文件????????2352??2017-10-09?09:40??gb28181ToH264-master\work\MD5\test.o
?????目錄???????????0??2017-10-09?09:40??gb28181ToH264-master\work\cjson\
?????文件???????27791??2017-10-09?09:40??gb28181ToH264-master\work\cjson\cJSON.c
?????文件????????7526??2017-10-09?09:40??gb28181ToH264-master\work\cjson\cJSON.h
?????目錄???????????0??2017-10-09?09:40??gb28181ToH264-master\work\include\
?????文件????????1507??2017-10-09?09:40??gb28181ToH264-master\work\include\mediaServer.h
?????文件????????1485??2017-10-09?09:40??gb28181ToH264-master\work\include\pstream.h
?????目錄???????????0??2017-10-09?09:40??gb28181ToH264-master\work\mxm
?????目錄???????????0??2017-10-09?09:40??gb28181ToH264-master\work\mxm
?????文件???????12183??2017-10-09?09:40??gb28181ToH264-master\work\mxm
?????目錄???????????0??2017-10-09?09:40??gb28181ToH264-master\work\mxm
?????文件??????219750??2017-10-09?09:40??gb28181ToH264-master\work\mxm
............此處省略74個文件信息
評論
共有 條評論