Problems capturing to PNG images
James Cameron
quozl at laptop.org
Mon Sep 10 07:23:48 UTC 2018
How I've done it;
- last element in pipeline is gdkpixbufsink
- get the pipeline bus, with get_bus(),
- connect a handler for the 'message' signal,
- in the handler, use get_structure().get_name() to check for
'pixbuf', and if so call get_proprty('last-pixbuf) on the
gdkpixbufsink element,
- in the main program, call pixbuf.savev to convert to PNG file.
Hope that helps.
On Sun, Sep 09, 2018 at 03:30:40AM -0300, John Coppens wrote:
> Hello all.
>
> It seems I took on a too difficult task as my first Gst project. I want to monitor
> a webcam, and, on clicking an image, save the picture. I'm using Gtk3 + introspection,
> and GStreamer 1.0.
>
> I got a chain working from v4l2src - filter - scale - convert - gtksink and was able
> to embed the code into a Gtk GUI, though now it seems to have stopped updating.
>
> I tried to 'tee' the signal from the viewer to a pngenc and then to a filesink,
> but never got that working - the chain creates the image file, but leaves it empty.
> I tried dozens of different approaches, even eliminating the viewer chain. In one
> case I could get a gst-launch chain capturing the images correct to a png, but
> translating the command into script did not work.
>
> Also, I detected the camerabin[2] module, but didn't find any Python script that
> uses it. I suspect that would solve my problem though.
>
> I don't know the list's policy on attachments - if they're accept I could add
> a compressed minimized program.
>
> John
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
--
James Cameron
http://quozl.netrek.org/
More information about the gstreamer-devel
mailing list