controlling camerabin

Thiago Santos thiagoss at osg.samsung.com
Mon Jan 12 03:58:19 PST 2015


On 01/12/2015 07:43 AM, Ian Davidson wrote:
>
> I have a program which uses camerabin to take snapshots – and it works 
> most of the time. However, the program is not very rugged in its error 
> handling – because I don't know what I should look for. Below, I first 
> describe the scenario and then ask some questions.
>
> *Scenario*.
>
> My program runs on a Fedora system. My version of GStreamer is 
> approximately 2 years old – I can't remember the version number but it 
> is 1.x. I want to be able to take photos of the highest resolution 
> (number of pixels) that the system can support. When I launch 
> camerabin it automatically launches a window for a viewfinder. I do 
> not need the Viewfinder – although it does give the comfort of knowing 
> that the camera is connected. By default, this window is the same size 
> as the capture size – and therefore occupies most of the screen and 
> hides my program's User Interface. (There is an option to specify a 
> size for the Viewfinder window, but unless it exactly matches the 
> capture size, the pipeline will not launch.) What I do (and what I 
> tell my users to do) is to grab the Viewfinder window by the title bar 
> and drag it nearly off the screen, out of the way. Sometimes however, 
> the user will click on the 'Kiss of Death' button at the top right and 
> close the Viewfinder window – and it would seem that this has a fatal 
> effect on the camerbin pipeline. My program does not notice that 
> camerabin has stopped running.
>
> *Questions*
>
> 1.
>
>     Is there some message/event/signal that I should be able to
>     monitor for to tell me that the pipeline has been stopped (for
>     whatever reason, but especially because the Viewfinder window has
>     been closed)?
>
You will likely receive an error message on the bus.
>
> 1.
>
>
> 2.
>
>     Can I launch camerabin without the Viewfinder?
>
If you don't need to show a viewfinder you can set the viewfinder-sink 
property to a fakesink element and it won't show any for you.
>
> 1.
>
>
> 2.
>
>     Is there a way that I can programmatically bring my User Interface
>     to the front or send the Viewfinder window to the back after I
>     have started the camerbin pipeline?
>
> 3.
>
>     Is there a way that I can programmatically control the position of
>     the Viewfinder window before/after I launch camerabin?
>
The viewfinder sink element will ask the application for a window to 
draw its output to. If you don't give it any it will have to create its 
own window for display. Take a look at the documentation here: 
https://developer.gnome.org/gst-plugins-libs/stable/gst-plugins-base-libs-gstvideooverlay.html
>
> 1.
>
>
> An answer to any one of those questions would probably solve my problem.
>
> Thanks in advance
>
> Ian
>
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


-- 
Thiago Sousa Santos
Senior Multimedia Engineer, Open Source Group
Samsung Research America - Silicon Valley

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150112/5f902a83/attachment-0001.html>


More information about the gstreamer-devel mailing list