0

I am going through the streaming playback use case in Android Stagefright and quite not clear about the architecture and implementations.

I am requesting readers/experts to explain about the major components which are responsible for streaming use case. I heard about ACodec is being employed instead of OMXCodec to realize streaming playback.

What is the extra implementations/features supported by ACodec and why Stagefright didn't reuse OMXCodec.

Could you please point me the important links in Stagefright code.

stackuser
  • 629
  • 8
  • 19
  • For cache realted and pause-resume related topics, I would recommend you to post a different question as the context would be specific to streaming scenarios. – Ganesh May 09 '14 at 14:12
  • The question is modified as per your suggestion. – stackuser May 13 '14 at 12:23

1 Answers1

1

For streaming, there are different scenarios handled differently by the Stagefright framework. Broadly, there are 2 players and corresponding factories viz., StagefrightPlayer and NuPlayer.

StagefrightPlayer is employed as a default player, where as NuPlayer is employed for rtsp, m3u8 (MP3 playlist), sdp playback as implemented in the NuPlayerFactory.

NuPlayer could also be employed when a system property is set to employ the same as the default player.

StagefrightPlayer internally creates AwesomePlayer which handles http/https and Widevine streaming too.

Now coming to ACodec and OMXCodec are pretty close to each other as they abstract an OMX component. ACodec is the underlying implementation of MediaCodec which is a modular interface exposed by Android in the recent releases.

One point of difference though is that some new features such as prepending SPS/PPS to IDR in case of Miracast, Adaptive Playback etc are included only in ACodec and not in OMXCodec.

Ganesh
  • 5,880
  • 2
  • 36
  • 54
  • Hi Ganesh, NuPlayerFactory is creating NuPlayerDriver in turn it creates ALooper and NuPlayer. Could you please brief about ALooper and what does it do. I can see all the implementations in Nuplayer are invoking AMessage calls e.g as: new AMessage(kWhatSourceNotify, id()); I am not sure how does it trigger NuPlayer::onMessageReceived(). In case of memory playback, Awesome player creates OMXCodec and extractor. Could you please explain how does it happen in case of streaming playback? – stackuser May 13 '14 at 11:33
  • @SatishNagireddy.. To keep topics specific, I would request you to kindly breakdown your comment into multiple different questions as one question on entire player engine may not be such a good idea – Ganesh May 13 '14 at 12:40
  • Thanks a lot for the suggestion. I will break down my question and post them as different questions. – stackuser May 14 '14 at 12:20