记录android 上http live streaming初始化过程,学习之用
只拣最关键部分记录,其余的未作详细记录
1 HttpLiveSource.cpp :: prepareAsync()--> 这个是比较通用的媒体初始化过程,和本地一样
---> new LiveSession(..)
---> mliveSession->connectAsync(...)
2 LiveSession.cpp :: connectAsync(...)
---> new AMessage(kWhatConnect)
--->onMessageReceived(...)
------->kWhatConnect->onConnect(msg)
3 LiveSession.cpp::onConnect(...)
--->fetchPlayList(...)
---->changeConfiguration(...)
4 LiveSession.cpp::changeConfiguration()
-->changeConfiguration2(...)
5 LiveSession.cpp::changeConfiguration2(...)
-->changeConfiguration3(..)
5 LiveSession.cpp::changeConfiguration3(...)
--->fetcher->startAsync(..)
6 PlayListFetcher::startAsync(...)
--->send kWhatStart msg
7 PlayListFetcher::onStart(...)
---->postMonitorQueue(...)
8 PlayListFetcher::postMonitorQueue()
-->send message ... onMonitorQueue(...)
9 PlayListFetcher:: onMonitorQueue(...)
--->onDownloadNext(...)
onDownloadNext 就会在onMonitorQueue的不断驱动下一直在读数据,直到收到主动停止消息以及结束为止。