Mailing List archive

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

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






> I would prefer to:

> - pass an array of PIDs to ADD/DEL
> - remove the DVB_DMX_IMMEDIATE_START, DVB_DMX_START and DVB_DMX_STOP
ioctls

> While I don't think that it's important for me to set a number of
> filters at exactly the same time, this would simplify error handling
> because we can make setting all filters together either succeed or fail
> (atomicity).

> I think this a simple and efficient API. Don't you?

Right, let's run this through with an example.  Say you want to record BBC1
and then BBC2 later and then stop recording BBC2 and record BBC3 instead...

1. Open up an fd on the demux device and use the DVB_DMX_ADD_PID_FILTER
ioctl passing in the PIDs of the video,audio and subtitle streams of BBC1.
Immediately the PID filters will be activated and start filtering data to
the h/w buffers.  In this instance, the DVB_DMX_SET_PID_FILTER ioctl isn't
used, but we should still have it to cater for individual streams on
individual fds. Right?

2. A while later the user decides to record BBC2.  The
DVB_DMX_ADD_PID_FILTER ioctl is then issued with the A/V/S PIDs of BBC2.
Again, the filtering starts immediately and the user is happy.

3. The user decides that BBC2 is not worth recording now, but insanely
decides to record BBC3.  A DVB_DMX_DEL_PID_FILTER ioctl needs to be issued
with the PIDs of the BBC2 stream that was previously being recorded.  This
ioctl will STOP and remove and PID filters specified.

Q: What about BBC2 data left in the circular buffer after the
DVB_DMX_DEL_PID_FILTER is issued?  We can't flush the global circular
buffer otherwise we lose the data relevant to BBC1.  Should the
DVB_DMX_DEL_PID_FILTER then wait until all the data in the buffer is
consumed before actually stopping/removing the filter?

4. The DVB_DMX_ADD_PID_FILTER ioctl is then issued with the required PIDs
for BBC3 and recording of this starts immediately.

Keeping the DVB_DMX_SET_PID_FILTER ioctl allows a single filter to be setup
easily.  Also, it allows you to change the filter spec without having to
issue a DEL PID filter/ADD PID filter ioctl pair.  Issuing the SET PID
filter ioctl on an already running filter would first STOP the filter,
change its filter spec and restart it immediately.  It would also keep
consistency with the DVB_DMX_SET_SID_FILTER and DVB_DMX_SET_SECTION_FILTER
ioctls.  With this latter ioctl you could setup a section table filter,
when that filter is received you could change the filter spec using
DVB_DMX_SET_SECTION_FILTER to only accept the table if the version number
has changed.

Right, I have spoken with our app developers and they don't seem to have
any issues regarding this one-for-all setup and run ioctl
(DVB_DMX_ADD_PID_FILTER).  However, for some strange reason some of our
customers do setup filters without running and then issue the START ioctl.
They claim they get faster channel changes, but I can't comment on this as
I haven't seen their s/w.

I don't mind which way we go as long as the requirements are met - which I
believe they are.

Cheers,

Rob :^)






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



Home | Main Index | Thread Index