Which event or message can be safely simulate android's MEDIA_PREPARED?
lucky chou
shakin at outlook.com
Wed May 25 14:43:21 UTC 2016
I use gstreamer 1.8.1 to instead of MediaPlayer in Android, looking for a
gstreamer internal events or messages used to achieve the same effect in
MEDIA_PREPARED of MediaPlayer(perhaps the first frame is decoded ? or the
filtergraph just switch to paused),it mean that when the downstream is
ready, the upper application can safely do some operations.
The previous code, I was using the message :: async-done to simulate
MEDIA_PREPARED, registered playbin of async-done event callback function,
----------------------------
bus = gst_element_get_bus (self-> playbin);
g_signal_connect (G_OBJECT (bus), "message :: async-done", G_CALLBACK
(async_done_cb),
self);
----------------------------
however, recent play with rtsp ipcamera, we found into the following piece
of code,that is async-done discarded.
-------------------
gst-plugins-base-1.0-static-1.8/gst/playback/gstplaybin2.c
gst_play_bin_handle_message() L2884
static void
gst_play_bin_handle_message (GstBin * bin, GstMessage * msg)
{
GstPlayBin *playbin = GST_PLAY_BIN (bin);
GstSourceGroup *group;
.....
else if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ASYNC_START ||
GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ASYNC_DONE) {
GstObject *src = GST_OBJECT_CAST (msg->src);
/* Ignore async state changes from the uridecodebin children,
* see bug #602000. */
group = playbin->curr_group;
if (src && group &&
((group->uridecodebin && src == GST_OBJECT_CAST
(group->uridecodebin))
|| (group->suburidecodebin
&& src == GST_OBJECT_CAST (group->suburidecodebin)))) {
GST_DEBUG_OBJECT (playbin,
"Ignoring async state change of uridecodebin: %s",
GST_OBJECT_NAME (src));
gst_message_unref (msg);
msg = NULL;
}
.....
}
I don't know which one event or message can better simulate MEDIA_PREPARED,
any suggestion would be appreciated.
Best regards,
c
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Which-event-or-message-can-be-safely-simulate-android-s-MEDIA-PREPARED-tp4677769.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list