Could you tell me async-start and async-done message in playbin?
HoonHee Lee
hoonh83.lee at gmail.com
Sun Jan 26 02:47:33 PST 2014
Sebastian, Thanks for your comment.
IMHO, I am a little bit agree on your comment.
I reviewed gstbin.c and I got something below functions.
In case of ASYNC-START message, they are checking the bin whether it is
top-level Bin or not.
Thus, this message is not forwarded to the application in normal case and
just uses internally.
static void
bin_handle_async_start (GstBin * bin)
{
...
/* get our toplevel state */
toplevel = BIN_IS_TOPLEVEL (bin);
/* prepare an ASYNC_START message, we always post the start message even
if we
* are busy with a state change or when we are NO_PREROLL. */
if (!toplevel)
/* non toplevel bin, prepare async-start for the parent */
amessage = gst_message_new_async_start (GST_OBJECT_CAST (bin));
...
}
In case of ASYNC-DONE, if there is a pending ASYNC-START message, ASYNC-DONE
message is not posting to its bin. But, if there are no more ASYNC_START
messages, ASYNC-DONE message is posting to its bin.
Thus, I think that ASYNC_DONE message is posting only once to application.
gst_bin_handle_message_func (GstBin * bin, GstMessage * message)
{
...
case GST_MESSAGE_ASYNC_DONE:
...
// Because of this, All of async-done messages from child elements are
not posting to upper-layer.
*bin_replace_message* (bin, message, GST_MESSAGE_ASYNC_START);
/* if there are no more ASYNC_START messages, everybody posted
* a ASYNC_DONE and we can post one on the bus. When checking, we
* don't care who still has a pending ASYNC_START */
if (*!find_message (bin, NULL, GST_MESSAGE_ASYNC_START)*) {
/* nothing found, remove all old ASYNC_DONE messages */
bin_remove_messages (bin, NULL, GST_MESSAGE_ASYNC_DONE);
GST_DEBUG_OBJECT (bin, "async elements commited");
/* when we get an async done message when a state change was busy, we
* need to set the pending_done flag so that at the end of the state
* change we can see if we need to verify pending async elements,
hence
* the TRUE argument here. */
*bin_handle_async_done (bin, GST_STATE_CHANGE_SUCCESS, TRUE,
running_time);*
} else {
*GST_DEBUG_OBJECT (bin, "there are more async elements pending");*
}
}
And I tested in on playbin with fakesink for audio and video.
I confirmed that ASYNC-DONE message is posting only once to application.
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Could-you-tell-me-async-start-and-async-done-message-in-playbin-tp4664847p4664884.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list