Mailing List archive

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

[linux-dvb] Re: Adding V4L interface to budget cards



Michael Hunold wrote:
> Hello Rene,
> 
>> after reading documentation of new FFMPEG 0.4.6 I got the idea to add a
>> libavfomat-based V4L-device to the DVB-driver, which decodes TS to 
>> standard
>> YUV (or whatever is used on the V4L-interface).
>>
>> This would allow programs like XawTV to watch TV without having a own
>> MPEG-TS decoder. Standard TV-software could handle the DVBs like a 
>> analogue
>> TV-card (except tuning-parameters, of course).
>>
>> Comments?
> 
> 
> Bad idea -- you basically just move around the MPEG-TS decoder from 
> userspace to kernel space, which is generally a "bad idea"[tm].

I'm not too sure about this...


> The decoding is time-consuming and sometimes error-prone, so you better 
> leave it in user-space, really. You would have to deal with far too much 
> stuff in that poor little kernel module...
> 
> Why don't you use something like this to watch tv?
>  > cat /dev/dvb/adapter0/dvr0 | ts2ps 0 0 | mplayer -

Have you ever thought about the overhead of kernel/userspace copies, the 
impossibility to use DMA for memory transfers and how hard it is getting 
usually to use hardware acceleration units where available? Modern STB 
processors are different from the PC processors you know, have you ever 
tried to use an onchip DSP to support decoding?


> It gives you the same functionality as using "xawtv"...
> 
>> Rene
> 
> 
> What you could do, however, is use "fusd":
> http://www.circlemud.org/~jelson/software/fusd/
> 
> Quote from their homepage:
> 
>  > FUSD (pronounced fused) is a Linux framework for proxying device file
>  > callbacks into user-space, allowing device files to be implemented by
>  > daemons instead of kernel code. Despite being implemented in
>  > user-space, FUSD devices can look and act just like any other file
>  > under /dev which is implemented by kernel callbacks.
> 
> So you could basically put the "ts2ps" and ps-to-yuv/rgb conversion into 
>  a fusd-driver and provide a Video4Linux-compatible /dev/video device 
> like this, if you really want to.

This would introduce a significand overhead for kernel/userspace 
communication and context switches. Remember the amounts of data for 
digital video and that today's STB processors are still running at 
speeds between 66MHz and a little above 200MHz...

Holger



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



Home | Main Index | Thread Index