jason talley

Frame grab from mfw_isink

Discussion created by jason talley on Nov 1, 2011
Latest reply on Dec 17, 2011 by Kan Hu

I'm looking to capture a snapshot of a running video.  My sink is mfw_isink.  When requested, I grab the last-buffer from the sink and store it to a file.  



gst-launch playbin2 uri=uri video-sink=mfw_isink


From code:

g_object_get(G_OBJECT(m_vsink), "last-buffer", &buffer, NULL);


The following caps come from the buffer:

Caps video/x-raw-yuv, format=(fourcc)NV12, width=(int)720, height=(int)480, width_align=(int)64, height_align=(int)64, framerate=(fraction)30000/1001, pixel-aspect-ratio=(fraction)4/3, crop-top-by-pixel=(int)0, crop-left-by-pixel=(int)0, crop-right-by-pixel=(int)48, crop-bottom-by-pixel=(int)32, num-buffers-required=(int)10, field=(int)0

Last buffer size: 589824

Last buffer timestamp: 0:00:05.068854819



My confusion and concerns stem from the num-buffers-required field.  When I try to use the IPU unit test to convert, the resulting file doesn't appear to be a full frame.  The buffer size also doesn't seem to match up w/ what I expected size wise.  I can tell what was supposed to be on screen, but it certainly isn't exactly what was on screen.  It also doesn't look like it is only 1/10th of the screen either.  What I find interesting, is that the actual video on screen is not equal to the caps provided.


When running this on the PC using Xvimagesink, the last-buffer field provided a full frame.  Shouldn't this be the case here?  If not, how would I go about getting a full screen grab of a running video?


Mx53/BSP 11.05