VIDIOC_S_CTRL with GStreamer

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

VIDIOC_S_CTRL with GStreamer

John Buckley
Hello,
I would like to set the V4L2 zoom and focus controls on a compatible camera while using a Gstreamer pipeline to stream video.

I see the documentation on how to get and set the controls using VIDIOC_G_CTRL & VIDIOC_S_CTRL commands but this assumes that you have opened a connection using v4l2-open and have a file handle to the v4l2 camera.

Can v4l2 commands to set control values be sent while a Gstreamer pipeline is active?

- John

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: VIDIOC_S_CTRL with GStreamer

yiliang
Hi John,

Yes, you can do this. You can open another file on the same device using following function, even if the device is already streaming video.

  fd = open (videoDevName, O_RDWR /* required */ | O_NONBLOCK, 0);

Usually it is allowed by the v4l2 driver, as long as you are not trying to stream video in the second opened instance.

Yiliang

On Fri, Mar 19, 2010 at 8:59 PM, John Buckley <[hidden email]> wrote:
Hello,
I would like to set the V4L2 zoom and focus controls on a compatible camera while using a Gstreamer pipeline to stream video.

I see the documentation on how to get and set the controls using VIDIOC_G_CTRL & VIDIOC_S_CTRL commands but this assumes that you have opened a connection using v4l2-open and have a file handle to the v4l2 camera.

Can v4l2 commands to set control values be sent while a Gstreamer pipeline is active?

- John

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: VIDIOC_S_CTRL with GStreamer

Clark, Rob
Note that there is also a device-fd property on v4l2src/v4l2sink that would allow access to the same file descriptor..

On Mar 20, 2010, at 1:50 AM, Yiliang Bao wrote:

> Hi John,
>
> Yes, you can do this. You can open another file on the same device using following function, even if the device is already streaming video.
>
>   fd = open (videoDevName, O_RDWR /* required */ | O_NONBLOCK, 0);
>
> Usually it is allowed by the v4l2 driver, as long as you are not trying to stream video in the second opened instance.
>
> Yiliang
>
> On Fri, Mar 19, 2010 at 8:59 PM, John Buckley <[hidden email]> wrote:
> Hello,
> I would like to set the V4L2 zoom and focus controls on a compatible camera while using a Gstreamer pipeline to stream video.
>
> I see the documentation on how to get and set the controls using VIDIOC_G_CTRL & VIDIOC_S_CTRL commands but this assumes that you have opened a connection using v4l2-open and have a file handle to the v4l2 camera.
>
> Can v4l2 commands to set control values be sent while a Gstreamer pipeline is active?
>
> - John
>


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: VIDIOC_S_CTRL with GStreamer

John Buckley
In reply to this post by yiliang
Yiliang,
I found a great example using the V4L2_CID_EXPOSURE control.  My problem is, I can't find any info on what headers to include that would define the V4L2_CID_ZOOM_RELATIVE, ABSOLUTE & CONTINUOUS controls.

Does anyone know where those CIDs are defined?
-Thanks in advance,
John Buckley

----- "Yiliang Bao" <[hidden email]> wrote:
> Hi John, Yes, you can do this. You can open another file on the same device using following
> function, even if the device is already streaming video.
> fd = open (videoDevName, O_RDWR /* required */ | O_NONBLOCK, 0);

> Usually it is allowed by the v4l2 driver, as long as you are not trying to stream video in the
> second opened instance.
>  -Yiliang



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: VIDIOC_S_CTRL with GStreamer

yiliang
John,

Try this header:
#include <linux/videodev2.h>

Yiliang

On Sun, Mar 21, 2010 at 8:38 PM, John Buckley <[hidden email]> wrote:
Yiliang,
I found a great example using the V4L2_CID_EXPOSURE control.  My problem is, I can't find any info on what headers to include that would define the V4L2_CID_ZOOM_RELATIVE, ABSOLUTE & CONTINUOUS controls.

Does anyone know where those CIDs are defined?
-Thanks in advance,
John Buckley


----- "Yiliang Bao" <[hidden email]> wrote:
> Hi John, Yes, you can do this. You can open another file on the same device using following
> function, even if the device is already streaming video.
> fd = open (videoDevName, O_RDWR /* required */ | O_NONBLOCK, 0);

> Usually it is allowed by the v4l2 driver, as long as you are not trying to stream video in the
> second opened instance.
>  -Yiliang



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel