Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Linux DVB API 4 Q's



Ralph Metzler wrote:
> Rob.McConnell@Zarlink.Com writes:
>  > How should we treat the DVB_DMX_START and DVB_DMX_STOP ioctls for an fd
>  > that has many PID filters associated with it?  Should these ioctls START
>  > and STOP all filters attached to the fd simultaneously, or would it be
>  > better to single out specific filters to START and STOP.  The advantage of
>  > allowing this independent control could be for recording multiple PES to a
>  > hdd for example.  If the user is recording BBC1 and BBC2 to a hdd for
>  > example, and then decides to stop recording BBC2 and record BBC3 instead,
>  > then we wouldn't want to have any break in the recording of BBC1.  We could
>  > issue a DVB_DMX_STOP ioctl on the filters associated with BBC2 (by their
>  > PID value), remove the filters using the DVB_DMX_DEL_FILTER ioctl and then
>  > add new ones using DVB_DMX_ADD_FILTER with the flag set to
>  > DVB_DMX_IMMEDIATE_START or using the DVB_DMX_START ioctl on the specific
>  > pid value associated with the fd.
>  > 
>  > So both DVB_DMX_START and DVB_DMX_STOP ioctls in this case would have to
>  > have a handle to the filter required.  In this case, why not specify the
>  > pid value as in the proposition for the ADD/DEL ioctl above?
> 
> For the ADD/DEL ioctl I agree. For the application you are
> describing using one fd for each channel might make more sense. This
> way, you setup the PIDs for each channel on separate fds and can
> start/stop them all at once. You will also already get the packets for
> each channel in separate buffers (or do you want them in one big TS?).

Exactly my thinking. In the V4 dmx.h I have:

//FIXME: necessary? relationship to set filter?
#define DVB_DMX_START _IO(DVB_IOCTL_BASE, 0x28)
#define DVB_DMX_STOP  _IO(DVB_IOCTL_BASE, 0x29)

The reason for the FIXME comment is: I never ever used a filter without
the DVB_DMX_IMMEDIATE_START flag, i.e. DVB_DMX_START is superflous.

The reason for the other FIXME for DVB_DMX_IMMEDIATE_START: If we have
DVB_DMX_START, it's superflous; if we don't, it's superflous, too.
Tell me if you think different.

Also, DVB_DMX_STOP is superflous because you can just close the fd.

OK, one reason to have DVB_DMX_START would be:
- setup many filters on one fd
- then start them all at the same time, ensuring that the recorded
  stream starts properly muxed and not e.g. with just video before the
  audio filters kick in

Another reason to have START/STOP would be for temporarily pausing
all filters on a fd and later resume. Like I said, I never needed that.

Tell me what you think about it.


Johannes


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index