awesomePlayer 流程

LocalPlayback

0 setDataSource_l(const char *uri, const KeyedVector<String8, String8> *headers) 

  00 prepareAsync_l()

    000 onPrepareAsyncEvent()

      0000 finishSetDataSource_l()

        00000 DataSource::CreateFromURI()

          000000 new FileSource(uri)

        00001 extractor = MediaExtractor::Create()

        根据mime创建对应的Extractor

        00002 setDataSource_l(extractor)

          000020 setVideoSource()

          000021 setAudioSource()

          000022 addTextSource_l()

          根据Extractor解析的track,设定Source

      0001 initVideoDecoder()

        00010 OMXCodec::Create()

          000100 findMatchingCodecs()

          找到对应的codec componentName

          000101 InstantiateSoftwareEncoder()

          000102 InstantiateSoftwareDecoder()

          000103 omx->allocateNode()

          000104 sp<OMXCodec> codec = new OMXCodec()

        00011 mVideoSource->start()

      0002 initAudioDecoder()

      类似于video创建

      0003 finishAsyncPrepare_l()

        00030 notifyVideoSize_l()

        00031 mPreparedCondition.broadcast()


1 AwesomePlayer::play_l() 

  10 mAudioPlayer = new AudioPlayer(mAudioSink, allowDeepBuffering, this);

  11 mAudioPlayer->setSource(mAudioSource);

  12 mTimeSource = mAudioPlayer;

  13  postVideoEvent_l();

  14  postVideoLagEvent_l();

  15 seekTo_l(0);



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值