<p dir="ltr"><br>
Le 2016-06-15 05:31, "Kiran Kumar" <<a href="mailto:kirank3240@gmail.com">kirank3240@gmail.com</a>> a écrit :<br>
><br>
> Hi,<br>
><br>
> I am new to gstreamer. I am writing a plugin by referring gstreamer plugin writers guide.<br>
><br>
> 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<br>
><br>
> I am trying to process the data buffer inside _chain() function of my new plugin.<br>
><br>
> Problem:<br>
> GstMapInfo map;<br>
> static GstFlowReturn<br>
> gst_mynewplugin_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)<br>
> {<br>
>       [....]<br>
><br>
>         gst_buffer_map (buf, &map, GST_MAP_READ);<br>
>         g_print("buffer size=%d\n", map.size);<br>
>         <br>
>        [.......]<br>
> }<br>
><br>
> The input image size is 512x512x8(bit depth)=2097152 bits. But, map.size is always = 4096 bytes. <br>
><br>
> My requirement:<br>
> 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.<br>
> 2. The filter which I'm using inside my new plugin needs the entire frame as its input and not chunks of the frame.<br>
><br>
> Questions:<br>
> 1. How to get the entire image frame at once in "map.data"?<br>
> 2. What am I missing here?</p>
<p dir="ltr">I believe your implementing a pgm decoder. Use GstVideoDecoder and implement parse virtual method.</p>
<p dir="ltr">><br>
> I really need someones help.<br>
><br>
> Thanks in advance.<br>
><br>
> Kiran<br>
><br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
><br>
</p>