oRTP分析
来源:互联网 发布:张量与矩阵的乘积 编辑:程序博客网 时间:2024/06/05 00:43
oRTP分析
接口ortp_scheduler_init对调度模块进行初始化
/** * Initialize the oRTP scheduler. You only have to do that if you intend to use the * scheduled mode of the #RtpSession in your application.**/void ortp_scheduler_init(){ static bool_t initialized=FALSE; if (initialized) return; initialized=TRUE;#ifdef __hpux /* on hpux, we must block sigalrm on the main process, because signal delivery is ?random?, well, sometimes the SIGALRM goes to both the main thread and the scheduler thread */ sigset_t set; sigemptyset(&set); sigaddset(&set,SIGALRM); sigprocmask(SIG_BLOCK,&set,NULL);#endif /* __hpux */ __ortp_scheduler=rtp_scheduler_new(); rtp_scheduler_start(__ortp_scheduler);}
struct _RtpScheduler { RtpSession *list; /* list of scheduled sessions*/ SessionSet all_sessions; /* mask of scheduled sessions */ int all_max; /* the highest pos in the all mask */ SessionSet r_sessions; /* mask of sessions that have a recv event */ int r_max; SessionSet w_sessions; /* mask of sessions that have a send event */ int w_max; SessionSet e_sessions; /* mask of session that have error event */ int e_max; int max_sessions; /* the number of position in the masks */ /* GMutex *unblock_select_mutex; */ ortp_cond_t unblock_select_cond; ortp_mutex_t lock; ortp_thread_t thread; int thread_running; struct _RtpTimer *timer; uint32_t time_; /*number of miliseconds elapsed since the start of the thread */ uint32_t timer_inc; /* the timer increment in milisec */};typedef struct _RtpScheduler RtpScheduler;
在该接口中创建一个RtpScheduler类型的结构体__ortp_scheduler,并调用rtp_scheduler_init初始化它。
初始化完后调用rtp_scheduler_start启动调度任务
调度任务的执行体为rtp_scheduler_schedule,参数为调度结构体自身
0 0
- oRTP分析
- oRTP源码分析
- ortp定时器源码分析
- ortp 源码分析
- ortp分析之一 例子分析
- ortp分析之一 例子分析
- ortp分析之一 例子分析
- ortp事件处理源码分析
- ortp
- oRTP
- ortp数据收发调度器源码分析
- ortp分析之二 主要结构体 (未完)
- ORTP 简介
- oRTP使用
- ORTP函数库
- ORTP 使用
- ortp简介
- ortp使用详解 ortp-release.pdf
- json解析工具类
- DotNet 资源大全
- 动态联编与虚函数
- Linux下如何安装Discuz
- Java IO流分析整理
- oRTP分析
- 使用gem安装jekyll,提示无法下载:Broken pipe - SSL connection
- QVariant类
- universalimageloader加载本地图片(转载)
- Linux下搭建安装Discuz论坛
- iOS开发-图文混排之cell自适应
- 顺序查找和折半查找
- Android获取图片的几种方式
- 利用FFmpeg+x264将iOS摄像头实时视频流编码为h264文件