[mythtv] [PATCH] Automatically set freqid for HDTV

bill peck bill.peck at gmail.com
Thu Dec 9 15:09:25 UTC 2004


Am I missing something on the channel <major><minor> part?  What if I
have the following channels:

hdtv channel 2 subchannel 1
ntsc channel 21

Won't both of these channels be channel 21?

On Thu, 09 Dec 2004 08:28:11 -0500, Doug Larrick <doug at ties.org> wrote:
> The attached patch fixes a longstanding difficulty in setting up an HDTV
> Myth box, namely that you needed to go in and manually set the freqid
> field in your database as appropriate for each of your stations.  This
> information is provided by datadirect, and thanks to Daniel's recent
> work in the HDTV recorder, it was easy to add the functionality to use it.
> 
> User summary: If you use HDTV, you need to run mythfilldatabase after
> applying this patch or you may get the wrong subchannel for some of your
> channels.  New channels added to your Zap2it lineup will be
> automatically added, with a channel number (what you type on the remote)
> that's <channelmajor><channelminor> (with no dash).
> 
> There are two parts of this patch that might require some discussion
> before commiting:
> 1. Mythfilldatabase now always fills in the freqid field from
> DataDirect.  If Zap2it has this wrong, you won't be able to tune that
> channel.  This applies to NTSC as well as ATSC stations.
> 2. Because we're tuning ATSC by channel minor number now rather than
> program number (see below), it can take up to an additional 400 ms to
> tune an HD station.  This delay is while we wait for a TVCT, which is
> the table that associates the two.  The plus side is that we will
> automatically adjust if this changes.  The proper way to fix this is to
> do PID caching (see below also).
> 
> Here's what's changed:
> * The DataDirect grabber now grabs the channelMinor field into its
> temporary tables.  I also fixed a bug in the handling of fccchannelnumber.
> * mythfilldatabase fills in the freqid field in the database's channel
> table based on the data from zap2it.  For normal NTSC stations, this is
> the same as channel.  For ATSC stations, it's
> "<fccchannelnumber>-<channelMinor>".  For new ATSC channels, it also
> fills in the channel number as described above.
> * hdtvrecorder waits for a TVCT (Terrestrial Virtual Channel Table) and
> uses it to fill in the desired program, rather than taking the desired
> program directly from the database.  This is progress, because (a) the
> subchannel (minor channel) is user-visible in "normal" HDTV tuners and
> the program number is not, (b) we can get this number from zap2it (and
> can't get the program number), and (c) stations can change their program
> numbers without notice.
> * a few edits to make Daniel's FAKE_VIDEO support possible to use on a
> system without a tuner card at all
> * a few tabs-to-spaces conversions
> 
> PID caching:
> The ultimate result of parsing the control tables in ATSC (and DVB) is a
> set of video, audio, and other PIDs in the TS stream to process and/or
> pass through to the recording on disk.  This set of PIDs typically
> remains constant for a given channel, and so storing it in the database
> would speed up tuning; if it's wrong, you will find out once the control
> tables do come along.  DVB in Myth already implements PID caching,
> though IIRC the database format is currently being revised.  There's no
> reason why HDTV can't piggyback onto the same PID caching methods once
> they're stabilized (or now, if I'm misremembering).
> 
> -Doug
> 
> 
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
> 
> 
> 
> 


-- 

Bill Peck
http://www.pecknet.com


More information about the mythtv-dev mailing list