[gst-devel] GST_DEBUG_BIN_TO_DOT_FILE doesn't show all elements.
Stefan Kost
ensonic at hora-obscura.de
Thu Apr 8 13:53:52 CEST 2010
wl2776 wrote:
> My media player uses playbin2.
> If I load a wav file into it, the result of the call
> GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(m_player), GST_DEBUG_GRAPH_SHOW_ALL,
> "player");
> when m_player is in the playing state is this:
> http://n4.nabble.com/file/n1752600/player.png player.png (217kb) , original
> dot is this: http://n4.nabble.com/file/n1752600/player.dot player.dot
> (11Kb)
>
> Apparently, there are no any videosinks there.
> However, I see messages
> "0:00:12.958634000 1716 003D9140 ERROR directdrawsink
> gstdirectdrawsink.c:887:gst_directdraw_sink_show_frame:<videosink> No buffer
> to render.
> "
> in the debug window.
>
Ha ha, very funny. You play a wav file. Now try with a video and get
some coffe :)
Stefan
> The creation code is the following:
>
> m_loop = g_main_loop_new(NULL,FALSE);
> m_player = gst_element_factory_make("playbin2","playbin0");
> m_bus = gst_pipeline_get_bus(GST_PIPELINE(m_player));
> gst_bus_enable_sync_message_emission(m_bus);
> gst_bus_set_sync_handler (m_bus, (GstBusSyncHandler)gst_bus_sync_handler,
> this);
> gst_bus_add_watch (m_bus, bus_call, this);
>
> if(!m_videosink){
> m_videosink = gst_element_factory_make("directdrawsink","videosink");
> if(m_videosink){
>
> g_object_set(m_videosink,"sync",TRUE,"force-aspect-ratio",TRUE,"preroll-queue-len",1,NULL);
> if(!m_hwnd && m_parent)
> m_hwnd=m_parent->hwnd();
>
> if(m_hwnd)
> gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (m_videosink),m_hwnd);
>
> g_object_set(G_OBJECT(m_player),"video-sink",m_videosink,NULL);
> }
> gchar
> *uri=g_filename_to_uri(g_convert(filename,-1,"UTF-8","CP1251",NULL,NULL,NULL),NULL,NULL);
> if(uri){
> g_object_set(G_OBJECT(m_player),"uri",uri,NULL);
> g_free(uri);
> }
> m_loop_thread=g_thread_create((GThreadFunc)main_loop_run,this,FALSE,NULL));
> GstStateChangeReturn
> r=gst_element_set_state(GST_ELEMENT(m_player),GST_STATE_PLAYING);
>
>
> error handling is omitted for brevity.
>
> Then, bus-sync-handler waits for m_player to go to the PLAYING state, and,
> when it does, calls
> GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(m_player), GST_DEBUG_GRAPH_SHOW_ALL,
> "player");
>
> Is it a bug?
>
> What should I do with the already created video sink, if I want to insert
> additional elements to the playbin2 in order it can play sound and video
> from the separate sources?
>
>
More information about the gstreamer-devel
mailing list