Opened 18 years ago

Closed 18 years ago

#730 closed patch (fixed)

Add DTS passthrough support

Reported by: martin@… Owned by: danielk
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

This patch adds DTS passthrough support to complement the AC3 passthrough already present. It adds an extra option in settings, next to the one to enable AC3 since not all decoders support both.

In order for it to work myth must be linked against libdts. This is not really a new dependency since it is a dependency of libavformat and myth can already be built against libdts by using --enable-dts. Even with this patch libdts is still optional; if not provided, then there is no option to select DTS passthrough. The patch doesn't use any code from libdts, but libavformat will not recognise DTS streams without it.

If both are available and selected then DTS takes precedence over AC3 since it is higher quality.

Attachments (4)

mythtv-dtspassthru.patch (13.4 KB) - added by martin@… 18 years ago.
DTS patch against r8079
dts.patch (16.7 KB) - added by danielk 18 years ago.
update
mythtv-dtspassthru.2.patch (18.6 KB) - added by martin@… 18 years ago.
Updated DTS patch (not including Daniel's changes yet), against r8241
mythtv-dtspassthru.3.patch (21.8 KB) - added by martin@… 18 years ago.
Updated DTS patch, merged with Daniel's changes. Against r8268

Download all attachments as: .zip

Change History (9)

Changed 18 years ago by martin@…

Attachment: mythtv-dtspassthru.patch added

DTS patch against r8079

comment:1 Changed 18 years ago by Isaac Richards

Owner: changed from Isaac Richards to danielk

Changed 18 years ago by danielk

Attachment: dts.patch added

update

comment:2 Changed 18 years ago by danielk

Milestone: unknown

Can someone with AC3 and/or DTS passthrough test this?

For DTS need to make distclean and rerun configure, and libdts needs to be installed.

Also for either one they must be enabled in "Config->General" on the third pane.

DTS has priority over AC3, so if you have a DVD with both, you need to disable DTS passthough to test AC3.

comment:3 Changed 18 years ago by martin@…

Ah, I wish trac sent emails when attachments were added. I went and updated my patch to the new autoSelectAudioTrack code only to find when I come to attach it Daniel's already done the work! (In addition to other good changes.)

I'll attach it anyway because I think there's still a couple of other good bits in it. I'll make a new patch with the best from each and test it soon (unless Daniel beats me to it again).

One fix in this is to replace filter_codec with filter_max_ch predicated by codec_id. This is because quite a number of DVDs have only AC3 tracks, and the real track is not always first - eg. first track can be a 2 channel commentary. Much better to pick the AC3 track with the most channels, more likely to be the real one.

I've tested this with a couple of dozen DVDs and it almost always gets the right track first time. Still has language issues sometimes, but that's because libavformat is not picking the language up from AC3 and DTS tracks on DVD (always gets UnknownLanguage?). Something else I intend to look into.

Changed 18 years ago by martin@…

Attachment: mythtv-dtspassthru.2.patch added

Updated DTS patch (not including Daniel's changes yet), against r8241

Changed 18 years ago by martin@…

Attachment: mythtv-dtspassthru.3.patch added

Updated DTS patch, merged with Daniel's changes. Against r8268

comment:4 Changed 18 years ago by martin@…

I've merged Daniel's and my dts patches together. Tested and working on AC3 & DTS.

Some crucial parts of the original patch were left out of Daniel's version, those are back in now. There should be nothing extraneous.

This patch is better at selecting the right track than the current code in SVN since it always chooses the one with the most channels when no other criteria match.

comment:5 Changed 18 years ago by danielk

Resolution: fixed
Status: newclosed

(In [8275]) Closes #730, by applying patch (w/o avformat change).

Martin, see question in mythtv-dev for util.c change.

Note: See TracTickets for help on using tickets.