Am 18.01.2012 05:56, schrieb avadhut chaudhari:
> Thanks a lot !!!
> Really Helpful Information.. Do you have any idea about Webcam? What
> changes I need to make for Webcam and gstreamer combination ?
this patch i wrote some time ago might help:
Hi
i haven't found any better place for this on the OpenCV homepage, so i'm
posting this to the list. if there is a more appropriate place, please
tell me.
as i was experiencing problems with the V4L2 backend for my USB webcam
(couldn't grab a frame), i changed the gstreamer backend to support
webcams and compiled without v4l2 support. i also fixed some bugs (at
least they appeared to me like that: i have no experience with gstreamer
at all, but stuff didn't work and now it works ;) ).
i've attached the patch for openCV 2.3.0
i'd be glad if you would integrate this patch into the main openCV
development line, and also to get some feedback from you
My changes are:
* add support for V4L2 (not for V4L) webcams in the gstreamer backend
* bugfix: the GstCaps* caps is expected to be NULL when unallocated,
but wasn't. now it's inited to NULL
* bugfix: when changing caps, caps must be made writable (that is,
*caps is copied, changed, caps becomes the pointer to the newly
allocated struct, the old is unneeded and gets unreferenced),
otherwise changes don't take effect
* bugfix: when changing caps, disconnecting and reconnection with
filtered caps only works once. when disconnecting again, this
(silently :( ) fails, because internally, there is a GstCapsFilter
inserted, which confuses unlink; i've changed the code so there is
a dedicated, explicit GstCapsFilter which can be changed during
runtime
i'd be glad if you could add a hint to the head of the source file
(below the "Author: Nils Hasler"), saying that i (Florian Jung) added
support for V4L2 devices and fixed some bugs
again: if this is not the appropriate place, please tell me.
if you have accepted or rejected the patch, please also tell me.
(and leave the subject intact, my email filter uses the subject ;) )
greetings
flo
Attachment(s) from Florian Jung
1 of 1 File(s)
opencv230.patch
<
http://xa.yimg.com/kq/groups/1986690/1014822208/name/opencv230%2Epatch>
<mailto:
[hidden email]?subject=Re%3A%20patch%20adding%20webcam%20support%20to%20gstreamer%20backend>