资源简介
28181.rar
代码片段和文件信息
#include “stdafx.h“
#include “SKRTPSender.h“
class SKGB28181DeviceApp : public SKGB28181Callback
{
public:
SKGB28181DeviceApp();
~SKGB28181DeviceApp();
HANDLE m_hGB;
HANDLE m_hRegSIPServer;
BOOL Init();
void Release();
virtual void ServerRegistration(HANDLE regBOOL unregisterBOOL sucessvoid *ctx);
virtual BOOL DeviceControl(SKGB28181UserAgent *ua SKGB28181CMDbaseParams *cmd void *ctx);
virtual BOOL DeviceQuery(SKGB28181UserAgent *ua int cmd void *ctx) ;
virtual BOOL DeviceQueryRecordInfo(SKGB28181UserAgent *ua SKGB28181QueryRecordInfoParams *params void *ctx);
virtual BOOL SessionNew(SKGB28181SessionParams *params void *ctx);
virtual BOOL Sessionstart(SKGB28181SessionParams *params void *ctx);
virtual BOOL Sessionstop(SKGB28181SessionParams *params void *ctx);
virtual BOOL SessionControl(SKGB28181SessionParams *params SKGB28181SessionCMDParams *cmd_params void *ctx);
};
SKGB28181DeviceApp g_App;
SKGB28181ServerInfo g_LocalServerInfo;
SKGB28181ServerInfo g_RemoteServerInfo;
BOOL g_bRegisterFlag = FALSE;
SKStringT g_strSampleFile;
HANDLE SKGetGBHandle()
{
return g_App.m_hGB;
}
SKGB28181DeviceApp::SKGB28181DeviceApp():m_hGB(NULL)m_hRegSIPServer(NULL)
{
}
SKGB28181DeviceApp::~SKGB28181DeviceApp()
{
}
BOOL SKGB28181DeviceApp::Init()
{
SKGB28181ServerInfo *infos[2]= {&g_LocalServerInfoNULL};
m_hGB = SKGB28181StartServer(1infos thisthis);
if(m_hGB == NULL)
{
return FALSE;
}
SKGB28181UserAgent *ua = new SKGB28181UserAgent;
ua->m_strID = g_LocalServerInfo.m_strID;
ua->m_strIP = g_LocalServerInfo.m_strIP;
ua->m_iPort = g_LocalServerInfo.m_iPort;
ua->m_ExpireTime = time(NULL) + 360000;
ua->m_bSIP = FALSE;
ua->m_KeepaliveTime = time(NULL);
ua->m_iProto = 1;
int num = 0;
int start = 0;
for(int i = 0; i < num; i++)
{
SKGB28181Catalog *catalog = new SKGB28181Catalog;
catalog->DeviceID.Format(“3402000000%03d0000%03d“ 133 i + start);
catalog->ParentID = ua->m_strID;
catalog->Parental = “1“;
catalog->Manufacturer = “SKT“;
ua->m_Catalogs.Add(catalog);
}
if(!SKGB28181RegisterUserAgent(m_hGBua))
{
delete ua;
return FALSE;
}
m_hRegSIPServer = SKGB28181RegisterServer(m_hGB &g_RemoteServerInfo);
if(m_hRegSIPServer == NULL)
{
return FALSE;
}
return TRUE;
}
void SKGB28181DeviceApp::Release()
{
if(m_hGB)
{
if(m_hRegSIPServer)
{
SKGB28181UnregisterServer(m_hGB m_hRegSIPServer);
m_hRegSIPServer = NULL;
g_bRegisterFlag = FALSE;
int count = 0;
while(g_bRegisterFlag)
{
Sleep(16);
count++;
if(count > 100)
{
TRACE(“UnregisterServer Timeout\n“);
}
}
}
SKGB28181StopServer(m_hGB);
}
}
void SKGB28181DeviceApp::ServerRegistration(HANDLE regBOOL unregisterBOOL sucessvoid *ctx)
{
TRACE(“ServerRegistration sucess = %d!\n“ sucess);
g_bRegisterFlag = TRUE;
}
BOOL SKGB28181DeviceApp::DeviceCon
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 81408 2016-07-27 20:11 SKFFMpegLib.dll
文件 312320 2016-08-02 20:36 SKGB28181Device.exe
文件 9940 2016-08-07 10:12 SKGB28181DeviceMain.cpp
文件 433152 2016-08-07 09:50 SKGB28181Server.exe
文件 45056 2016-07-27 20:11 SKImageLib.dll
文件 47104 2016-07-27 20:11 SKMediaba
文件 30720 2016-07-27 20:11 SKOSCoreLib.dll
文件 28672 2016-07-27 20:12 SKPla
文件 25088 2016-07-27 20:12 SKPla
文件 56832 2016-07-27 20:12 SKPla
文件 19968 2016-07-27 20:12 SKPla
文件 34304 2016-07-27 20:12 SKPla
文件 46080 2016-07-27 20:12 SKPla
文件 15872 2016-07-27 20:12 SKPla
文件 30208 2016-07-27 20:12 SKPla
文件 364 2016-08-07 10:06 test.xm
文件 978 2016-08-07 10:10 使用说明.txt
文件 336509 2016-08-07 10:06 图1.png
文件 31 2015-03-29 18:43 作者联系方式-QQ-395579940.txt
文件 15261696 2013-10-13 16:04 FFMPEG\dll\avcodec-54.dll
文件 391168 2013-10-13 16:04 FFMPEG\dll\avdevice-54.dll
文件 1731584 2013-10-13 16:04 FFMPEG\dll\avfilter-3.dll
文件 2926080 2013-10-13 16:04 FFMPEG\dll\avformat-54.dll
文件 240128 2013-10-13 16:04 FFMPEG\dll\avutil-52.dll
文件 196608 2013-10-13 16:04 FFMPEG\dll\postproc-52.dll
文件 55808 2013-10-13 16:04 FFMPEG\dll\pthreadVC2.dll
文件 110592 2013-10-13 16:04 FFMPEG\dll\swresample-0.dll
文件 342016 2013-10-13 16:04 FFMPEG\dll\swscale-2.dll
文件 31 2015-03-29 18:43 contact.txt
文件 55808 2014-06-21 17:28 pthreadVC2.dll
............此处省略7个文件信息
- 上一篇:周立功《嵌入式Linux开发教程上册》
- 下一篇:家用办公家具拆单软件
相关资源
- lua程序设计第四版中英文第二版中文
- Xshell6Xftp6绿色破解永久授权激活版,
- zw_MFTV.zip
- 项目源代码.rar
- 基于SSH框架的在线考试系统.zip
- verdi教程.zip
- 信号检测与估计理论_学习辅导与习题
- anyconnect-macosx.dmg
- 南方CASS6.0破解版.RAR
- 财务报表分析.rar
- 离散.zip
- aiqiyi.zip
- 55f90eaa6de2e79f21033d3d3572d944.pdf
- 金盾2016s提取版本号为5.4.zip
- IDA_Pro_v7.0_and_Hex-Rays_Decompiler_(ARMx64
- 优考试局域网考试系统高级版v4.11.1
- PentahoKettleSolutions中文版及随书代码
- OSPF和IS-IS详解(书签).pdf
- C高级编程第3版带书签目录完整版.7
- zw_qiuzhongweiwei-10396852-Desktop.zip
- e98e7403d94412090cb2478041575722.zip
- 猫力币数字资产交易平台源码.zip
- 全身CT.zip
- pscad45完美破解版.rar
- a1199496530b554a60444b4cc059f5da.pdf
- zones.zip
- 系统架构设计师大纲、教程清华、希
- 普林斯顿微积分读本(修订版).pdf
- Vue.js权威指南.pdf.zip
- 素材诊断分析助手V1.6.zip
评论
共有 条评论