mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 04:52:28 +00:00
gst/gstbin.c: The message src can be NULL, don't try to print the object names in that case.
Original commit message from CVS: * gst/gstbin.c: (gst_bin_remove_func), (update_degree), (gst_bin_handle_message_func): The message src can be NULL, don't try to print the object names in that case. * libs/gst/base/gstbasesink.c: (gst_base_sink_pad_activate): Add some more debug info. * tests/check/pipelines/simple-launch-lines.c: (run_pipeline), (GST_START_TEST): Add some debug. Fix the test, pull based sinks go ASYNC to PAUSED, just like other scheduling modes.
This commit is contained in:
parent
b3403511ea
commit
bc8e367885
4 changed files with 40 additions and 15 deletions
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
|||
2008-10-10 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* gst/gstbin.c: (gst_bin_remove_func), (update_degree),
|
||||
(gst_bin_handle_message_func):
|
||||
The message src can be NULL, don't try to print the object names in that
|
||||
case.
|
||||
|
||||
* libs/gst/base/gstbasesink.c: (gst_base_sink_pad_activate):
|
||||
Add some more debug info.
|
||||
|
||||
* tests/check/pipelines/simple-launch-lines.c: (run_pipeline),
|
||||
(GST_START_TEST):
|
||||
Add some debug.
|
||||
Fix the test, pull based sinks go ASYNC to PAUSED, just like other
|
||||
scheduling modes.
|
||||
|
||||
2008-10-10 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* docs/design/part-negotiation.txt:
|
||||
|
|
18
gst/gstbin.c
18
gst/gstbin.c
|
@ -1167,15 +1167,14 @@ gst_bin_remove_func (GstBin * bin, GstElement * element)
|
|||
else
|
||||
other_async = TRUE;
|
||||
|
||||
GST_DEBUG_OBJECT (GST_MESSAGE_SRC (message),
|
||||
"looking at message %p", message);
|
||||
GST_DEBUG_OBJECT (src, "looking at message %p", message);
|
||||
break;
|
||||
case GST_MESSAGE_STRUCTURE_CHANGE:
|
||||
{
|
||||
GstElement *owner;
|
||||
|
||||
GST_DEBUG_OBJECT (GST_MESSAGE_SRC (message),
|
||||
"looking at structure change message %p", message);
|
||||
GST_DEBUG_OBJECT (src, "looking at structure change message %p",
|
||||
message);
|
||||
/* it's unlikely that this message is still in the list of messages
|
||||
* because this would mean that a link/unlink is busy in another thread
|
||||
* while we remove the element. We still have to remove the message
|
||||
|
@ -1194,8 +1193,8 @@ gst_bin_remove_func (GstBin * bin, GstElement * element)
|
|||
|
||||
if (remove) {
|
||||
/* delete all message types */
|
||||
GST_DEBUG_OBJECT (GST_MESSAGE_SRC (message),
|
||||
"deleting message %p of element \"%s\"", message, elem_name);
|
||||
GST_DEBUG_OBJECT (src, "deleting message %p of element \"%s\"",
|
||||
message, elem_name);
|
||||
bin->messages = g_list_delete_link (bin->messages, walk);
|
||||
gst_message_unref (message);
|
||||
}
|
||||
|
@ -2769,7 +2768,8 @@ gst_bin_handle_message_func (GstBin * bin, GstMessage * message)
|
|||
type = GST_MESSAGE_TYPE (message);
|
||||
|
||||
GST_DEBUG_OBJECT (bin, "[msg %p] handling child %s message of type %s",
|
||||
message, GST_ELEMENT_NAME (src), GST_MESSAGE_TYPE_NAME (message));
|
||||
message, src ? GST_ELEMENT_NAME (src) : "(NULL)",
|
||||
GST_MESSAGE_TYPE_NAME (message));
|
||||
|
||||
switch (type) {
|
||||
case GST_MESSAGE_EOS:
|
||||
|
@ -2903,7 +2903,7 @@ gst_bin_handle_message_func (GstBin * bin, GstMessage * message)
|
|||
GstState target;
|
||||
|
||||
GST_DEBUG_OBJECT (bin, "ASYNC_START message %p, %s", message,
|
||||
GST_OBJECT_NAME (src));
|
||||
src ? GST_OBJECT_NAME (src) : "(NULL)");
|
||||
|
||||
gst_message_parse_async_start (message, &new_base_time);
|
||||
|
||||
|
@ -2935,7 +2935,7 @@ gst_bin_handle_message_func (GstBin * bin, GstMessage * message)
|
|||
gboolean is_bin;
|
||||
|
||||
GST_DEBUG_OBJECT (bin, "ASYNC_DONE message %p, %s", message,
|
||||
GST_OBJECT_NAME (src));
|
||||
src ? GST_OBJECT_NAME (src) : "(NULL)");
|
||||
|
||||
GST_OBJECT_LOCK (bin);
|
||||
target = GST_STATE_TARGET (bin);
|
||||
|
|
|
@ -3000,12 +3000,16 @@ gst_base_sink_pad_activate (GstPad * pad)
|
|||
gst_base_sink_set_flushing (basesink, pad, FALSE);
|
||||
|
||||
/* we need to have the pull mode enabled */
|
||||
if (!basesink->can_activate_pull)
|
||||
if (!basesink->can_activate_pull) {
|
||||
GST_DEBUG_OBJECT (basesink, "pull mode disabled");
|
||||
goto fallback;
|
||||
}
|
||||
|
||||
/* check if downstreams supports pull mode at all */
|
||||
if (!gst_pad_check_pull_range (pad))
|
||||
if (!gst_pad_check_pull_range (pad)) {
|
||||
GST_DEBUG_OBJECT (basesink, "pull mode not supported");
|
||||
goto fallback;
|
||||
}
|
||||
|
||||
/* set the pad mode before starting the task so that it's in the
|
||||
* correct state for the new thread. also the sink set_caps and get_caps
|
||||
|
@ -3014,8 +3018,10 @@ gst_base_sink_pad_activate (GstPad * pad)
|
|||
|
||||
/* we first try to negotiate a format so that when we try to activate
|
||||
* downstream, it knows about our format */
|
||||
if (!gst_base_sink_negotiate_pull (basesink))
|
||||
if (!gst_base_sink_negotiate_pull (basesink)) {
|
||||
GST_DEBUG_OBJECT (basesink, "failed to negotiate in pull mode");
|
||||
goto fallback;
|
||||
}
|
||||
|
||||
/* ok activate now */
|
||||
if (!gst_pad_activate_pull (pad, TRUE)) {
|
||||
|
@ -3023,6 +3029,7 @@ gst_base_sink_pad_activate (GstPad * pad)
|
|||
GST_OBJECT_LOCK (basesink);
|
||||
gst_caps_replace (&basesink->priv->pull_caps, NULL);
|
||||
GST_OBJECT_UNLOCK (basesink);
|
||||
GST_DEBUG_OBJECT (basesink, "failed to activate in pull mode");
|
||||
goto fallback;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,10 +54,13 @@ run_pipeline (GstElement * pipeline, gchar * descr,
|
|||
bus = gst_element_get_bus (pipeline);
|
||||
fail_if (bus == NULL);
|
||||
|
||||
GST_DEBUG ("running pipeline %s", descr);
|
||||
|
||||
ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||
ret = gst_element_get_state (pipeline, NULL, NULL, GST_CLOCK_TIME_NONE);
|
||||
|
||||
if (ret != GST_STATE_CHANGE_SUCCESS) {
|
||||
GST_WARNING ("have failed state change %d", ret);
|
||||
g_critical ("Couldn't set pipeline to PLAYING");
|
||||
goto done;
|
||||
}
|
||||
|
@ -168,11 +171,10 @@ GST_START_TEST (test_state_change_returns)
|
|||
check_state_change_return (pipeline, GST_STATE_READY,
|
||||
GST_STATE_CHANGE_SUCCESS, GST_STATE_CHANGE_SUCCESS);
|
||||
check_state_change_return (pipeline, GST_STATE_PAUSED,
|
||||
GST_STATE_CHANGE_SUCCESS, GST_STATE_CHANGE_SUCCESS);
|
||||
GST_STATE_CHANGE_ASYNC, GST_STATE_CHANGE_SUCCESS);
|
||||
check_state_change_return (pipeline, GST_STATE_PLAYING,
|
||||
GST_STATE_CHANGE_SUCCESS, GST_STATE_CHANGE_SUCCESS);
|
||||
check_state_change_return (pipeline, GST_STATE_PAUSED,
|
||||
GST_STATE_CHANGE_SUCCESS, GST_STATE_CHANGE_SUCCESS);
|
||||
/* can't check PAUSED, it's not deterministic */
|
||||
check_state_change_return (pipeline, GST_STATE_READY,
|
||||
GST_STATE_CHANGE_SUCCESS, GST_STATE_CHANGE_SUCCESS);
|
||||
check_state_change_return (pipeline, GST_STATE_NULL, GST_STATE_CHANGE_SUCCESS,
|
||||
|
|
Loading…
Reference in a new issue