[EMAIL PROTECTED] wrote: > > 1) DVB_DMX_START and DVB_DMX_STOP ioctls will globally work on any filters > attached to a single fd. I guess the advantage of keeping the DVB_DMX_STOP > ioctl is to reduce any time required to do an "open" on a new fd after you > did a "close". > > 2) To individually ADD & START a filter issue the DVB_DMX_ADD_PID_FILTER > ioctl with the DVB_DMX_IMMEDIATE_START flag set. > > 3) To START a group of filters at once, issue the DVB_DMX_START ioctl on > the required fd. > > 4) To STOP a group of filters (e.g. pausing), issue the DVB_DMX_STOP ioctl > on the required fd. > > 5) To individually STOP and remove a filter issue the > DVB_DMX_DEL_PID_FILTER ioctl. > > > OK, does this look reasonable?
Maybe it's just a matter of taste, but I think that sucks :-( o at open() time we don't know what the user is going to do with the new file descriptor, hence there isn't much overhead in open() / close(); all the work is in starting and stopping the filters o state handling in the driver *and* in the application will be more complicated when we have to deal with filters which are set but not started o if you want to start a number of filters at once, you might also want to stop then together (symmetry) 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? Johannes -- Info: To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as subject.
