Problem in getting the entire frame from gstbuffer at once

Kiran Kumar kirank3240 at gmail.com
Wed Jun 15 09:17:51 UTC 2016


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 really need someones help.

Thanks in advance.

Kiran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160615/8badc5ae/attachment.html>


More information about the gstreamer-devel mailing list