[mythtv] DVB Code Update

Ben Bucksch linux.news at bucksch.org
Wed Aug 27 16:52:17 EDT 2003

Kenneth Aafloy wrote:

>    - Nearly all of the changes Ben suggested
Thanks. I made further changes:

    * Called Open() from SetChannelByString()
    * Open() checks, if the stuff is already open
    * Still include problems. Please check that you include the header
      whenever you use a type in a file.
    * Added comment about ts_to_ps() code origin (I didn't mean to
      credit *me*, but the original author); adapted license version to
    * Code style
          o Removed most pointers
          o Replaced individual assignment of struct properties with
            assignment of whole struct (prev_params = tuning.params)
          o Used const QString& instead of QString function parameters
            for speed (avoids copying)
          o Moved out params to end in Tune*()
    * Changed OpenFilters()
          o Simplified code a bit IMHO
          o Was there a case when dvr_pids_next could have been <
            dvr_pids.size()? If so, I think you wouldn't have closed the
            old devices. I now CloseFilters() at the beginning of
            SetDemuxFilters() and got completely rid of dvr_pids_next.
    * Fixed PID filtering
      |dvb_dvr_pid_t *curpid = dvr_pidmap[pid]; if (curpid == NULL)|
      doesn't work (to my knowledge) - if pid wasn't in the map, it gets
      *added*, and the new pointer is random, not NULL. Use find() to
      check the existance of a map member, see

I found the large number of types in dvb_types.h a bit hard to deal with 
(have to look up all the time), but oh well.

Code compiles, but is otherwise untested (lack of card...). Could you 
please test that I broke nothing?

Further comments:

    * Would be nice, if you could fix the warnings in dvbsections/dvbcam.
    * You probably broke support for OLDSTRUCT, but that's OK. People
      should upgrade drivers, then.
    * I think the only function from dvbdev.h that you still use is
      devicenodename(). Maybe you can drag that into dvbrecorder.cpp or
      somewhere else appropriate, then we can get rid of the horrible
      dvbdev.c/h completely and only use the verbatim transform.h and co
      from mpegtools. We can remove tune.c/h (from dvbstream) as well, I

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dvb-alpha-0.3.tar.bz2
Type: application/octet-stream
Size: 8595 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20030827/8125757f/dvb-alpha-0.3.tar.obj

More information about the mythtv-dev mailing list