[gst-devel] JuK developer needs help w/ gstreamer 0.10
Michael Pyne
michael.pyne at kdemail.net
Sun Mar 12 04:30:03 CET 2006
Hi all,
Just writing in because when I was installing gstreamer 0.10 to test the newly
added support for 0.10 that Scott Wheeler (the JuK author) added, I noticed I
forgot the ogg vorbis support when JuK froze trying to play a .ogg.
I could fix that issue easily of course, but I figured it would be best to
improve the error handling. But I can't seem to figure it out.
The issue is this: JuK uses the gst_bus_set_sync_handler() function to handle
the bus messages for a pipeline consisting of just a playbin. You can view
the current version of the bus handler at
http://websvn.kde.org/trunk/KDE/kdemultimedia/juk/gstreamerplayer.cpp
(function messageHandler() ).
In my local copy (not committed to KDE svn) I use this as messageHandler():
static GstBusSyncReply messageHandler(GstBus *, GstMessage *message, gpointer
data)
{
GStreamerPlayer *player = 0;
switch(GST_MESSAGE_TYPE(message)) {
case GST_MESSAGE_EOS:
player = static_cast<GStreamerPlayer *>(data);
kdDebug(65432) << "Stopping stream.\n";
QTimer::singleShot(0, player, SLOT(stop()));
break;
case GST_MESSAGE_STATE_CHANGED:
kdDebug(65432) << "State change.\n";
break;
case GST_MESSAGE_STRUCTURE_CHANGE:
kdDebug(65432) << "Structure changed!\n";
break;
case GST_MESSAGE_ERROR: // Hey, it could happen.
gchar *debug;
GError *err;
gst_message_parse_error(message, &err, &debug);
kdError(65432) << "GStreamerPlayer error: " << err->message << ' '
<< debug << endl;
g_free(debug);
g_error_free(err);
player = static_cast<GStreamerPlayer *>(data);
QTimer::singleShot(0, player, SLOT(recoverFromError()));
break;
default:
break;
}
gst_message_unref(message);
return GST_BUS_DROP;
}
recoverFromError() just calls stop(), unrefs the playbin, and creates it
again.
stop() just sets the playbin to a playing state of NULL.
Now, when I try to play a .ogg I get this message at the console:
** Message: don't know how to handle application/ogg
juk: ERROR: GStreamerPlayer error: You do not have a decoder installed to
handle this file. You might need to install the necessary plugins.
gstplaybasebin.c(1456): prepare_output (): /playbin
juk: State change.
juk: State change.
juk: ERROR: GStreamerPlayer error: Internal data flow error.
gstbasesrc.c(1318): gst_base_src_loop (): /playbin/source:
streaming task paused, reason not-linked
juk: State change.
JuK then freezes at this point. I've recompiled gstreamer with debugging
support but I still can't seem to get gdb to actually stop at a decent place
for backtraces. I did get this far though:
juk: ERROR: GStreamerPlayer error: Internal data flow error.
gstbasesrc.c(1318): gst_base_src_loop (): /playbin/source:
streaming task paused, reason not-linked
Program received signal SIGINT, Interrupt.
[Switching to Thread -1242625856 (LWP 3326)]
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0 0xffffe410 in __kernel_vsyscall ()
#1 0x4f89abd6 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2 0xb5f7c696 in ?? () from /usr/lib/libgthread-2.0.so.0
#3 0x098066f0 in ?? ()
#4 0x0980d440 in ?? ()
#5 0xbfbeb7f8 in ?? ()
#6 0xb7eebf1d in gst_debug_log () from /usr/lib/libgstreamer-0.10.so.0
#7 0xb7ecf2c7 in gst_bin_iterate_sources ()
from /usr/lib/libgstreamer-0.10.so.0
#8 0xb7ee0cf6 in gst_element_get_state ()
from /usr/lib/libgstreamer-0.10.so.0
#9 0x080ee709 in GStreamerPlayer::state (this=0x8530130)
at /home/kde-cvs/kdesvn/kdemultimedia/juk/gstreamerplayer.cpp:368
#10 0x080ee74f in GStreamerPlayer::playing (this=0x8530130)
at /home/kde-cvs/kdesvn/kdemultimedia/juk/gstreamerplayer.cpp:286
#11 0x081067f0 in PlayerManager::play (this=0x81a5860, file=@0xbfbeb934)
at /home/kde-cvs/kdesvn/kdemultimedia/juk/playermanager.cpp:301
The JuK code (frame 11) is checking whether we're actually playing after
asking GStreamerPlayer to play. It freezes determining the state of
playback. Not even GUI paint events get posted.
What I'd like to know is, why, and what can I do to fix it? :)
gstreamer is 0.10.3, gst-plugins-base is 0.10.3, gst-plugins-good is 0.10.2.
Is there a better way to implement the bus handler (keeping in mind that we're
using the Qt event loop)?
Please CC me on replies as I'm not subscribed. I may not reply until tomorrow
as I have work for about 13-14 hours a day for the next 6 days.
Regards,
- Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20060312/3bf01b16/attachment.pgp>
More information about the gstreamer-devel
mailing list