Mailing List archive

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

[linux-dvb] is this correct?



prakash writes:
 > I am trying to read the streams from dvr with the new nokia api. the
 > tuning process is fine(?) as i get FE_HAS_SIGNAL(?). Then i set the demux
 > filters for audio and video. for this i open demux0(twice) and set them as
 > 
 > 	pesFilterParamsV.pid = vip;
 >         pesFilterParamsV.input = DMX_IN_FRONTEND;
 >         pesFilterParamsV.output  = DMX_OUT_TS_TAP;
 >         pesFilterParamsV.pesType = DMX_PES_VIDEO;
 >         pesFilterParamsV.flags   = DMX_IMMEDIATE_START;
 > and the same for audio.
 > ioctl(fd,DMX_SET_PES_FILTER, &pesFilterParams(A/V)) sets the filter
 > for recording i open dvr0 in read/write mode. Here the open operation
 > fails saying device or resource busy. what are the other settings to be
 > set up or am i making a very fundamental mistake during the setup?
 > any suggestions would be helpful.

Sorry, but I changed the behaviour of the DVR device a little bit.
You have to open it read-only or write-only now. There also were some
other changes to the API, e.g. a software frontend type can now be specified.
Let me explain why I did this:

When you are normally watching TV the demux driver talks to the 
kernel demux API with a hardware frontend attached.
But if you are decoding something from file you have to change this to a
software frontend, at least for the Siemens card because you cannot
send back a stream through the hardware demux.
Somehow you have to decide which frontend to use for the demux.
So, I change the frontend type according to the open mode (read or
write) of the DVR device.
Previously it was suggested to me to change to the software frontend
when a write() command was issued to the kernel demux API. But how 
exactly do I decide then if you want to read again?
How do I set the filters? Do the filters belong to an incoming or
outgoing stream? 
In the case of a card which can use the same hardware demux for
recording and playback this would of course be much simpler.

There are further complications if one wants to allow simultaneous
recording and playback. One would actually need two demux devices.
But what device numbers/names do they get. How do I know then which
kernel demux APIs and demux devices belong to which card if there 
are several?
Since the Siemens card does not allow this anyway I have not addressed
this problem yet.

Discussion of this and other problems on this list would be very welcome.
I will address all the changes I made to the API and add some sample
programs to the CVS tree after my vacation which ends on January 8th.

Best regards,
Ralph


--- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with unsubscribe as subject.



Home | Main Index | Thread Index