[mythtv-users] AC3 and/or S/PDIF (again)
Michael T. Dean
mtdean at thirdcontact.com
Fri Jan 20 21:23:35 UTC 2006
On 01/20/2006 02:21 PM, William Lewis wrote:
>> >How 'bout simply disabling 'use video as timebase' at run-time when
>> passing
>> >raw AC3, regardless of what 'use video as timebase' is set to.
>> >
>> >
>> Yeah. That's what I was trying to say (that's why I compared it to the
>> runtime disabling of AC-3 passthrough with timestretch and why I said,
>> "[if] there's an AC-3 stream"). Guess I should have used that
>> all-important word, "runtime," though.
> I've never posted a patch to this list before, but how does this look,
> and, if the answer is "Good", then what do I do with it?
Pretty close... ;)
The diff should be created as a "unified" diff (using the "-u" option
for diff). This way, it will contain the names of the modified files as
well as some "contextual" information that can be used to merge the
patch even if the line numbers are not exact (i.e. if the version in SVN
is changed between the time when you create your patch and when it's
applied).
The easiest way to get a proper unified diff is to use SVN to create it
for you. Simply check out (or update to) the current revision of SVN,
make changes as required, and--from the top-most directory of the
project (i.e. the "mythtv" directory you checked out), execute:
svn diff > ../mythtv-disable_timebase_for_passthrough.patch
But note that it will create a patch that contains *all* the differences
between your working copy and the SVN revision of your working copy.
Therefore, you should either make sure you modify a clean working copy
or be prepared to edit your diffs (but, please test the diff if you hand
edit--it's easy to break a diff with a bad edit or to accidentally
remove important parts of your change, etc.).
That being said, it looks like your patch will unnecessarily disable
video as timebase in some situations (although, not knowing exactly
where this change is supposed to be made, I'm not sure). If
AC3PassThru/DTSPassThru and UseVideoTimebase are both enabled,
UseVideoTimebase will always be disabled, but really should only be
disabled if the audio stream is determined to be AC3 (or DTS)--that way,
recordings with PCM or MP2/3 audio can still be played back with
UseVideoTimebase. And, lastly, we should probably log a message that
UseVideoTimebase is being disabled because of pass through (at least for
something like -v playback (is that the proper log level?)).
If you're still interested in working on it, once you get a good unified
diff, you can post it in a new ticket on Trac ( http://svn.mythtv.org/
). See also http://svn.mythtv.org/trac/wiki/TicketHowTo . Note,
though, that it doesn't hurt to post to the lists first if you have
questions about the implementation of your patch (like you did this
time). If your patch is perfect when entered into Trac, it's more
likely to be applied quickly and it saves the developers time (so they
can make Myth even better for all of us). :)
Mike
More information about the mythtv-users
mailing list