<div dir="ltr">Hi all,<div><br></div><div>Have a gstreamer pipeline with: </div><div>v4l2src device=/dev/video3 ! video x-raw, width-1920, height=1080, framerate=15/1 !  ...</div><div><br></div><div>This terminates in an appsink called jpegsink.</div><div><br></div><div>I am accessing the new sample like so:</div><div>g_signal_connect(G_OBJECT(jpegsink),"new-sample",G_CALLBACK(new_sample_jpeg),NULL);</div><div><br></div><div>In the new_sample_jpeg(...)  function I access the sample, segment, and buffer like so:</div><div><br></div><div>GstSample* sample = gst_app_sink_pull_sample(GST_APP_SINK(sink));</div><div>GstSegment* currsegment = gst_sample_get_segment(sample);</div><div>GstBuffer* buffer = gst_sample_get_buffer(sample).</div><div>GstMapInfo map;</div><div>gst_buffer_map(buffer,&map,GST_MAP_READ);</div><div><br></div><div>unsigned char* img = new unsigned char[map.size]</div><div><br></div><div>My question is how do I get the size of the image in width and height from the GstSample. The size property of map given is the length of the array data but not the actual image size. When I saved the image data to file, the size of the image is showing 1920 x 1088 even though in the pipeline it is specified at 1920 x 1080. </div><div><br></div><div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px">Sincerely,</span><div><br></div><div>Dwight Kulkarni    </div></div></div></div></div></div></div></div></div>