SledgeHammer_999
July 29th, 2008, 11:34 AM
I am experimenting with gtkmm and gstreamer(and mixing C with C++ as a result :( ). I'll try to be as specific as I can:
1.As you know you can create a bus where gstreamer posts messages about the pipeline/media you created the bus for. (more details here (http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-bus.html#section-bus-howto))
2.I use the second method to connect to end-of-stream message:
"g_signal_connect (bus, "message::eos", G_CALLBACK (cb_message_eos), NULL);"
3.And the callback just seeks to the beginning of the stream/media.
But here's the problem: callback(the seek function) fails with this error in the console---> gst_element_seek: assertion `GST_IS_ELEMENT (element)' failed
But there's something weird going on: If I put the same code in a button callback and click the button MYSELF after the stream/media has finished playing(after eos) then everything works perfectly.
Why is this happening?
1.As you know you can create a bus where gstreamer posts messages about the pipeline/media you created the bus for. (more details here (http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-bus.html#section-bus-howto))
2.I use the second method to connect to end-of-stream message:
"g_signal_connect (bus, "message::eos", G_CALLBACK (cb_message_eos), NULL);"
3.And the callback just seeks to the beginning of the stream/media.
But here's the problem: callback(the seek function) fails with this error in the console---> gst_element_seek: assertion `GST_IS_ELEMENT (element)' failed
But there's something weird going on: If I put the same code in a button callback and click the button MYSELF after the stream/media has finished playing(after eos) then everything works perfectly.
Why is this happening?