Problem in getting the entire frame from gstbuffer at once

Nicolas Dufresne nicolas at ndufresne.ca
Wed Jun 15 11:35:40 UTC 2016


Le 2016-06-15 05:31, "Kiran Kumar" <kirank3240 at gmail.com> a écrit :
>
> Hi,
>
> I am new to gstreamer. I am writing a plugin by referring gstreamer
plugin writers guide.
>
> My gst-launch command line looks like  gst-launch-1.0 filesrc
location=mandrill.pgm ! image/pgm,width=512,height=512,framerate=1/1 !
mynewplugin ! filesink location=image_out.pgm
>
> I am trying to process the data buffer inside _chain() function of my new
plugin.
>
> Problem:
> GstMapInfo map;
> static GstFlowReturn
> gst_mynewplugin_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
> {
>       [....]
>
>         gst_buffer_map (buf, &map, GST_MAP_READ);
>         g_print("buffer size=%d\n", map.size);
>
>        [.......]
> }
>
> The input image size is 512x512x8(bit depth)=2097152 bits. But, map.size
is always = 4096 bytes.
>
> My requirement:
> 1. I need the entire frame i.e., 2097152 bits at once and not in the form
of series of chunks where each chunk size is 4096 bytes.
> 2. The filter which I'm using inside my new plugin needs the entire frame
as its input and not chunks of the frame.
>
> Questions:
> 1. How to get the entire image frame at once in "map.data"?
> 2. What am I missing here?

I believe your implementing a pgm decoder. Use GstVideoDecoder and
implement parse virtual method.

>
> I really need someones help.
>
> Thanks in advance.
>
> Kiran
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160615/63424184/attachment.html>


More information about the gstreamer-devel mailing list