Trying to encode a captured frame as a Bitmap (.bmp)
Jack D
jackstuff3 at gmail.com
Thu Dec 14 23:41:53 UTC 2017
Greetings,
I am attempting to capture a frame from a stream, much like the example
listed here:
https://github.com/rubenrua/GstreamerCodeSnippets/blob/master/C/takepic.c
In the part of the code where the actual frame is captured and converted is
this:
g_object_get (data->sink, "last-sample", &from_sample, NULL);
if (from_sample == NULL) { GST_ERROR ("Error getting last sample form sink");
return; } caps = gst_caps_from_string ("image/png"); to_sample =
gst_video_convert_sample (from_sample, caps, GST_CLOCK_TIME_NONE, &err);
And then it continues to create a file. Now this all works perfectly as it
is listed here. But I need to save my files as bitmaps. So I change the
caps definition to: caps = gst_caps_from_string ("image/bmp"); This works,
but calling gst_video_convert_sample returns an error, that when printed
out states: Cannot find any image encoder for caps image/bmp. When I do
gst-inspect-1.0 | grep bmp, I get this:
libav: avdec_bmp: libav BMP (Windows and OS/2 bitmap) decoder libav:
avenc_bmp: libav BMP (Windows and OS/2 bitmap) encoder typefindfunctions:
image/vnd.wap.wbmp: no extensions typefindfunctions: image/bmp: bmp Should
I be seeing something more? Should my libav encoder support this? Thanks,
Jack D.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20171214/696ec54b/attachment.html>
More information about the gstreamer-devel
mailing list