[gst-devel] Getting converted frame from playbin2 element
Marco Ballesio
gibrovacco at gmail.com
Fri Jan 7 12:21:24 CET 2011
Hi,
On Mon, Jan 3, 2011 at 1:12 PM, vaisaari <vaisaari at gmail.com> wrote:
>
> Hi all,
>
> I'm trying to implement a function that returns the current frame of
> playbin2 element as a QImage (Qt data type). When I call the function (for
> the same video), sometimes it works perfectly, sometimes parts of the frame
> (bottom rows) are missing. What am I doing wrong? Should I somehow be able
> to wait for the "convert-frame" operation to finish, or what? You can find
> my example code below. Thank you for your help!
imo this should not happen, as the signal handler (delegated to
playsink) internally calls gst_play_sink_get_last_frame, which locks
playsink. Can you post to pastebin the output you get after setting
GST_DEBUG=playsink:5 ?
Which video decoder are you using?
Besides, if you're trying to render a video clip in Qt, you may
consider using QtGStreamer..
Regards
>
>
> QImage Video::getFrame()
> {
>
> GstBuffer *buffer;
> GstCaps *caps;
>
> caps = gst_caps_new_simple("video/x-raw-rgb","bpp", G_TYPE_INT, 24,"depth",
> G_TYPE_INT, 24,NULL);
>
> g_signal_emit_by_name(player, "convert-frame", caps, &buffer);
>
> unsigned char* data=(unsigned char *) GST_BUFFER_DATA (buffer);
> QImage img(data, width, height, QImage::Format_RGB888);
>
> return img;
> }
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Getting-converted-frame-from-playbin2-element-tp3171830p3171830.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment, and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
More information about the gstreamer-devel
mailing list