Using playbin2 to read MP4/MOV files returns buffer with half the number of expected bytes

Dinesh Iyer dsi.maillist at gmail.com
Sun Mar 2 22:11:57 PST 2014


Hi,
I have an application that uses Gstreamer (currently using 0.10.36) to read
video files. I am using playbin2 and an appsink for the video-sink. I am
reading all the video as RGB using the following caps:

GstCaps* caps = gst_caps_from_string( "video/x-raw-rgb, "
                                            /*"bpp = (int) 24, "
                                            "depth = (int) 24, "
                                            "endianness = (int) BIG_ENDIAN,
"
                                            "red_mask = (int) 16711680, "
                                            "green_mask = (int) 65280, "
                                            "blue_mask = (int) 255"*/ );

I have commented out everything except the mime-type as otherwise the
pipeline does even connect.

When I read a buffer using gst_app_sink_pull_buffer, I received a buffer
whose size in bytes is half the total expected. For a 640*480 8-bit RGB
video frame, the size in bytes of the GstBuffer is (640*480*3/2). However,
when I inspect the caps associated with the buffer, the height and width
are 480 and 640 respectively. Am I missing something?

I am unable to upgrade to Gstreamer 1.0 due to a company wide policy.

Regards,
Dinesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140303/c568a67f/attachment.html>


More information about the gstreamer-devel mailing list