ortp代码简析
ortp初始化
/**
* Initialize the oRTP library. You should call this function first before using
* oRTP API.
**/
void ortp_init()
{
if (ortp_initialized++) return; //全局初始化标志 #ifdef _WIN32
win32_init_sockets(); //初始化socket
#endif av_profile_init(&av_profile); //注册所需的payload类型
ortp_global_stats_reset();
init_random_number_generator(); ortp_message("oRTP-" ORTP_VERSION " initialized.");
}
ortp退出
/**
* Gracefully uninitialize the library, including shutdowning the scheduler if it was started.
*
**/
void ortp_exit()
{
if (ortp_initialized==) {
ortp_warning("ortp_exit() called without prior call to ortp_init(), ignored.");
return;
}
ortp_initialized--;
if (ortp_initialized==){
if (__ortp_scheduler!=NULL)
{
rtp_scheduler_destroy(__ortp_scheduler);
__ortp_scheduler=NULL;
}
}
}
外部调用ortp初始化
int init_rtpservice()
{
ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
ortp_set_log_handler(__logv_out); //orpt LOG, 设置orpt日志
ortp_init();
return RESULT_SUCCESS;
}
外部调用ortp反初始化
int uninit_rtpservice()
{
rtp_profile_clear_all(p_RtpProfile);
rtp_profile_destroy(p_RtpProfile);
ortp_exit();
return RESULT_SUCCESS;
}
ortp代码简析的更多相关文章
- OpenStack之虚机冷迁移代码简析
OpenStack之虚机冷迁移代码简析 前不久我们看了openstack的热迁移代码,并进行了简单的分析.真的,很简单的分析.现在天气凉了,为了应时令,再简析下虚机冷迁移的代码. 还是老样子,前端的H ...
- WinForm 自动完成控件实例代码简析
在Web的应用方面有js的插件实现自动完成(或叫智能提示)功能,但在WinForm窗体应用方面就没那么好了. TextBox控件本身是提供了一个自动提示功能,只要用上这三个属性: AutoComple ...
- Log4js 工作原理及代码简析
本文地址 http://www.cnblogs.com/jasonxuli/p/6518650.html log4js 版本 0.6.16, 最新版1.1.1 大体类似. 使用 log4j ...
- uboot 2013.01 代码简析(3)第二阶段初始化
u-boot第二阶段初始化内容的入口函数是_main,_main位于arch/arm/lib/crt0.S文件中: _main函数中先为调用board_init_f准备初始化环境(设置栈指针sp和并给 ...
- uboot 2013.01 代码简析(1)开发板配置
u-boot下载地址:ftp://ftp.denx.de/pub/u-boot/u-boot-2013.01.01.tar.bz2 下载之后对该文件进行解压. 我试着分析smdk2410_config ...
- uboot 2013.01 代码简析(2)第一阶段初始化
uboot执行"make smdk2410_config"之后就可以进行编译了,可以执行make命令进行编译, 因为整个输出太长,我仅仅列出部分最关键的输出(部分我不关心的内容直接 ...
- Hive Metastore 代码简析
1. hive metastore 内部结构 1.1 包结构 从package结构来看,主要的5个package,让我们来看看这几个package的内容 (1) metastorepackage是m ...
- GPXReader工具代码简析
完整的文件在TerraExplorer Pro的默认安装目录下C:\Program Files (x86)\Skyline\TerraExplorer Pro\Tools\GPXReader: 如果你 ...
- 功能强大的图片截取修剪神器:Android SimpleCropView及其实例代码重用简析(转)
功能强大的图片截取修剪神器:Android SimpleCropView及其实例代码重用简析 SimpleCropView是github上第一个第三方开源的图片修剪截取利器,功能强大,设计良好.我个人 ...
随机推荐
- stack的三个意思
(转自阮一峰的网络日志,原网址http://www.ruanyifeng.com/blog/2013/11/stack.html) 阮一峰老师终于又更新博客了,个人认为这篇文章有一定科普意义,有一定解 ...
- 【luogu P2919 [USACO08NOV]守护农场Guarding the Farm】 题解
题目链接:https://www.luogu.org/problemnew/show/P2919 1.搜索的时候分清楚全局变量和局部变量的区别 2.排序优化搜索 #include <cstdio ...
- 如何安装zip格式的MySQL
1.MySQL安装文件分为两种,一种是msi格式的,一种是zip格式的.如果是msi格式的可以直接点击安装,按照它给出的安装提示进行安装(相信大家的英文可以看懂英文提示),一般MySQL将会安装在C: ...
- Gradle Goodness: Unpacking an Archive
To create an archive with Gradle is easy. We have several tasks like Zip, Tar, Jar, War and Ear to c ...
- 关于swing界面label和button的动态设置文字
在引入发送验证码功能后,想让button的文本动态变化,发现如下方法并不能做到: int limitSec=10; while(limitSec>0){ sendyzhm.setEnabled( ...
- 常见的springmvc、SpringBoot的注解
springMvc的常用注解 : @Controller :用于标记在一个类上,使用它标记的类就是一个springmcv Controller对象,分发处理器将会扫描使用了该注解 的类的方法,并检测该 ...
- 每日笔记---使用@ConfigurationProperties读取yml配置
每日笔记---使用@ConfigurationProperties读取yml配置 参考地址 https://www.cnblogs.com/mycs-home/p/8352140.html 1.添加 ...
- Objective-C 中的 assign, copy,retain,strong,weak 详解
在IOS开发中,经常会使用 @property(nonatomic,copy)NSString * name; 语句来快速设置set get 方法,在此依次说明atomic .nonatomi ...
- 557. Reverse Words in a String III (5月25日)
解答 class Solution { public: string reverseWords(string s) { string temp,result; while(1){ if(s.find( ...
- C语言的乱七八糟
Note For C Linux下C编程基础(gcc/gdb/make使用) 一.vi学习 二.初探emacs 三.gcc编译器 3.1 gcc所支持后缀名解释 后缀名 解释 后缀名 解释 .c C原 ...