[mythtv] DVB Code Update

Kenneth Aafloy ke-aa at frisurf.no
Wed Aug 27 10:22:03 EDT 2003

Ben Bucksch wrote:

> That's a lot better than the earlier versions. A few comments (I haven't 
> read through all the code):
>         perror("DVBChannel ERROR: Opening DVB frontend device failed!\n"\
>                 "\tThe error was");
>         exit(-1);
> roughly like the patch I posted a few days ago.
> Similarily, call dvbrecorder's CloseFilters in its Close().


>         if ( dvr_pids_size >= dvr_pids.size() )
> Make this dvr_pids_next, please, because that's how it's used (I had 
> problems to read that code because of that).


>     dvb_channel_t   dvbchannel;
> In dvbchannel.h, you use that type, but never define it. It only happens 
> to compile, because you include the necessary header in all files where 
> you include the dvbchannel.h. Include dvbtypes.h in dvbchannel.h and use 
> #ifndef DVBTYPES_H guards as usual.


>                             struct dvb_ofdm_parameters *p)
> Better use a reference for out params, not a pointer.


>             dvr_pids.push_back(new dvb_dvr_pid_t);
> No need to use a pointer.
>     cam = new DVBCam(cardnum, sections);
> (in the constructor)
> FYI, you could also get rid of those pointers by using the following:
>     DVBChannel&     channel;
>     DVBSections     sections;
>     DVBCam          cam;
> DVBRecorder::DVBRecorder(DVBChannel& aDVBChannel)
>           : RecorderBase(),
>             channel(aDVBChannel),
>             cardnum(0),
>             sections(),
>             cam(cardnum, sections)
> but I guess the pointers are OK in this case.
>     if (name == "cardnum")
>         cardnum = value;
> Notify the CAM class about this. As-is, the CAM stuff only works on the 
> first card (see above).


>         prev_params.u.ofdm.code_rate_HP != 
> tuning->params.u.ofdm.code_rate_HP ||
>         prev_params.u.ofdm.code_rate_LP != 
> tuning->params.u.ofdm.code_rate_LP ||
>         (and so on)
> prev_params.u.ofdm != tuning->params.u.ofdm or even prev_params != 
> tuning doesn't work?

That won't work on structs.
I guess a memcmp would suffice.


More information about the mythtv-dev mailing list