"GStreamer" (bugzilla.gnome.org)
2010-03-22 08:17:42 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=613567
GStreamer | gstreamer (core) | 0.10.28
Summary: Cannot query stream duration in playbin2 when
GST_MESSAGE_DURATION appears on the bus.
Classification: Desktop
Product: GStreamer
Version: 0.10.28
OS/Version: Windows
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gstreamer (core)
AssignedTo: gstreamer-***@lists.sourceforge.net
ReportedBy: ***@gmail.com
QAContact: gstreamer-***@lists.sourceforge.net
GNOME target: ---
GNOME version: ---
I'm developing an ActiveX player using GStreamer.
I'm using the SVN trunk of the OSSBuild, built with MSVS 2008 SP1.
The build and installation are successful, 0 warnings and errors appear in the
debug window.
I'm creating a new instance of the playbin2 with the following code
m_player = gst_element_factory_make("playbin2","playbin0");
GstElement *bus = (GstElement *)gst_pipeline_get_bus(GST_PIPELINE(m_player));
gst_bus_set_sync_handler (GST_BUS(bus),
(GstBusSyncHandler)gst_bus_sync_handler, this);
gst_bus_add_watch (GST_BUS(bus), bus_call, this);
gst_object_unref(bus);
m_loop = g_main_loop_new(NULL,TRUE);
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);
}
}
Both, bus_sync_handler and bus_watch contain the following code:
switch (GST_MESSAGE_TYPE (message)) {
...
case GST_MESSAGE_DURATION:
if(gst_element_query_duration(GST_ELEMENT(m_player),&fmt,&m_stream_duration)){
.... process duration - set the duration time in a progress
indicator and in a text box.
}
break;
...
}
The problem is that gst_element_query_duration returns false, and the following
message appears:
playbin2: gstplaybin2.c:2064:gst_play_bin_query:<playbin0> Taking cached
duration because of pending group switch: 0
Since that, the player cannot correctly handle _DURATION message and cannot
draw a correct duration on the form, and no more duration messages appear on
the bus.
The duration query is successful, but later, after the file is loaded, set to
PLAYING state and again, to PAUSED.
This code worked successfully in the previous release of the OSSBuild (0.10.25)
GStreamer | gstreamer (core) | 0.10.28
Summary: Cannot query stream duration in playbin2 when
GST_MESSAGE_DURATION appears on the bus.
Classification: Desktop
Product: GStreamer
Version: 0.10.28
OS/Version: Windows
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gstreamer (core)
AssignedTo: gstreamer-***@lists.sourceforge.net
ReportedBy: ***@gmail.com
QAContact: gstreamer-***@lists.sourceforge.net
GNOME target: ---
GNOME version: ---
I'm developing an ActiveX player using GStreamer.
I'm using the SVN trunk of the OSSBuild, built with MSVS 2008 SP1.
The build and installation are successful, 0 warnings and errors appear in the
debug window.
I'm creating a new instance of the playbin2 with the following code
m_player = gst_element_factory_make("playbin2","playbin0");
GstElement *bus = (GstElement *)gst_pipeline_get_bus(GST_PIPELINE(m_player));
gst_bus_set_sync_handler (GST_BUS(bus),
(GstBusSyncHandler)gst_bus_sync_handler, this);
gst_bus_add_watch (GST_BUS(bus), bus_call, this);
gst_object_unref(bus);
m_loop = g_main_loop_new(NULL,TRUE);
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);
}
}
Both, bus_sync_handler and bus_watch contain the following code:
switch (GST_MESSAGE_TYPE (message)) {
...
case GST_MESSAGE_DURATION:
if(gst_element_query_duration(GST_ELEMENT(m_player),&fmt,&m_stream_duration)){
.... process duration - set the duration time in a progress
indicator and in a text box.
}
break;
...
}
The problem is that gst_element_query_duration returns false, and the following
message appears:
playbin2: gstplaybin2.c:2064:gst_play_bin_query:<playbin0> Taking cached
duration because of pending group switch: 0
Since that, the player cannot correctly handle _DURATION message and cannot
draw a correct duration on the form, and no more duration messages appear on
the bus.
The duration query is successful, but later, after the file is loaded, set to
PLAYING state and again, to PAUSED.
This code worked successfully in the previous release of the OSSBuild (0.10.25)
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.