[mythtv-commits] Ticket #5619: pvrusb2 only produces empty files
MythTV
mythtv at cvs.mythtv.org
Wed Aug 13 13:34:54 UTC 2008
#5619: pvrusb2 only produces empty files
--------------------------------+-------------------------------------------
Reporter: mythdev at telfort.nl | Owner: ijr
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: mythtv | Version: unknown
Severity: medium | Mlocked: 0
--------------------------------+-------------------------------------------
Yesterday I added a Hauppauge pvrusb2 tuner to my MythTV backend. It was
correctly recognized by the drivers and "cat /dev/video1 > test.mpg"
produced a watchable file. (My /dev/video0 belongs to my pvr150 capture
card (using the ivtv driver))
Unfortunately MythBackend does not handle the pvrusb2 very well:
{{{
[...]
2008-08-13 12:40:21.695 Scheduled 52 items in 0.3 = 0.01 match + 0.30
place
2008-08-13 12:40:21.700 TVRec(2): ASK_RECORDING 2 0 0 0
2008-08-13 12:40:21.834 TVRec(2): Changing from None to RecordingOnly
2008-08-13 12:40:21.838 TVRec(2): HW Tuner: 2->2
2008-08-13 12:40:21.985
Not ivtv or hdpvr driver??
2008-08-13 12:40:21.995 AutoExpire: CalcParams(): Max required Free Space:
3.0 GB w/freq: 15 min
2008-08-13 12:40:21.998 Started recording: Sporza "Olympische Spelen":
channel 1001 on cardid 2, sourceid 1
2008-08-13 12:40:22.088 MPEGRec(/dev/v4l/video1) Warning: Can't enable VBI
recording (3)
[...]
2008-08-13 12:59:36.034 Current Schema Version: 1223
2008-08-13 12:59:36.036 New DB connection, total: 2
2008-08-13 12:59:36.038 Connected to database 'mythconverg' at host:
server1
2008-08-13 12:59:36.046 Preview Error: Previewer file
'/mnt/store/1001_20080813124000.mpg' is not valid.
2008-08-13 12:59:36.049 Preview Error: Run() file not local:
'/mnt/store/1001_20080813124000.mpg'
2008-08-13 12:59:36.056 Preview Error: Preview process not ok.
[...]
}}}
I located the "Not ivtv or hdpvr driver??" message in the mpegrecorder.cpp
file. Because the driver is not recognized, the buffersize is also never
set. The following patch seems to resolve this issue for me.
{{{
Index: libs/libmythtv/mpegrecorder.cpp
===================================================================
--- libs/libmythtv/mpegrecorder.cpp (revision 18141)
+++ libs/libmythtv/mpegrecorder.cpp (working copy)
@@ -399,9 +399,17 @@
bzero(_pid_status, sizeof(_pid_status));
memset(_continuity_counter, 0xff,
sizeof(_continuity_counter));
}
+ else if (driver == "pvrusb2")
+ {
+ bufferSize = 4096;
+ usingv4l2 = true;
+ has_v4l2_vbi = true;
+ has_buggy_vbi = true;
+ requires_special_pause = false;
+ }
else
{
- VERBOSE(VB_IMPORTANT, "\n\nNot ivtv or hdpvr driver??\n\n");
+ VERBOSE(VB_IMPORTANT, LOC + QString("\n\nNot ivtv, pvrusb2 or
hdpvr driver??\n\n (%1)").arg(driver));
usingv4l2 = has_v4l2_vbi = true;
has_buggy_vbi = requires_special_pause = false;
}
}}}
But it might even be better to set the buffersize in the constructor of
the mpegrecorder.
{{{
$ mythbackend --version
Please include all output in bug reports.
MythTV Version : 18141M
MythTV Branch : trunk
Library API : 0.22.20080812-1
Network Protocol : 40
QT Version : 4.4.1
Options compiled in:
linux release using_alsa using_backend using_dvb using_frontend
using_ivtv using_v4l using_x11 using_xv using_bindings_perl
using_bindings_python using_opengl using_ffmpeg_threads
}}}
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/5619>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list