darwin 读取xml流程
来源:互联网 发布:windows 10更新 编辑:程序博客网 时间:2024/06/06 13:06
QTSSModule* theReflectorModule = new QTSSModule("QTSSReflectorModule"); (void)theReflectorModule->SetupModule(&sCallbacks, &QTSSReflectorModule_Main); (void)AddModule(theReflectorModule);
1.在QTSSModule构造函数QTSSModule::QTSSModule(char* inName, char* inPath)中,将thePrefs成员变量写入数据字典
this->SetVal(qtssModPrefs, &fPrefs, sizeof(fPrefs));
2.在Bool16 QTSServer::AddModule(QTSSModule* inModule)中,将QTSSPrefs* thePrefs传入模块中,从而实现了fPrefs成员的赋值。thePrefs内部保存了xml信息。
thePrefs->RereadPreferences()将xml写入到数据字典
// Give the module object a prefs dictionary. Instance attributes are allowed for these objects.
QTSSPrefs* thePrefs = NEW QTSSPrefs( sPrefsSource, inModule->GetValue(qtssModName), QTSSDictionaryMap::GetMap(QTSSDictionaryMap::kModulePrefsDictIndex), true);
thePrefs->RereadPreferences();
inModule->SetPrefsDict(thePrefs);
3.在每个模块内部,通过sPrefs = QTSSModuleUtils::GetModulePrefsObject(inParams->inModule);来获取到对应模块的sPrefs,利用sPrefs就可以获取到xml的配置信息了
QTSS_ModulePrefsObject QTSSModuleUtils::GetModulePrefsObject(QTSS_ModuleObject inModObject){ QTSS_ModulePrefsObject thePrefsObject = NULL; UInt32 theLen = sizeof(thePrefsObject); QTSS_Error theErr = QTSS_GetValue(inModObject, qtssModPrefs, 0, &thePrefsObject, &theLen); Assert(theErr == QTSS_NoErr); return thePrefsObject;}
GetAttribute从数据字典取出之前保存的数据
QTSSModuleUtils::GetAttribute(sPrefs, "disable_rtp_play_info", qtssAttrDataTypeBool16, &sRTPInfoDisabled, &sDefaultRTPInfoDisabled, sizeof(sDefaultRTPInfoDisabled)); QTSSModuleUtils::GetAttribute(sPrefs, "allow_non_sdp_urls", qtssAttrDataTypeBool16, &sAllowNonSDPURLs, &sDefaultAllowNonSDPURLs, sizeof(sDefaultAllowNonSDPURLs)); QTSSModuleUtils::GetAttribute(sPrefs, "enable_broadcast_announce", qtssAttrDataTypeBool16, &sAnnounceEnabled, &sDefaultAnnounceEnabled, sizeof(sDefaultAnnounceEnabled)); QTSSModuleUtils::GetAttribute(sPrefs, "enable_broadcast_push", qtssAttrDataTypeBool16, &sBroadcastPushEnabled, &sDefaultBroadcastPushEnabled, sizeof(sDefaultBroadcastPushEnabled)); QTSSModuleUtils::GetAttribute(sPrefs, "max_broadcast_announce_duration_secs", qtssAttrDataTypeUInt32, &sMaxBroadcastAnnounceDuration, &sDefaultMaxBroadcastAnnounceDuration, sizeof(sDefaultMaxBroadcastAnnounceDuration)); QTSSModuleUtils::GetAttribute(sPrefs, "allow_duplicate_broadcasts", qtssAttrDataTypeBool16, &sAllowDuplicateBroadcasts, &sDefaultAllowDuplicateBroadcasts, sizeof(sDefaultAllowDuplicateBroadcasts));
- darwin 读取xml流程
- Darwin Streaming Server 安装流程
- Darwin Streaming Server 安装流程
- jeesite的activite流程读取xml
- 【Darwin学习笔记】之RTSPSession点播流程
- Darwin RTSP点播流程代码分析1
- Darwin RTSP点播流程代码分析2
- 【Darwin学习笔记】之RTSPSession点播流程
- 【Darwin学习笔记】之RTSPSession点播流程
- Darwin RTSP点播流程代码分析
- darwin之RTSPSession Run的状态机流程
- darwin之发送rtp包流程
- Darwin
- Darwin
- Hibernate源码解析---------hibernate.cfg.xml读取流程
- Darwin Streaming Server中RTSP会话流程解析(Darwin流媒体服务器解析1)
- 读取XML
- 读取XML
- iOS版本被拒详情查看
- 二分贪心 B 字典
- axure8.0快速入门新手教程:电子相册
- 更换yum源
- 4-2 多项式求值 (15分) PTA
- darwin 读取xml流程
- 第一个例子跑通了
- Java基础学习笔记5
- void及void指针理解使用
- Nginx 配置
- Shiro搭建
- 动态顺序表(可扩容)的基本操作
- Linux下修改时间
- Fragment出现点击穿透事件,其他fragment中的控件点击被响应了