I have integrated Real Media (RM) to Eclair. In real media files, the
audio codec can be one of the 2 formats, AAC or G2COOK (also called as
Real Media 8 Low Bit rate, this is a constant bit rate codec, while
AAC is a VBR codec).

During Normal playback, there is AV sync in all real media files
irrespective of the audio format used is AAC or G2COOK, where as if I
seek, there is AV sync in all real media files with AAC as audio but
there is AV sync mismatch in all the real media files with G2COOK as
audio. Most of the times, audio will be heard ahead of video.

One of the differences between AAC and G2COOK formats is, if the audio
format used is AAC, the RM audio packet will have multiple encoded
audio frames and this packet can be decoded by the decoder
independently. Where as if the audio format used is G2COOK, the RM
audio packets are interleaved upto a factor of 30 packets, and the
decoder needs to buffer all the 30 packets before it deinterleves all
the packets and decodes all the encoded frames in each of those
packets.The first of these 30 packets is called a audio key frame.
So, essentially after repositioning (seeking ) the file, I need to
look for the closed audio keyframe as well as video keyframe around
the seeked position and return the PTS of these 2 packets to the
player upon request. One observation on the PTS of AV keyframe packets
after seek is
Audio PTS = 26000 ms
Video PTS = 20500 ms

or something like

Audio PTS = 11000 ms
Video PTS = 17500 ms

where there is a difference of as much as 6-7 secs between the
keyframes of AV streams.

At the OMX_ra_component.cpp, whenever I recieve the audio keyframe, I
just do a memcpy of the packet in decoder's internal memory and give
back input buffer size as totally consumed while output buffer size
decoded as zero. This is done till I recieve the 29 packets, and after
recieving the last frame of this audio block, while I again send the
input buffer size as totally consumed, I will now send the total
decoded samples of the 30 audio packets recieved till now.

While the AV sync mismatch right after the seek, there is the same
constant delay till the EOF between audio and video. Always audio
played ahead. Any pointers to resolve the issue is highly appreciated.

Thanks
Kiran

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to