Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

[patch]: various audio selection problems with DVDs

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


linux at martin-kittel

Nov 22, 2009, 11:35 AM

Post #1 of 3 (784 views)
Permalink
[patch]: various audio selection problems with DVDs

Hi,

I took a shot at some problems that came up when trying to watch a DVD
with many streams. On this DVD not all streams were present from the
very beginning of the feature but some of them got added only one after
another over the course of the first couple of minutes. The effect was
usually that the internal player always would switch back to audio track
no 0 whenever a new stream was detected.

Here's a list of the issues I found:

1. the order in which the audio streams are saved does not match their
logical order on DVD because the audio streams get sorted by streamid in
'AvFormatDecoder::ScanStreams'. Due to this if one selects a track in
the 'Select Audio Track' OSD (or in the DVD menu itself), a different
audio track than the one selected will be played if the logical order
and the order of stream ids does not match (in my case I had a mix of
AC3 and DTS channels and due to the sorting the DTS channel was always
last while it was the second logical track on the DVD according to dvdnav).
I solved this by simply removing the sorting of the audio tracks. This
is the one fix I am not certain about. Is the sorting actually needed
someplace else? In that case the logical track position should be added
to the StreamInfo object (which is not what I did).

2. The DVD I was testing with gave me no result for the language code in
'AvFormatDecoder::ScanStreams', so internally always the 'Unknown
Language' was set for the audio streams.
I added a lookup via dvdnav for the language to get the correct result.

3. Problem 2 actually shadowed a bug in
'AvFormatDecoder::AutoSelectAudioTrack' which would stop the language
selection early if more than 1 language existed in the source.

4. Switching audio streams via OSD did not switch the state in
'DVDRingBufferPriv' accordingly so that if
'AvFormatDecoder::ScanStreams' got triggered, I ended up with the
initial audio stream from the DVD again.

The patch is against release0-22-fixes as I do not have a working
version of trunk set up yet. However I checked and at least it still
applies to trunk.

Please let me know in case of questions or if I should open a ticket for
these issues.

Best wishes,

Martin.
Attachments: dvdaudio.patch (2.59 KB)


robert.mcnamara at gmail

Nov 22, 2009, 11:39 AM

Post #2 of 3 (723 views)
Permalink
Re: [patch]: various audio selection problems with DVDs [In reply to]

On Sun, Nov 22, 2009 at 11:35 AM, Martin Kittel <linux [at] martin-kittel> wrote:

>
> 1. the order in which the audio streams are saved does not match their
> logical order on DVD because the audio streams get sorted by streamid in
> 'AvFormatDecoder::ScanStreams'. Due to this if one selects a track in
> the 'Select Audio Track' OSD (or in the DVD menu itself), a different
> audio track than the one selected will be played if the logical order
> and the order of stream ids does not match (in my case I had a mix of
> AC3 and DTS channels and due to the sorting the DTS channel was always
> last while it was the second logical track on the DVD according to dvdnav).
> I solved this by simply removing the sorting of the audio tracks. This
> is the one fix I am not certain about. Is the sorting actually needed
> someplace else? In that case the logical track position should be added
> to the StreamInfo object (which is not what I did).
>
> 2. The DVD I was testing with gave me no result for the language code in
> 'AvFormatDecoder::ScanStreams', so internally always the 'Unknown
> Language' was set for the audio streams.
> I added a lookup via dvdnav for the language to get the correct result.
>
> 3. Problem 2 actually shadowed a bug in
> 'AvFormatDecoder::AutoSelectAudioTrack' which would stop the language
> selection early if more than 1 language existed in the source.
>
> 4. Switching audio streams via OSD did not switch the state in
> 'DVDRingBufferPriv' accordingly so that if
> 'AvFormatDecoder::ScanStreams' got triggered, I ended up with the
> initial audio stream from the DVD again.
>
> The patch is against release0-22-fixes as I do not have a working
> version of trunk set up yet. However I checked and at least it still
> applies to trunk.
>

Hi Martin,

Thanks a lot for the hard work-- Would you mind opening some tickets
for these items at svn.mythtv.org? The player is largely the same in
trunk still, so hopefully if you are able to get them submitted in
tickets, someone can take a look soon.

I would break out each issue as a separate ticket and patch, as
several of these issues touch code maintained by different people.

Robert
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


linux at martin-kittel

Nov 22, 2009, 12:44 PM

Post #3 of 3 (722 views)
Permalink
Re: [patch]: various audio selection problems with DVDs [In reply to]

Hi Robert,

Robert McNamara wrote:
>
> I would break out each issue as a separate ticket and patch, as
> several of these issues touch code maintained by different people.
>

I created tickets #7638,#7639, and #7640 for the issues I found.
Hopefully I didn't break the patches in the process :-)

Best wishes,

Martin.
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.