[gst-devel] problem when getting the data of a frame
Vincent Torri
Vincent.Torri at iecn.u-nancy.fr
Tue Jul 19 09:04:17 CEST 2005
Hello,
I have this simple pipeline (not a thread)
+---------------------------------------------------+
| |
| pipeline |
| |
| +---------+ +-----------+ +------------------+ |
| | | | | | | |
| | filesrc +--+ decodebin +--+ (video) fakesink | |
| | | | | | | |
| +---------+ +-----------+ +------------------+ |
| |
+---------------------------------------------------+
my aim is to get the frame #n, i don't care about the colorspace. I use
gstreamer 0.8 (with gst-plugins and gst-ffmpeg)
I am able to get the informations (resolution, length, colorspace, etc..)
of the video.
so, on the sink, i've attached a callback on the "handoff" signal.
a) I seek to frame #n (with DEFAULT type, it works as it returns true)
b) I set the pipeline to PLAY state
c) I iterate ( while (iterate) { })
d) the calback is executed
1) I set the state of the pipeline to PAUSED to stop the iteration
2) I store the data of the buffer
e) I draw the Y plane in a .ppm file
but, in the ppm file, i only get values between 29 and 32. I've tried
lots of frames of the video, in particular frames with hight luma. I only
get a grey rectangle.
the colorspace of the video is I420, the resolution is 704x400
The size of the buffer is 422400 which is equal to 704*400 + 352*200 +
352*200. So I think that the buffer is filled with data (maybe not the
good ones...)
Does someone see if there is a problem in the pipeline (I think that it's
the only place where the error can be located)
thank you
Vincent Torri
More information about the gstreamer-devel
mailing list