Hi Laurent, On Sat, Jul 11, 2009 at 3:44 AM, Laurent Pinchart - Hide quoted text - <[email protected]> wrote: > > Hi Vivek, > > On Thursday 09 July 2009 09:19:39 Vivek Bardia wrote: > > Hi Laurent, > > > > On Thu, Jul 2, 2009 at 5:03 AM, Laurent > > > > Pinchart<[email protected]> wrote: > > > Hi Vivek, > > > > > > On Friday 26 June 2009 10:26:07 Vivek Bardia wrote: > > >> On Fri, Jun 26, 2009 at 1:26 AM, Laurent Pinchart wrote > > >> > > >> > On Monday 22 June 2009 14:23:21 Vivek Bardia wrote: > > >> > > Hello Laurent, > > >> > > > > >> > > With respect to the mail chain below, > > >> > > Would you be able to help me with regards to Multiple streaming > > >> > > interfaces. > > >> > > > > >> > > Firstly how much effort could be required to bring up the UVC driver > > >> > > to support multiple streaming interfaces and MPEG2-TS support ? In > > >> > > case it is simple and already available, will you be able to provide > > >> > > that patch so that I am able to test it with the hardware and get > > >> > > back about the same ? > > >> > > > >> > Multiple streaming interfaces and MPEG2-TS are different requirements. > > >> > Supporting multiple interfaces will require restructuring a good deal > > >> > of the driver. I started working on that a week or two ago but had to > > >> > stop for a moment (if you can send me a few hours of free time by > > >> > e-mail I'll appreciate that). I should have some time this weekend or > > >> > early next week to prepare a patch. > > >> > > >> Although I cannot send you free time by email, but can help you in > > >> this regard in case you need help. I do not want to add more overhead > > >> and confusion in case you are already working on it. > > >> > > >> > I haven't really looked into what needs to be changed for MPEG2-TS > > >> > support. I don't expect it to be very difficult. I'll probably work on > > >> > that over the weekend. > > >> > > >> Just one more thing, With regards to MPEG2-TS its just adding the > > >> parsing support, if I am not wrong? > > > > > > Some changes might be required on the video streaming code as well. > > > Streaming parameters negotiation will have to be modified too to support > > > MPEG2-specific. parameters. > > > > Thank you for the quick response from your end for adding support for > > Multiple streaming interfaces. > > You're welcome. > > > Due to some unexpected delay at my end in getting the device, I have > > not been able to test the patch you had sent. > > > > Meanwhile I am trying to emulate such a device by duplicating > > descriptors of a available normal UVC device. I will share the details > > once I am done. > > Ok. > > > Meanwhile I am also trying to add support for MPEG2 - TS, Here are the > > few places which I thought would require update in the UVC driver code > > > > a.) uvc_driver.c - Format parsing support for Stream based payloads, > > MPEG2-TS payload > > That should be easy. You will have to modify the uvc_format structure to add > MPEG2-TS specific fields (rearrange the existing fields using unions like in > uvc_entity). > > As stream-based formats don't have frame descriptors, you will also have to > walk through the driver and modify code that assumes each format has at least > one frame descriptor. You could work around that by creating a dummy frame > descriptor, like for the DV format, but I think it's now time to get rid of > the "at least one frame per format" requirement. > I have added simple parsing support for MPEG2-TS format and works fine with the device as of now. I have created a dummy frame for now.
> > b.) uvc_video.c - parameters negotiation, VS Interface Control > > Selectors support. > > VS controls (I suppose you're talking about the "generate key frame" and > "update frame segment" controls) should be easy to support. They might require > new V4L2 controls though. Parameters negotiation will be handled through V4L2 > controls, so that might require a rework of the current control handling code. > Not Supported by the device as of now. > > c.) video streaming code to handle MaxVideoFrameSize, BmFramingInfo ? > > this is the part I am bit jittery about. > > I don't think that will be too difficult. Or maybe I don't see the difficulty > yet :-) With respect to the handling of dwMaxVideoFrameSize, According to the UVC 1.1 specifications this field can be ignored if bmFramingInfo bits is not enabled. This is for a MPG2-TS stream. But then in this case, the device returns dwMaxVideoFrameSize, dwMaxPayloadTransferSize to be 0. uvc_alloc_buffers call in VIDIOC_REQBUFS ioctl and uvc_alloc_urb_buffers call in uvc_init_video_isoc will always fail as dwMaxVideoFrameSize will be 0. In case I give it a hard-coded value for both, the DQBUF happens only once and then select function blocks on the file descriptor. I am using the V4L2 video capture example( http://www.linuxtv.org/downloads/video4linux/API/V4L2_API/spec-single/v4l2.html ). Could you guide us on how to proceed from this point. > > Best regards, > > Laurent Pinchart > Best regards, Vivek _______________________________________________ Linux-uvc-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
