Kodi Community Forum
PAPlayer question - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: PAPlayer question (/showthread.php?tid=100659)



PAPlayer question - unos2607 - 2011-05-03

Hi,
I am wondering if anyone can tell me a little bit about this technology.
I am making a little patch for the XBMC video and audio player, all I want is to get the raw video frames and raw audio samples after it's been decoded during the playback. The video part I have done, but I got stuck on the audio when trying to get the raw audio samples in the PAPlayer code (PAPlayer.cpp I meant).

Can you guys point out to me where I can find the part which does the decoding and get the raw sample (during playback)? (just like for example I got the luminance raw video frames from the YV12Image image->plane[0] in the CDVDPlayerVideo::OutputPicture() function).

Thank in advance.


- spiff - 2011-05-03

CAudioDecoder. note that PAPlayer is only used for pure audio playback, it has nothing to do with decoding the audio in videos.


- unos2607 - 2011-05-03

Thank you.
Yes, I know PAPlayer is for pure audio playback only (I've already got the idea when I saw the CDVDPlayerAudio). I just want to know how I can get the raw audio samples (or packet) in PAPlayer.


- spiff - 2011-05-03

right, then CAudioDecoder is the class that handles the decode. paplayer has two of these as members (two due to crossfade / gapless).


- unos2607 - 2011-05-04

Thanks. One more small question if you don't mind:
Where can I find the "time stamp" of the audio sample in the code?


- spiff - 2011-05-04

that's hard to answer as the audio packets do not have any time stamps Smile

the best you can do is use the clock as the player does


- unos2607 - 2011-05-04

Ok, I found the function GetTime(), and I think that's the one.
Thank you.