Hi,
I'm currently trying to replay a transport stream from a file, having
read through the v3 API docs and this mailing list I'm fairly certain I
have a good understanding of how to do this. I am however using the
test_dvr_play test program from the dvb-apps suite rather than writing
my own code, I have the latest version of dvb-apps from hg as of today.
The dvb hardware which I'm using is a Hauppauge Nova-T usb stick version
3, so thats the DIB7070p tuner and I'm using it with the 2.6.31 kernel
from kernel.org. I've got that working perfectly fine, I can watch tv,
stream to disk and stream a multiplex to disk without issue. The problem
is that if I try to open dvr0 for writing then I get an Error 22
(Invalid Argument). I've looked through the list archives and I've found
similar issues before with no resolution, with this
http://www.linuxtv.org/pipermail/linux-dvb/2008-June/026661.html being
the most recent and most comprehensive I think. This error happens if I
try to cat a ts file into dvr0 or if I run test_dvr_play as follows:
# DVR=/dev/dvb/adapter0/dvr0 DEMUX=/dev/dvb/adapter0/demux0 \
./test_dvr_play /srv/nfs/dave.ts 0x191 0x192
Playing '/srv/nfs/dave.ts', video PID 0x0191, audio PID 0x0192
Failed to open '/dev/dvb/adapter0/dvr0': 22 Invalid argument
I've looked into the test_dvr_play source and it is trying to open dvr0
for writing:
if ((dvrfd = open(dvrdev, O_WRONLY)) == -1) {
Now I've looked into the driver code and this appears to be an issue in
drivers/media/dvb/dvb-core/dmxdev.c specfically in the dvb_dvr_open
routine, from following the code through I've determined that it's
failing because it can't get a frontend (ie dvbdemux->frontend_list is
empty) when it calls get_fe (line 169 of dmxdev.c) in the following
section of code
if ((file->f_flags & O_ACCMODE) == O_WRONLY) {
dmxdev->dvr_orig_fe = dmxdev->demux->frontend;
if (!dmxdev->demux->write) {
mutex_unlock(&dmxdev->mutex);
return -EOPNOTSUPP;
}
front = get_fe(dmxdev->demux, DMX_MEMORY_FE);
if (!front) {
mutex_unlock(&dmxdev->mutex);
return -EINVAL;
}
dmxdev->demux->disconnect_frontend(dmxdev->demux);
dmxdev->demux->connect_frontend(dmxdev->demux, front);
}
I'm now wondering if anyone could shed some light on why it's failing
here and specifically why if I'm trying to avoid using the frontend by
writing in my own TS, it would fail on account of not being able to get
a frontend. Should test_dvr_play be setting up a frontend first before
attempting to open dvr0?
Thanks,
Phil
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html