[mythtv] MythMusic and planar data

Jean-Yves Avenard jyavenard at gmail.com
Thu Apr 4 00:04:44 UTC 2013


For paul-h seeing he's not online on IRC...

[10:47am] jya_: paul-h: I have made a convenience method to convert planar
data into interleaved one…. it's just in various places: RAOP and
avformatdecoder.cpp… Though this shouldn't be something new in ffmpeg/1.1 ,
would have been the same in 1.0
[10:48am] jya_: most codecs in ffmpeg now returns planar decoded data
[10:49am] rsiebert left the chat room. (Ping timeout: 258 seconds)
[10:50am] amessina left the chat room. (Quit: Konversation terminated!)
[10:51am] stichnot left the chat room. (Quit: ChatZilla 0.9.90 [Firefox
19.0.2/20130307122903])
[10:54am] stichnot joined the chat room.
[10:54am] stichnot left the chat room. (Changing host)
[10:54am] stichnot joined the chat room.
[10:54am] jya_: check line 4984 in avfd.cpp this is how you detect if audio
is planar or not. You should use this to convert to standard format (which
is independent to planar or not: just tell you the sample size: S16, S32,
float etc). To decode the audio, use AudioOutputUtil::DecodeAudio:
http://code.mythtv.org/doxygen/classAudioOutputUtil.html#a508a76313cc17ef3fed2fe5c3b262f1c
[10:55am] jya_: somehow I have some memories about using that utility
method in mythmusic… if not.. use it
[10:57am] jya_: I can do it if you want… just do something like:
AVSampleFormat format_pack = av_get_packed_sample_fmt(ctx->sample_fmt); and
do you switch case on the format like you used to test for
AV_SAMPLE_FMT_S16, ignore the planar format
[11:01am] jya_: i did make it use DecodeAudio.. so what you need is simply
this: http://pastebin.com/H68C3Azr
[11:02am] jya_: this will handle all cases where you would get S24/S32
planar (which is what I would expect for codec like flac)

So basically, apply http://pastebin.com/H68C3Azr, and it should be all good
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-dev/attachments/20130404/bed2e03d/attachment.html>


More information about the mythtv-dev mailing list