[mythtv] WinTV USB works with mplayer but not with mythtv

Devin Heitmueller devin.heitmueller at gmail.com
Tue Jan 26 18:22:00 UTC 2010


On Tue, Jan 26, 2010 at 1:11 PM, Volker Fischer
<v.fischer at nt.tu-darmstadt.de> wrote:
> Hi,
>
> I have an external WinTV USB tv card which works under Ubuntu with mplayer
> but not with mythtv.
>
> Doing some research I found out that the problem is in
> "NuppelVideoRecorder.cpp" in the function "void
> NuppelVideoRecorder::DoV4L2(void)". The number of buffers must always be 5
> ("int numbuffers = 5;" and "if (vrbuf.count < 5)") but with my card the call
> to "ioctl(fd, VIDIOC_REQBUFS, &vrbuf)" results in vrbuf.count is equal to 3.
>
> Disabling the buffer length check, I get a segmentation fault in
> "yuyvtoyuv420_MMX2" from "libmythswscale-0.22.so.0". Disabling the line
> "myth_sws_img_convert(&img_out, PIX_FMT_YUV420P, &img_in, PIX_FMT_YUYV422,
> w, h);" resolves the segmentation fault issue but, of course, I only get a
> picture filled with some random noise at the mythfrontend.
>
> Is there an easy way to do the scaling with only 3 buffers? I do not really
> understand whats going on in all these scaling functions so I really need
> some help here.

I cannot say I am surprised.  I have seen more than one case where the
NuppelVideoRecorder makes vl42 calls designed to negotiate a set of
parameters, but then never looks at the resulting struct.  For
example, if you specify a height/width and the driver returns a
different height width (for example, if you specify 480x480 and the
driver doesn't have a scaler and only supports 720x480), then
application never notices and the image will be stretched.

I haven't had the cycles to do it myself yet, but someone really
should take a pass over those calls and account for the case where the
driver returns success but also comes back with a different set of
parameters than what the application asked for.

Devin

-- 
Devin J. Heitmueller
http://www.devinheitmueller.com
AIM: devinheitmueller


More information about the mythtv-dev mailing list