[gst-devel] Questions about playbin

shinstar LiHsinChang at besta.com.tw
Wed Oct 21 09:41:49 CEST 2009


Hi all,
I have using playbin to build a test application.Usually, it works properly.
But when I use gst_x_overlay_set_xwindow_id to assign the window to display,
using the application to decode jpeg file leads to error(other video like
wmv works properly).
The error message looks like :
(playbin:6212): GLib-GObject-WARNING **: invalid unclassed pointer in cast
to `GstBuffer'

(playbin:6212): GStreamer-CRITICAL **: gst_mini_object_ref: assertion
`GST_IS_MINI_OBJECT (mini_object)' failed
Related code is 
static gboolean expose_cb(GtkWidget * widget, GdkEventExpose * event,
gpointer data) 
{ 
   gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(data),
GDK_WINDOW_XWINDOW(widget->window)); 
    return TRUE; 
}
int main (int argc, char *argv[])
{
   GstElement *player, *videosink;
   GtkWidget *window;
.....
   player=gst_element_factory_make ("playbin", "player");
   videosink=gst_element_factory_make ("xvimagesink", "video sink");
   g_object_set(G_OBJECT (player), "video-sink", videosink, NULL);
   window=gtk_window_new(GTK_WINDOW_TOPLEVEL); 
   g_signal_connect(G_OBJECT(window), "expose-event", G_CALLBACK(expose_cb),
videosink);
....
}

Second, how to grab /insert raw video data(ex. yuv rgb) from/into pipeline?
Since I would like to have some visual effect when I display photos.Or I
need to make a plug-in by my own?
-- 
View this message in context: http://www.nabble.com/Questions-about-playbin-tp25987889p25987889.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.





More information about the gstreamer-devel mailing list