[mythtv] Specifying a particular Audio PID

Dean Wilson dean.k.wilson at gmail.com
Wed May 18 19:23:36 UTC 2005


When I upgraded from 0.17 to 0.18 (as well as 18.1 and CVS), I noticed
that my (DVB) channel "5_1" audio stuttered, and I got hundreds of
"audio buffer overflow" messages.

After digging around in the list archives, I found that if I changed
the recording options to "TS," myth found more audio tracks.  This
helped, because I could manually change tracks to a lower audio track,
and the audio works.  However, I have to change the audio track
manually each time I change to that channel, and recordings don't
work.

So I dug around some more, and found several threads
(http://www.gossamer-threads.com/lists/mythtv/users/130633,
http://www.gossamer-threads.com/lists/mythtv/users/126368) with people
with similar issues.  However, it doesn't look as if a workaround has
been developed.

So I thought I might be able to help out, and I started digging around
in libs/libmythtv/avformatdecoder.cpp.  It seems that
autoSelectAudioTrack() obviously works for most channels, but it would
be nice to have the ability to specify a particular audio PID for any
given channel -- it would be an easy fix for incorrectly set audio
tracks, and it would give people the option of defaulting to different
tracks if they chose.  (For example, some people may prefer Spanish
for particular channels, etc...)

So here are my thoughts as to how this could be done:

I could add a column to the "channel" table that indicates a preferred
audio PID.  Then autoSelectAudioTrack() could first check this table,
and if a value is set, return said value.  (Otherwise, it would
continue as normal.)

But here's my question:  In order to check to see if there's a
preferred audio PID, I have to be able to associate the audio streams
in avformatdecoder.cpp with the associated channel in the "channel"
table.  Unfortunately, in the (so far, limited amount of) time I've
spent digging through the code, I haven't been able to find a way to
associate them.

It seems to me that I need to figure out how, when the user changes
channels, autoSelectAudioTrack() is called.  Can anyone point me in
the right direction?)

Thanks for your help,
~Dean Wilson


More information about the mythtv-dev mailing list