2011-8-9 15:13:00
来源:互联网 发布:品友互动 知乎 编辑:程序博客网 时间:2024/05/01 10:36
2011-8-9 15:13:00
从媒体格式中获取port 且port必须是偶数
接着创建了一个数据包源 APacketSource
获取了pt,描述 和参数
getDurationUs
获取播放时间 以us为单位
如果从描述中设置为H.264
就设置MIME为 const char *MEDIA_MIMETYPE_VIDEO_AVC = "video/avc";
if (!sessionDesc->getDimensions(index, PT, &width, &height)) {
width = -1;
height = -1;
}
获取宽高 PT
ARTPConnection
现在看一下RTP连接是怎么回事?
struct ALooperRoster {
ALooperRoster();
ALooper::handler_id registerHandler(
const sp<ALooper> looper, const sp<AHandler> &handler);
void unregisterHandler(ALooper::handler_id handlerID);
void postMessage(const sp<AMessage> &msg, int64_t delayUs = 0);
void deliverMessage(const sp<AMessage> &msg);
sp<ALooper> findLooper(ALooper::handler_id handlerID);
private:
struct HandlerInfo {
wp<ALooper> mLooper;
wp<AHandler> mHandler;
};
Mutex mLock;
KeyedVector<ALooper::handler_id, HandlerInfo> mHandlers;
ALooper::handler_id mNextHandlerID;
DISALLOW_EVIL_CONSTRUCTORS(ALooperRoster);
};
} // namespace android
这个是管理looper
ALooper::handler_id ALooperRoster::registerHandler(
const sp<ALooper> looper, const sp<AHandler> &handler) {
Mutex::Autolock autoLock(mLock);
if (handler->id() != 0) {
CHECK(!"A handler must only be registered once.");
return INVALID_OPERATION;
}
HandlerInfo info;
info.mLooper = looper;
info.mHandler = handler;
ALooper::handler_id handlerID = mNextHandlerID++;
mHandlers.add(handlerID, info);
handler->setID(handlerID);
return handlerID;
}
所有的looper 必须向looperRoast 注册
unregisterHandler 取消注册
void ALooperRoster::postMessage
根据消息的target找到对应的looper,然后调用looper的post方法
onMessageReceived
deliverMessage 是取的handler
findLooper 查找对应的loooper
runOnCallingThread 是否是在调用线程中运行?
如果不是就自己创建线程运行
- 2011-8-9 15:13:00
- 2011-8-13 0:35:15
- 2011-8-13 16:15:07
- 2011-8-9 13:30:36
- 2011-8-9 19:13:18
- 2011-8-10 9:15:37
- 2011-7-13 13:00:45
- quartz实现每周一至周五 非法定节假日 每天9:30-11:30,13:00-15:00执行定时任务
- quartz实现每周一至周五 非法定节假日 每天9:30-11:30,13:00-15:00执行定时任务
- 2011-9-15
- 2011-8-15
- 2011-7-10 15:14:00
- 2011-8-9
- 2011-7-25 9:00:12
- 2011-9-17 17:22:00
- 2011-9-27 20:48:00
- """select * from TRACEUSER where STARTIME >=#2008-8-8 8:00:00# and STARTIME <= #2008-9-3 15:25:42#"""""
- 8/27/2011 3:49:00 AM
- T-SQL 编程规范
- linux---vim---ctag
- 修改Moodle的日期显示改英文为中文
- 【转】木马隐藏地点全搜查
- C++临时对象(2)
- 2011-8-9 15:13:00
- Flex学习笔记:ArrayCollection和Array的区别
- 自定义按钮
- 常用的几种类型的ADC基本原理及特点
- 线性哈希-line hash
- 【转】入侵检测术语全接触
- tabhost的使用(1)
- ASP随机整数
- Linux学习笔记二、权限操作,ls,chgrp,chown,chmod,cp,mkdir,touch,rm,su,exit,cat,.,..,uname -r,lsb_release -a