gst_pad_get_negotiated_caps() -> get_pad_get_current_caps()
+ GST_FLOW_UNEXPECTED -> GST_FLOW_EOS
+
* GstPadTemplate
gst_pad_template_get_caps() returns a new reference of the caps
and the return value needs to be unreffed after usage.
/* check if we need to wait */
if (params && (params->flags & GST_BUFFER_POOL_FLAG_DONTWAIT)) {
GST_LOG_OBJECT (pool, "no more buffers");
- result = GST_FLOW_UNEXPECTED;
+ result = GST_FLOW_EOS;
break;
}
{GST_FLOW_OK, "ok", 0},
{GST_FLOW_NOT_LINKED, "not-linked", 0},
{GST_FLOW_WRONG_STATE, "wrong-state", 0},
- {GST_FLOW_UNEXPECTED, "unexpected", 0},
+ {GST_FLOW_EOS, "eos", 0},
{GST_FLOW_NOT_NEGOTIATED, "not-negotiated", 0},
{GST_FLOW_ERROR, "error", 0},
{GST_FLOW_NOT_SUPPORTED, "not-supported", 0},
GST_PAD_STREAM_UNLOCK (pad);
*buffer = NULL;
GST_CAT_LEVEL_LOG (GST_CAT_SCHEDULING,
- (ret >= GST_FLOW_UNEXPECTED) ? GST_LEVEL_INFO : GST_LEVEL_WARNING,
+ (ret >= GST_FLOW_EOS) ? GST_LEVEL_INFO : GST_LEVEL_WARNING,
pad, "getrange failed, flow: %s", gst_flow_get_name (ret));
return ret;
}
*buffer = NULL;
GST_OBJECT_UNLOCK (pad);
GST_CAT_LEVEL_LOG (GST_CAT_SCHEDULING,
- (ret >= GST_FLOW_UNEXPECTED) ? GST_LEVEL_INFO : GST_LEVEL_WARNING,
+ (ret >= GST_FLOW_EOS) ? GST_LEVEL_INFO : GST_LEVEL_WARNING,
pad, "pullrange failed, flow: %s", gst_flow_get_name (ret));
return ret;
}
* @GST_FLOW_OK: Data passing was ok.
* @GST_FLOW_NOT_LINKED: Pad is not linked.
* @GST_FLOW_WRONG_STATE: Pad is in wrong state.
- * @GST_FLOW_UNEXPECTED: Did not expect anything, like after EOS.
+ * @GST_FLOW_EOS: Pad is EOS.
* @GST_FLOW_NOT_NEGOTIATED: Pad is not negotiated.
* @GST_FLOW_ERROR: Some (fatal) error occured. Element generating
* this error should post an error message with more
GST_FLOW_NOT_LINKED = -1,
GST_FLOW_WRONG_STATE = -2,
/* error cases */
- GST_FLOW_UNEXPECTED = -3,
+ GST_FLOW_EOS = -3,
GST_FLOW_NOT_NEGOTIATED = -4,
GST_FLOW_ERROR = -5,
GST_FLOW_NOT_SUPPORTED = -6,
GST_BUFFER_TIMESTAMP (buffer) >
parse->segment.stop + parse->priv->lead_out_ts) {
GST_LOG_OBJECT (parse, "Dropped frame, after segment");
- ret = GST_FLOW_UNEXPECTED;
+ ret = GST_FLOW_EOS;
} else if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer) &&
GST_BUFFER_DURATION_IS_VALID (buffer) &&
GST_CLOCK_TIME_IS_VALID (parse->segment.start) &&
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 &&
+ if (ret == GST_FLOW_EOS &&
(parse->priv->passthrough ||
(parse->priv->pad_mode == GST_ACTIVATE_PUSH &&
!parse->priv->upstream_seekable)))
if (!parse->priv->last_offset || parse->priv->last_ts <= parse->segment.start) {
GST_DEBUG_OBJECT (parse, "past start of segment %" GST_TIME_FORMAT,
GST_TIME_ARGS (parse->segment.start));
- ret = GST_FLOW_UNEXPECTED;
+ ret = GST_FLOW_EOS;
goto exit;
}
goto done;
if (gst_buffer_get_size (outbuf) < fsize) {
gst_buffer_unref (outbuf);
- ret = GST_FLOW_UNEXPECTED;
+ ret = GST_FLOW_EOS;
}
}
ret = gst_base_parse_handle_and_push_frame (parse, klass, &frame);
/* eat expected eos signalling past segment in reverse playback */
- if (parse->segment.rate < 0.0 && ret == GST_FLOW_UNEXPECTED &&
+ if (parse->segment.rate < 0.0 && ret == GST_FLOW_EOS &&
parse->segment.position >= parse->segment.stop) {
GST_DEBUG_OBJECT (parse, "downstream has reached end of segment");
/* push what was accumulated during loop run */
}
done:
- if (ret == GST_FLOW_UNEXPECTED)
+ if (ret == GST_FLOW_EOS)
goto eos;
else if (ret != GST_FLOW_OK)
goto pause;
/* ERRORS */
eos:
{
- ret = GST_FLOW_UNEXPECTED;
+ ret = GST_FLOW_EOS;
GST_DEBUG_OBJECT (parse, "eos");
/* fall-through */
}
gst_flow_get_name (ret));
gst_pad_pause_task (parse->sinkpad);
- if (ret == GST_FLOW_UNEXPECTED) {
+ if (ret == GST_FLOW_EOS) {
/* handle end-of-stream/segment */
if (parse->segment.flags & GST_SEEK_FLAG_SEGMENT) {
gint64 stop;
}
push_eos = TRUE;
}
- } else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED) {
+ } else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
/* for fatal errors we post an error message, wrong-state is
* not fatal because it happens due to flushes and only means
* that we should stop now. */
GST_TIME_ARGS (time), newpos);
ret = gst_base_parse_find_frame (parse, &newpos, &newtime, &dur);
- if (ret == GST_FLOW_UNEXPECTED) {
+ if (ret == GST_FLOW_EOS) {
/* heuristic HACK */
hpos = MAX (lpos, hpos - chunk);
continue;
/* FIXME: Casting to GstClockEntry only works because the types
* are the same */
if (G_LIKELY (sink->priv->cached_clock_id != NULL
- && GST_CLOCK_ENTRY_CLOCK ((GstClockEntry *) sink->priv->
- cached_clock_id) == clock)) {
+ && GST_CLOCK_ENTRY_CLOCK ((GstClockEntry *) sink->
+ priv->cached_clock_id) == clock)) {
if (!gst_clock_single_shot_id_reinit (clock, sink->priv->cached_clock_id,
time)) {
gst_clock_id_unref (sink->priv->cached_clock_id);
}
was_eos:
{
- GST_DEBUG_OBJECT (basesink,
- "we are EOS, dropping object, return UNEXPECTED");
+ GST_DEBUG_OBJECT (basesink, "we are EOS, dropping object, return EOS");
GST_BASE_SINK_PREROLL_UNLOCK (basesink);
gst_mini_object_unref (obj);
- return GST_FLOW_UNEXPECTED;
+ return GST_FLOW_EOS;
}
}
}
was_eos:
{
- GST_DEBUG_OBJECT (basesink,
- "we are EOS, dropping object, return UNEXPECTED");
+ GST_DEBUG_OBJECT (basesink, "we are EOS, dropping object, return EOS");
gst_mini_object_unref (GST_MINI_OBJECT_CAST (obj));
- return GST_FLOW_UNEXPECTED;
+ return GST_FLOW_EOS;
}
out_of_segment:
{
gst_mini_object_unref (GST_MINI_OBJECT_CAST (obj));
/* we don't post an error message this will signal to the peer
* pushing that EOS is reached. */
- result = GST_FLOW_UNEXPECTED;
+ result = GST_FLOW_EOS;
goto done;
}
}
GST_LOG_OBJECT (basesink, "pausing task, reason %s",
gst_flow_get_name (result));
gst_pad_pause_task (pad);
- if (result == GST_FLOW_UNEXPECTED) {
+ if (result == GST_FLOW_EOS) {
/* perform EOS logic */
if (basesink->segment.flags & GST_SEEK_FLAG_SEGMENT) {
gst_element_post_message (GST_ELEMENT_CAST (basesink),
} else {
gst_base_sink_event (pad, gst_event_new_eos ());
}
- } else if (result == GST_FLOW_NOT_LINKED || result <= GST_FLOW_UNEXPECTED) {
+ } else if (result == GST_FLOW_NOT_LINKED || result <= GST_FLOW_EOS) {
/* for fatal errors we post an error message, post the error
* first so the app knows about the error first.
* wrong-state is not a fatal error because it happens due to
{
GST_DEBUG_OBJECT (src, "unexpected length %u (offset=%" G_GUINT64_FORMAT
", size=%" G_GINT64_FORMAT ")", length, offset, src->segment.duration);
- return GST_FLOW_UNEXPECTED;
+ return GST_FLOW_EOS;
}
reached_num_buffers:
{
GST_DEBUG_OBJECT (src, "sent all buffers");
- return GST_FLOW_UNEXPECTED;
+ return GST_FLOW_EOS;
}
flushing:
{
eos:
{
GST_DEBUG_OBJECT (src, "we are EOS");
- return GST_FLOW_UNEXPECTED;
+ return GST_FLOW_EOS;
}
}
if (G_UNLIKELY (eos)) {
GST_INFO_OBJECT (src, "pausing after end of segment");
- ret = GST_FLOW_UNEXPECTED;
+ ret = GST_FLOW_EOS;
goto pause;
}
GST_DEBUG_OBJECT (src, "pausing task, reason %s", reason);
src->running = FALSE;
gst_pad_pause_task (pad);
- if (ret == GST_FLOW_UNEXPECTED) {
+ if (ret == GST_FLOW_EOS) {
gboolean flag_segment;
GstFormat format;
gint64 position;
gst_event_set_seqnum (event, src->priv->seqnum);
gst_pad_push_event (pad, event);
}
- } else if (ret == GST_FLOW_NOT_LINKED || ret <= GST_FLOW_UNEXPECTED) {
+ } else if (ret == GST_FLOW_NOT_LINKED || ret <= GST_FLOW_EOS) {
event = gst_event_new_eos ();
gst_event_set_seqnum (event, src->priv->seqnum);
/* for fatal errors we post an error message, post the error
/* we should not post an error for this, just inform upstream that
* we don't expect anything anymore */
GST_DEBUG ("pad %s:%s is eos", GST_DEBUG_PAD_NAME (pad));
- ret = GST_FLOW_UNEXPECTED;
+ ret = GST_FLOW_EOS;
goto unlock_done;
}
clipped:
eos:
{
GST_DEBUG_OBJECT (sink, "we are EOS");
- return GST_FLOW_UNEXPECTED;
+ return GST_FLOW_EOS;
}
}
eos:
{
GST_DEBUG_OBJECT (sink, "we are EOS");
- return GST_FLOW_UNEXPECTED;
+ return GST_FLOW_EOS;
}
}
{
GST_DEBUG_OBJECT (psrc, "Read 0 bytes. EOS.");
gst_buffer_unref (buf);
- return GST_FLOW_UNEXPECTED;
+ return GST_FLOW_EOS;
}
read_error:
{
{
GST_DEBUG ("non-regular file hits EOS");
gst_buffer_unmap (buf, data, 0);
- return GST_FLOW_UNEXPECTED;
+ return GST_FLOW_EOS;
}
}
identity->clock_id = NULL;
}
if (cret == GST_CLOCK_UNSCHEDULED)
- ret = GST_FLOW_UNEXPECTED;
+ ret = GST_FLOW_EOS;
}
GST_OBJECT_UNLOCK (identity);
}
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_EOS:
- result = GST_FLOW_UNEXPECTED;
+ result = GST_FLOW_EOS;
break;
case GST_EVENT_SEGMENT:
apply_segment (mq, sq, event, &sq->src_segment);
object = NULL;
if (result != GST_FLOW_OK && result != GST_FLOW_NOT_LINKED
- && result != GST_FLOW_UNEXPECTED)
+ && result != GST_FLOW_EOS)
goto out_flushing;
GST_LOG_OBJECT (mq, "AFTER PUSHING sq->srcresult: %s",
* but might be stuck in one of our other full queues;
* so empty this one and trigger dynamic queue growth. At
* this point the srcresult is not OK, NOT_LINKED
- * or UNEXPECTED, i.e. a real failure */
+ * or EOS, i.e. a real failure */
gst_data_queue_flush (sq->queue);
single_queue_underrun_cb (sq->queue, sq);
gst_data_queue_set_flushing (sq->queue, TRUE);
}
was_eos:
{
- GST_DEBUG_OBJECT (mq, "we are EOS, dropping buffer, return UNEXPECTED");
+ GST_DEBUG_OBJECT (mq, "we are EOS, dropping buffer, return EOS");
gst_buffer_unref (buffer);
- return GST_FLOW_UNEXPECTED;
+ return GST_FLOW_EOS;
}
}
if (sq->nextid < lowest)
lowest = sq->nextid;
- } else if (sq->srcresult != GST_FLOW_UNEXPECTED) {
+ } else if (sq->srcresult != GST_FLOW_EOS) {
/* If we don't have a global highid, or the global highid is lower than
* this single queue's last outputted id, store the queue's one,
- * unless the singlequeue is at EOS (srcresult = UNEXPECTED) */
+ * unless the singlequeue is at EOS (srcresult = EOS) */
if ((highid == G_MAXUINT32) || (sq->oldid > highid))
highid = sq->oldid;
}
if (lowest == GST_CLOCK_TIME_NONE || sq->next_time < lowest)
lowest = sq->next_time;
- } else if (sq->srcresult != GST_FLOW_UNEXPECTED) {
+ } else if (sq->srcresult != GST_FLOW_EOS) {
/* If we don't have a global highid, or the global highid is lower than
* this single queue's last outputted id, store the queue's one,
- * unless the singlequeue is at EOS (srcresult = UNEXPECTED) */
+ * unless the singlequeue is at EOS (srcresult = EOS) */
if (highest == GST_CLOCK_TIME_NONE || sq->last_time > highest)
highest = sq->last_time;
}
apply_segment (queue, event, &queue->src_segment, FALSE);
queue->newseg_applied_to_src = TRUE;
}
- /* a new segment allows us to accept more buffers if we got UNEXPECTED
+ /* a new segment allows us to accept more buffers if we got EOS
* from downstream */
queue->unexpected = FALSE;
break;
gst_buffer_unref (buffer);
- return GST_FLOW_UNEXPECTED;
+ return GST_FLOW_EOS;
}
out_unexpected:
{
- GST_CAT_LOG_OBJECT (queue_dataflow, queue,
- "exit because we received UNEXPECTED");
+ GST_CAT_LOG_OBJECT (queue_dataflow, queue, "exit because we received EOS");
GST_QUEUE_MUTEX_UNLOCK (queue);
gst_buffer_unref (buffer);
- return GST_FLOW_UNEXPECTED;
+ return GST_FLOW_EOS;
}
}
/* need to check for srcresult here as well */
GST_QUEUE_MUTEX_LOCK_CHECK (queue, out_flushing);
- if (result == GST_FLOW_UNEXPECTED) {
- GST_CAT_LOG_OBJECT (queue_dataflow, queue,
- "got UNEXPECTED from downstream");
+ if (result == GST_FLOW_EOS) {
+ GST_CAT_LOG_OBJECT (queue_dataflow, queue, "got EOS from downstream");
/* stop pushing buffers, we dequeue all items until we see an item that we
* can push again, which is EOS or SEGMENT. If there is nothing in the
* queue we can push, we set a flag to make the sinkpad refuse more
- * buffers with an UNEXPECTED return value. */
+ * buffers with an EOS return value. */
while ((data = gst_queue_locked_dequeue (queue, &is_buffer))) {
if (is_buffer) {
GST_CAT_LOG_OBJECT (queue_dataflow, queue,
- "dropping UNEXPECTED buffer %p", data);
+ "dropping EOS buffer %p", data);
gst_buffer_unref (GST_BUFFER_CAST (data));
} else {
GstEvent *event = GST_EVENT_CAST (data);
if (type == GST_EVENT_EOS || type == GST_EVENT_SEGMENT) {
/* we found a pushable item in the queue, push it out */
GST_CAT_LOG_OBJECT (queue_dataflow, queue,
- "pushing pushable event %s after UNEXPECTED",
+ "pushing pushable event %s after EOS",
GST_EVENT_TYPE_NAME (event));
goto next;
}
GST_CAT_LOG_OBJECT (queue_dataflow, queue,
- "dropping UNEXPECTED event %p", event);
+ "dropping EOS event %p", event);
gst_event_unref (event);
}
}
gst_pad_push_event (queue->srcpad, event);
GST_QUEUE_MUTEX_LOCK_CHECK (queue, out_flushing);
- /* if we're EOS, return UNEXPECTED so that the task pauses. */
+ /* if we're EOS, return EOS so that the task pauses. */
if (type == GST_EVENT_EOS) {
GST_CAT_LOG_OBJECT (queue_dataflow, queue,
- "pushed EOS event %p, return UNEXPECTED", event);
- result = GST_FLOW_UNEXPECTED;
+ "pushed EOS event %p, return EOS", event);
+ result = GST_FLOW_EOS;
}
}
return result;
GST_QUEUE_SIGNAL_DEL (queue);
GST_QUEUE_MUTEX_UNLOCK (queue);
/* let app know about us giving up if upstream is not expected to do so */
- /* UNEXPECTED is already taken care of elsewhere */
- if (eos && (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED)) {
+ /* EOS is already taken care of elsewhere */
+ if (eos && (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS)) {
GST_ELEMENT_ERROR (queue, STREAM, FAILED,
(_("Internal data flow error.")),
("streaming task paused, reason %s (%d)",
eos:
{
GST_DEBUG ("non-regular file hits EOS");
- return GST_FLOW_UNEXPECTED;
+ return GST_FLOW_EOS;
}
}
{
GST_DEBUG_OBJECT (queue, "EOS hit and we don't have any requested data");
gst_buffer_unref (buf);
- return GST_FLOW_UNEXPECTED;
+ return GST_FLOW_EOS;
}
out_flushing:
{
case GST_FLOW_OK:
item = GST_MINI_OBJECT_CAST (buffer);
break;
- case GST_FLOW_UNEXPECTED:
+ case GST_FLOW_EOS:
item = GST_MINI_OBJECT_CAST (gst_event_new_eos ());
break;
default:
{
GST_DEBUG_OBJECT (queue, "we are flushing");
gst_buffer_unmap (buffer, odata, osize);
- /* FIXME - GST_FLOW_UNEXPECTED ? */
+ /* FIXME - GST_FLOW_EOS ? */
return FALSE;
}
seek_failed:
queue->starting_segment = event;
item = NULL;
}
- /* a new segment allows us to accept more buffers if we got UNEXPECTED
+ /* a new segment allows us to accept more buffers if we got EOS
* from downstream */
queue->unexpected = FALSE;
break;
GST_QUEUE2_MUTEX_UNLOCK (queue);
gst_buffer_unref (buffer);
- return GST_FLOW_UNEXPECTED;
+ return GST_FLOW_EOS;
}
out_unexpected:
{
- GST_CAT_LOG_OBJECT (queue_dataflow, queue,
- "exit because we received UNEXPECTED");
+ GST_CAT_LOG_OBJECT (queue_dataflow, queue, "exit because we received EOS");
GST_QUEUE2_MUTEX_UNLOCK (queue);
gst_buffer_unref (buffer);
- return GST_FLOW_UNEXPECTED;
+ return GST_FLOW_EOS;
}
}
/* need to check for srcresult here as well */
GST_QUEUE2_MUTEX_LOCK_CHECK (queue, queue->srcresult, out_flushing);
- if (result == GST_FLOW_UNEXPECTED) {
- GST_CAT_LOG_OBJECT (queue_dataflow, queue,
- "got UNEXPECTED from downstream");
+ if (result == GST_FLOW_EOS) {
+ GST_CAT_LOG_OBJECT (queue_dataflow, queue, "got EOS from downstream");
/* stop pushing buffers, we dequeue all items until we see an item that we
* can push again, which is EOS or SEGMENT. If there is nothing in the
* queue we can push, we set a flag to make the sinkpad refuse more
- * buffers with an UNEXPECTED return value until we receive something
+ * buffers with an EOS return value until we receive something
* pushable again or we get flushed. */
while ((data = gst_queue2_locked_dequeue (queue, &is_buffer))) {
if (is_buffer) {
GST_CAT_LOG_OBJECT (queue_dataflow, queue,
- "dropping UNEXPECTED buffer %p", data);
+ "dropping EOS buffer %p", data);
gst_buffer_unref (GST_BUFFER_CAST (data));
} else if (GST_IS_EVENT (data)) {
GstEvent *event = GST_EVENT_CAST (data);
if (type == GST_EVENT_EOS || type == GST_EVENT_SEGMENT) {
/* we found a pushable item in the queue, push it out */
GST_CAT_LOG_OBJECT (queue_dataflow, queue,
- "pushing pushable event %s after UNEXPECTED",
+ "pushing pushable event %s after EOS",
GST_EVENT_TYPE_NAME (event));
goto next;
}
GST_CAT_LOG_OBJECT (queue_dataflow, queue,
- "dropping UNEXPECTED event %p", event);
+ "dropping EOS event %p", event);
gst_event_unref (event);
}
}
gst_pad_push_event (queue->srcpad, event);
- /* if we're EOS, return UNEXPECTED so that the task pauses. */
+ /* if we're EOS, return EOS so that the task pauses. */
if (type == GST_EVENT_EOS) {
GST_CAT_LOG_OBJECT (queue_dataflow, queue,
- "pushed EOS event %p, return UNEXPECTED", event);
- result = GST_FLOW_UNEXPECTED;
+ "pushed EOS event %p, return EOS", event);
+ result = GST_FLOW_EOS;
}
GST_QUEUE2_MUTEX_LOCK_CHECK (queue, queue->srcresult, out_flushing);
GST_CAT_LOG_OBJECT (queue_dataflow, queue,
"pause task, reason: %s", gst_flow_get_name (queue->srcresult));
/* let app know about us giving up if upstream is not expected to do so */
- /* UNEXPECTED is already taken care of elsewhere */
- if (eos && (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED)) {
+ /* EOS is already taken care of elsewhere */
+ if (eos && (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS)) {
GST_ELEMENT_ERROR (queue, STREAM, FAILED,
(_("Internal data flow error.")),
("streaming task paused, reason %s (%d)",
GST_DEBUG_OBJECT (queue, "read beyond end of file");
GST_QUEUE2_MUTEX_UNLOCK (queue);
gst_object_unref (queue);
- return GST_FLOW_UNEXPECTED;
+ return GST_FLOW_EOS;
}
}
if (ret == GST_FLOW_OK)
ret = gst_tee_handle_data (tee, gst_buffer_ref (*buf), FALSE);
- else if (ret == GST_FLOW_UNEXPECTED)
+ else if (ret == GST_FLOW_EOS)
gst_tee_pull_eos (tee);
gst_object_unref (tee);
GST_DEBUG ("sending buffer");
- /* buffer after EOS is not UNEXPECTED */
+ /* buffer after EOS is not EOS */
fret = gst_pad_chain (sinkpad, buffer);
- fail_unless (fret == GST_FLOW_UNEXPECTED);
+ fail_unless (fret == GST_FLOW_EOS);
}
/* flush, EOS state is flushed again. */
fail_if (eret == FALSE);
}
- /* send buffer that should return UNEXPECTED */
+ /* send buffer that should return EOS */
{
GstBuffer *buffer;
GstFlowReturn fret;
GST_DEBUG ("sending buffer");
- /* this buffer will generate UNEXPECTED */
+ /* this buffer will generate EOS */
fret = gst_pad_chain (sinkpad, buffer);
- fail_unless (fret == GST_FLOW_UNEXPECTED);
+ fail_unless (fret == GST_FLOW_EOS);
}
- /* send buffer that should return UNEXPECTED */
+ /* send buffer that should return EOS */
{
GstBuffer *buffer;
GstFlowReturn fret;
GST_DEBUG ("sending buffer");
fret = gst_pad_chain (sinkpad, buffer);
- fail_unless (fret == GST_FLOW_UNEXPECTED);
+ fail_unless (fret == GST_FLOW_EOS);
}
gst_element_set_state (pipeline, GST_STATE_NULL);
fail_if (eret == FALSE);
}
- /* send buffer that should return UNEXPECTED */
+ /* send buffer that should return EOS */
buffer = gst_buffer_new ();
GST_BUFFER_TIMESTAMP (buffer) = 3 * GST_SECOND;
GST_BUFFER_DURATION (buffer) = 1 * GST_SECOND;
/* preroll buffer is rendered, we expect no more buffer after this one */
fret = chain_async_return (data);
- fail_unless (fret == GST_FLOW_UNEXPECTED);
+ fail_unless (fret == GST_FLOW_EOS);
/* do position query, this should succeed with the stream time of the buffer
* against the clock. Since the buffer is synced against the clock, the time
/* read 0 bytes at end should EOS */
ret = gst_pad_get_range (pad, stop, 0, &buffer1);
- fail_unless (ret == GST_FLOW_UNEXPECTED);
+ fail_unless (ret == GST_FLOW_EOS);
/* read 10 bytes before end should EOS */
ret = gst_pad_get_range (pad, stop, 10, &buffer1);
- fail_unless (ret == GST_FLOW_UNEXPECTED);
+ fail_unless (ret == GST_FLOW_EOS);
/* read 0 bytes after end should EOS */
ret = gst_pad_get_range (pad, stop + 10, 0, &buffer1);
- fail_unless (ret == GST_FLOW_UNEXPECTED);
+ fail_unless (ret == GST_FLOW_EOS);
/* read 10 bytes after end should EOS too */
ret = gst_pad_get_range (pad, stop + 10, 10, &buffer1);
- fail_unless (ret == GST_FLOW_UNEXPECTED);
+ fail_unless (ret == GST_FLOW_EOS);
fail_unless (gst_element_set_state (src,
GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
GQuark quark;
/* test some of the macros */
- ret = GST_FLOW_UNEXPECTED;
- fail_if (strcmp (gst_flow_get_name (ret), "unexpected"));
+ ret = GST_FLOW_EOS;
+ fail_if (strcmp (gst_flow_get_name (ret), "eos"));
quark = gst_flow_to_quark (ret);
- fail_if (strcmp (g_quark_to_string (quark), "unexpected"));
+ fail_if (strcmp (g_quark_to_string (quark), "eos"));
ret = GST_FLOW_RESEND;
fail_if (strcmp (gst_flow_get_name (ret), "resend"));