Re: About MPEG decoder interface

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

 



On Friday 22 January 2010 18:11:48 Manu Abraham wrote:
> On Fri, Jan 22, 2010 at 8:42 PM, Hans Verkuil <hverkuil@xxxxxxxxx> wrote:
> > On Friday 22 January 2010 04:00:53 Andy Walls wrote:
> >> On Fri, 2010-01-22 at 10:42 +0800, Michael Qiu wrote:
> >> > Hi all,
> >> >
> >> >   How can I export my MPEG decoder control interface to user space?
> >> >   Or in other words, which device file(/dev/xxx) should a proper
> >> > driver for mpeg decoder provide?
> >>
> >> The MPEG decoder on a PVR-350 PCI card provides a /dev/video interface
> >> (normally /dev/video16).
> >>
> >> The interface specification to userspace is the V4L2 API:
> >>
> >> http://www.linuxtv.org/downloads/video4linux/API/V4L2_API/spec-single/v4l2.html
> >
> > Not really. The v4l2 API specifies the MPEG encoder part, but not the decode
> > part.
> >
> > The decoder part is (unfortunately) part of the DVB API.
> >
> > Some ioctls are documented here:
> >
> > http://www.linuxtv.org/downloads/v4l-dvb-apis/ch11s02.html
> >
> > However, that documentation is very out of date and you are better off looking
> > in the include/linux/dvb/video.h header.
> >
> > In particular the new struct video_command and associated ioctls provides
> > you with more control than the older VIDEO_CMD_ ioctls.
> >
> > Note that the V4L2 API will get a new event API soon that should supercede the
> > event implementation in this video.h. The video.h implementation is pretty
> > crappy (most of what is in there is crappy: poorly designed without much thought
> > for extendability).
> >
> >> >   And, in linux dvb documents, all the frontend interface looks like
> >> > /dev/dvb/adapter/xxx, it looks just for PCI based tv card.
> >> >   If it's not a TV card, but a frontend for a embedded system without
> >> > PCI, which interface should I use?
> >
> > V4L2, but with the ioctls defined in dvb/video.h. See for example the ivtv
> > driver (ivtv-ioctl.c).
> 
> 
> For a DVB STB, you don't need to use V4L2 in anyway.. It doesn't make
> sense either... 

Depends on the hardware. If there are no V4L2 features that need to be supported,
then you are correct. But if the hardware functions more as a video output device
which can also do MPEG decoding, then the MPEG decoder ioctls should be implemented
by the V4L2 device.

To be honest, MPEG decoding should have been a V4L2 feature from the beginning. It
really has nothing to do with DVB as such.

> The presentation/scaler used with V4L2 is pretty much 
> legacy code.

Huh? Not sure what you mean here.

> For STB's generally DirectFB is used to give full 
> control.

There are usually two parts: one is a framebuffer device for the OSD, and one is
a (possibly V4L2) device node to do the MPEG decoding that support the video.h
API.

Regards,

	Hans

> 
> Regards,
> Manu
> 
> 



-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG
--
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

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux