[gstreamer-bugs] [Bug 625295] Blocks in log/debug/etc messages after introducing streamsynchronizer
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Mon Jul 26 08:11:25 PDT 2010
https://bugzilla.gnome.org/show_bug.cgi?id=625295
GStreamer | gst-plugins-base | 0.10.30
--- Comment #3 from Vladimir <wl2776 at gmail.com> 2010-07-26 15:11:19 UTC ---
Yes, the messages are printed later.
Looks like they are accumulated in a buffer and displayed in a bunch when this
buffer fills.
For example, when my form issues seek command to the playbin2, it writes some
debug info. I was seeing this message right after clicking on the movie
progress bar on my form.
Here is my seeking function:
void gst_player::set_position(gint64 pos)
{gboolean r;
if(m_player){
if(m_direction>0){
r=gst_element_seek_simple(GST_ELEMENT(m_player),
GST_FORMAT_TIME,
(GstSeekFlags)(GST_SEEK_FLAG_FLUSH|GST_SEEK_FLAG_KEY_UNIT),
pos*GST_MSECOND);
}else{
r=gst_element_seek(m_player,-1.0,GST_FORMAT_TIME,
(GstSeekFlags)(GST_SEEK_FLAG_FLUSH|GST_SEEK_FLAG_ACCURATE),
GST_SEEK_TYPE_SET,0,GST_SEEK_TYPE_SET,pos*GST_MSECOND);
}
GST_DEBUG("direction=%d, seek to %"G_GINT64_FORMAT" msec,
r=%d",m_direction,pos,r);
}
}
Now messages from this function appear later in a bunch of the other functions.
Here is my GStreamer initialization code:
{
/* manually malloc and fill char *argv[]
* I have to do this way as this is an ActiveX control, and it doesn't
* have command line parameters.*/
// I've also took into account that gst_init changes argc and argv
// and saved their copies to correctly free memory.
gst_init(&argc,&argv);
GST_DEBUG_CATEGORY_INIT (player_category, "player", 0,
g_locale_to_utf8("blah-blah-blah",-1,0,0,0));
gst_debug_set_active(TRUE);
g_set_print_handler((GPrintFunc) g_print_func);
log_handler_id_app=g_log_set_handler (NULL,
(GLogLevelFlags)(G_LOG_LEVEL_MASK |
G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION),
G_GNUC_NO_INSTRUMENT (log_function), NULL);
log_handler_gstreamer=g_log_set_handler ("GStreamer",
(GLogLevelFlags)(G_LOG_LEVEL_MASK |
G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION),
G_GNUC_NO_INSTRUMENT (log_function), NULL);
...
}
Here, g_print_func is described as
static void g_print_func(const gchar *string)
{
if(!g_strrstr(string,"assertion `mini_object->refcount > 0' failed"))
OutputDebugString(string);
}
And log_function follows:
static void
log_function(const gchar *log_domain,
GLogLevelFlags log_level,const gchar *message,gpointer user_data)
{
g_print("%s %s %s\n",log_domain,G_STRINGIFY_ARG(log_level),message);
}
I also tried to modify seek example
($GST_PLUGINS_BASE/tests/examples/seek/seek.c), the modified version is
attached.
It shows all messages in time. But I failed to redirect all messages to the
OutputDebugString, only a small part of them appear
--
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.
More information about the Gstreamer-bugs
mailing list