mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
Merge branch 'master' into 0.11
Conflicts: libs/gst/base/gstbaseparse.c libs/gst/base/gstbasesink.c
This commit is contained in:
commit
92aa4fede9
6 changed files with 31 additions and 7 deletions
|
@ -12,14 +12,16 @@
|
|||
</para>
|
||||
|
||||
<para>
|
||||
&GStreamer; derives several times from the clock and the playback state.
|
||||
&GStreamer; derives several <emphasis>time value</emphasis> from the clock
|
||||
and the playback state.
|
||||
It is important to note, that a <emphasis>clock-time</emphasis> is
|
||||
monotonically rising, but the value itself is not meaningful.
|
||||
Subtracting the <emphasis>base-time</emphasis> yields the
|
||||
<emphasis>running-time</emphasis>. It is the same as the
|
||||
<emphasis>stream-time</emphasis> if one plays from start to end at original
|
||||
rate. The <emphasis>stream-time</emphasis> indicates the position in the
|
||||
media.
|
||||
media. The <emphasis>running-time</emphasis> is (re-)set to 0 when the
|
||||
pipeline starts to play and also after <emphasis>flushing</emphasis> seeks.
|
||||
</para>
|
||||
|
||||
<figure float="1" id="chapter-clock-img">
|
||||
|
|
|
@ -409,7 +409,7 @@ gst_event_has_name (GstEvent * event, const gchar * name)
|
|||
* required.
|
||||
*
|
||||
* Note that events and messages share the same sequence number incrementor;
|
||||
* two events or messages will never not have the same sequence number unless
|
||||
* two events or messages will never have the same sequence number unless
|
||||
* that correspondence was made explicitly.
|
||||
*
|
||||
* Returns: The event's sequence number.
|
||||
|
|
|
@ -309,7 +309,7 @@ gst_message_new_custom (GstMessageType type, GstObject * src,
|
|||
* it is not required.
|
||||
*
|
||||
* Note that events and messages share the same sequence number incrementor;
|
||||
* two events or messages will never not have the same sequence number unless
|
||||
* two events or messages will never have the same sequence number unless
|
||||
* that correspondence was made explicitly.
|
||||
*
|
||||
* Returns: The message's sequence number.
|
||||
|
|
|
@ -1935,9 +1935,10 @@ gst_base_parse_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
|||
ret = GST_FLOW_OK;
|
||||
} else if (ret == GST_FLOW_OK) {
|
||||
if (parse->segment.rate > 0.0) {
|
||||
GST_LOG_OBJECT (parse, "pushing frame (%" G_GSIZE_FORMAT " bytes) now..",
|
||||
size);
|
||||
ret = gst_pad_push (parse->srcpad, buffer);
|
||||
GST_LOG_OBJECT (parse, "frame (%" G_GSIZE_FORMAT " bytes) pushed: %s",
|
||||
size, gst_flow_get_name (ret));
|
||||
GST_LOG_OBJECT (parse, "frame pushed, flow %s", gst_flow_get_name (ret));
|
||||
} else {
|
||||
GST_LOG_OBJECT (parse, "frame (%" G_GSIZE_FORMAT " bytes) queued for now",
|
||||
size);
|
||||
|
@ -1946,9 +1947,9 @@ gst_base_parse_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
|||
ret = GST_FLOW_OK;
|
||||
}
|
||||
} else {
|
||||
gst_buffer_unref (buffer);
|
||||
GST_LOG_OBJECT (parse, "frame (%" G_GSIZE_FORMAT " bytes) not pushed: %s",
|
||||
size, gst_flow_get_name (ret));
|
||||
gst_buffer_unref (buffer);
|
||||
/* if we are not sufficiently in control, let upstream decide on EOS */
|
||||
if (ret == GST_FLOW_UNEXPECTED &&
|
||||
(parse->priv->passthrough ||
|
||||
|
|
|
@ -227,6 +227,8 @@ struct _GstBaseSinkPrivate
|
|||
|
||||
/* if we already commited the state */
|
||||
gboolean commited;
|
||||
/* state change to playing ongoing */
|
||||
gboolean to_playing;
|
||||
|
||||
/* when we received EOS */
|
||||
gboolean received_eos;
|
||||
|
@ -4503,6 +4505,14 @@ gst_base_sink_get_position (GstBaseSink * basesink, GstFormat format,
|
|||
else
|
||||
gst_object_ref (clock);
|
||||
|
||||
/* mainloop might be querying position when going to playing async,
|
||||
* while (audio) rendering might be quickly advancing stream position,
|
||||
* so use clock asap rather than last reported position */
|
||||
if (in_paused && with_clock && g_atomic_int_get (&basesink->priv->to_playing)) {
|
||||
GST_DEBUG_OBJECT (basesink, "going to PLAYING, so not PAUSED");
|
||||
in_paused = FALSE;
|
||||
}
|
||||
|
||||
/* collect all data we need holding the lock */
|
||||
if (GST_CLOCK_TIME_IS_VALID (segment->time))
|
||||
time = segment->time;
|
||||
|
@ -4907,6 +4917,7 @@ gst_base_sink_change_state (GstElement * element, GstStateChange transition)
|
|||
break;
|
||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||
GST_BASE_SINK_PREROLL_LOCK (basesink);
|
||||
g_atomic_int_set (&basesink->priv->to_playing, TRUE);
|
||||
if (!gst_base_sink_needs_preroll (basesink)) {
|
||||
GST_DEBUG_OBJECT (basesink, "PAUSED to PLAYING, don't need preroll");
|
||||
/* no preroll needed anymore now. */
|
||||
|
@ -4952,7 +4963,14 @@ gst_base_sink_change_state (GstElement * element, GstStateChange transition)
|
|||
}
|
||||
|
||||
switch (transition) {
|
||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||
/* completed transition, so need not be marked any longer
|
||||
* And it should be unmarked, since e.g. losing our position upon flush
|
||||
* does not really change state to PAUSED ... */
|
||||
g_atomic_int_set (&basesink->priv->to_playing, FALSE);
|
||||
break;
|
||||
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
|
||||
g_atomic_int_set (&basesink->priv->to_playing, FALSE);
|
||||
GST_DEBUG_OBJECT (basesink, "PLAYING to PAUSED");
|
||||
/* FIXME, make sure we cannot enter _render first */
|
||||
|
||||
|
|
|
@ -443,6 +443,9 @@ GST_START_TEST (test_uri_query)
|
|||
check_uri_for_location (src, "./foo", NULL);
|
||||
check_uri_for_location (src, "../foo", NULL);
|
||||
check_uri_for_location (src, "foo/./bar", NULL);
|
||||
/* make sure non-ASCII characters are escaped properly (U+00F6 here) */
|
||||
check_uri_for_location (src, "/i/./d\303\266/not/../exist",
|
||||
"file:///i/d%C3%B6/exist");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue