From de1f89bf07b2ad3244b1ece3c4c276046f7e8a09 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 8 Feb 2012 16:37:13 +0100 Subject: GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING --- gst/audiobuffer/gstaudioringbuffer.c | 4 ++-- gst/camerabin/gstinputselector.c | 2 +- gst/dtmf/gstdtmfsrc.c | 2 +- gst/dtmf/gstrtpdtmfsrc.c | 2 +- gst/freeze/gstfreeze.c | 2 +- gst/liveadder/liveadder.c | 2 +- gst/mpegdemux/gstmpegdemux.c | 4 ++-- gst/multifdsink/gstmultifdsink.c | 2 +- gst/mxf/mxfdemux.c | 42 ++++++++++++++++++------------------ gst/nuvdemux/gstnuvdemux.c | 2 +- gst/tta/gstttaparse.c | 2 +- 11 files changed, 33 insertions(+), 33 deletions(-) (limited to 'gst') diff --git a/gst/audiobuffer/gstaudioringbuffer.c b/gst/audiobuffer/gstaudioringbuffer.c index e3bc47a56..d46d2d896 100644 --- a/gst/audiobuffer/gstaudioringbuffer.c +++ b/gst/audiobuffer/gstaudioringbuffer.c @@ -778,7 +778,7 @@ flushing: { GST_DEBUG_OBJECT (ringbuffer, "ringbuffer is flushing"); GST_OBJECT_UNLOCK (ringbuffer); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } } @@ -944,7 +944,7 @@ flushing: GST_DEBUG_OBJECT (ringbuffer, "we are flushing"); GST_OBJECT_UNLOCK (ringbuffer); gst_object_unref (ringbuffer); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } wrong_size: { diff --git a/gst/camerabin/gstinputselector.c b/gst/camerabin/gstinputselector.c index 8fe8c0f02..750d6ce87 100644 --- a/gst/camerabin/gstinputselector.c +++ b/gst/camerabin/gstinputselector.c @@ -675,7 +675,7 @@ flushing: GST_DEBUG_OBJECT (pad, "We are flushing, discard buffer %p", buf); GST_INPUT_SELECTOR_UNLOCK (sel); gst_buffer_unref (buf); - res = GST_FLOW_WRONG_STATE; + res = GST_FLOW_FLUSHING; goto done; } } diff --git a/gst/dtmf/gstdtmfsrc.c b/gst/dtmf/gstdtmfsrc.c index c7b4945ed..9e3ea47a1 100644 --- a/gst/dtmf/gstdtmfsrc.c +++ b/gst/dtmf/gstdtmfsrc.c @@ -798,7 +798,7 @@ paused: dtmfsrc->last_event = NULL; } - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } diff --git a/gst/dtmf/gstrtpdtmfsrc.c b/gst/dtmf/gstrtpdtmfsrc.c index f97261ef6..6e6140af7 100644 --- a/gst/dtmf/gstrtpdtmfsrc.c +++ b/gst/dtmf/gstrtpdtmfsrc.c @@ -844,7 +844,7 @@ paused: dtmfsrc->redundancy_count = dtmfsrc->packet_redundancy; goto send_last; } else { - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } no_clock: diff --git a/gst/freeze/gstfreeze.c b/gst/freeze/gstfreeze.c index 0d63eb70a..1ead31970 100644 --- a/gst/freeze/gstfreeze.c +++ b/gst/freeze/gstfreeze.c @@ -239,7 +239,7 @@ gst_freeze_play (GstPad * pad, GstBuffer * buff) if (freeze->on_flush) { g_object_unref (freeze); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } /* If it is working in push mode this function will be called by "_chain" diff --git a/gst/liveadder/liveadder.c b/gst/liveadder/liveadder.c index ec232a709..fc3154ce9 100644 --- a/gst/liveadder/liveadder.c +++ b/gst/liveadder/liveadder.c @@ -425,7 +425,7 @@ gst_live_adder_flush_start (GstLiveAdder * adder) GST_OBJECT_LOCK (adder); /* mark ourselves as flushing */ - adder->srcresult = GST_FLOW_WRONG_STATE; + adder->srcresult = GST_FLOW_FLUSHING; /* Empty the queue */ g_queue_foreach (adder->buffers, (GFunc) gst_mini_object_unref, NULL); diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c index a76f11db2..4bf623546 100644 --- a/gst/mpegdemux/gstmpegdemux.c +++ b/gst/mpegdemux/gstmpegdemux.c @@ -2738,7 +2738,7 @@ gst_flups_demux_loop (GstPad * pad) demux = GST_FLUPS_DEMUX (gst_pad_get_parent (pad)); if (G_UNLIKELY (demux->flushing)) { - ret = GST_FLOW_WRONG_STATE; + ret = GST_FLOW_FLUSHING; goto pause; } @@ -3013,7 +3013,7 @@ gst_flups_demux_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) while (gst_flups_demux_resync (demux, save)) { gboolean ps_sync = TRUE; if (G_UNLIKELY (demux->flushing)) { - ret = GST_FLOW_WRONG_STATE; + ret = GST_FLOW_FLUSHING; goto done; } diff --git a/gst/multifdsink/gstmultifdsink.c b/gst/multifdsink/gstmultifdsink.c index ca179210c..0cebea786 100644 --- a/gst/multifdsink/gstmultifdsink.c +++ b/gst/multifdsink/gstmultifdsink.c @@ -2481,7 +2481,7 @@ gst_multi_fd_sink_render (GstBaseSink * bsink, GstBuffer * buf) sink = GST_MULTI_FD_SINK (bsink); g_return_val_if_fail (GST_OBJECT_FLAG_IS_SET (sink, GST_MULTI_FD_SINK_OPEN), - GST_FLOW_WRONG_STATE); + GST_FLOW_FLUSHING); #if 0 /* since we check every buffer for streamheader caps, we need to make diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index 496ee38f7..47042103d 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -611,11 +611,11 @@ gst_mxf_demux_choose_package (GstMXFDemux * demux) for (i = 0; i < demux->preface->content_storage->n_packages; i++) { if (demux->preface->content_storage->packages[i] && - MXF_IS_METADATA_MATERIAL_PACKAGE (demux->preface-> - content_storage->packages[i])) { + MXF_IS_METADATA_MATERIAL_PACKAGE (demux->preface->content_storage-> + packages[i])) { ret = - MXF_METADATA_GENERIC_PACKAGE (demux->preface-> - content_storage->packages[i]); + MXF_METADATA_GENERIC_PACKAGE (demux->preface->content_storage-> + packages[i]); break; } } @@ -775,8 +775,8 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux) essence_container); if (track->parent.type == MXF_METADATA_TRACK_PICTURE_ESSENCE) { - if (MXF_IS_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (track-> - parent.descriptor[0])) + if (MXF_IS_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (track->parent. + descriptor[0])) mxf_ul_to_string (&MXF_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (track->parent.descriptor[0])->picture_essence_coding, essence_compression); @@ -785,8 +785,8 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux) g_strdup_printf ("video/x-mxf-%s-%s", essence_container, essence_compression); } else if (track->parent.type == MXF_METADATA_TRACK_SOUND_ESSENCE) { - if (MXF_IS_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track-> - parent.descriptor[0])) + if (MXF_IS_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track->parent. + descriptor[0])) mxf_ul_to_string (&MXF_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track->parent.descriptor[0])->sound_essence_compression, essence_compression); @@ -795,8 +795,8 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux) g_strdup_printf ("audio/x-mxf-%s-%s", essence_container, essence_compression); } else if (track->parent.type == MXF_METADATA_TRACK_DATA_ESSENCE) { - if (MXF_IS_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR (track-> - parent.descriptor[0])) + if (MXF_IS_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR (track->parent. + descriptor[0])) mxf_ul_to_string (&MXF_METADATA_GENERIC_DATA_ESSENCE_DESCRIPTOR (track->parent.descriptor[0])->data_essence_coding, essence_compression); @@ -1421,8 +1421,8 @@ gst_mxf_demux_pad_set_component (GstMXFDemux * demux, GstMXFDemuxPad * pad, pad->current_component_index); pad->current_component = - MXF_METADATA_SOURCE_CLIP (sequence-> - structural_components[pad->current_component_index]); + MXF_METADATA_SOURCE_CLIP (sequence->structural_components[pad-> + current_component_index]); if (pad->current_component == NULL) { GST_ERROR_OBJECT (demux, "No such structural component"); return GST_FLOW_ERROR; @@ -1430,8 +1430,8 @@ gst_mxf_demux_pad_set_component (GstMXFDemux * demux, GstMXFDemuxPad * pad, if (!pad->current_component->source_package || !pad->current_component->source_package->top_level - || !MXF_METADATA_GENERIC_PACKAGE (pad-> - current_component->source_package)->tracks) { + || !MXF_METADATA_GENERIC_PACKAGE (pad->current_component-> + source_package)->tracks) { GST_ERROR_OBJECT (demux, "Invalid component"); return GST_FLOW_ERROR; } @@ -2849,7 +2849,7 @@ gst_mxf_demux_chain (GstPad * pad, GstBuffer * inbuf) while (ret == GST_FLOW_OK) { if (G_UNLIKELY (demux->flushing)) { GST_DEBUG_OBJECT (demux, "we are now flushing, exiting parser loop"); - ret = GST_FLOW_WRONG_STATE; + ret = GST_FLOW_FLUSHING; break; } @@ -2998,8 +2998,8 @@ gst_mxf_demux_pad_set_last_stop (GstMXFDemux * demux, GstMXFDemuxPad * p, for (i = 0; i < p->material_track->parent.sequence->n_structural_components; i++) { clip = - MXF_METADATA_SOURCE_CLIP (p->material_track->parent. - sequence->structural_components[i]); + MXF_METADATA_SOURCE_CLIP (p->material_track->parent.sequence-> + structural_components[i]); if (clip->parent.duration <= 0) break; @@ -3077,8 +3077,8 @@ gst_mxf_demux_seek_push (GstMXFDemux * demux, GstEvent * event) if (format != GST_FORMAT_TIME) goto wrong_format; - flush = !!(flags & GST_SEEK_FLAG_FLUSH); - keyframe = !!(flags & GST_SEEK_FLAG_KEY_UNIT); + flush = ! !(flags & GST_SEEK_FLAG_FLUSH); + keyframe = ! !(flags & GST_SEEK_FLAG_KEY_UNIT); /* Work on a copy until we are sure the seek succeeded. */ memcpy (&seeksegment, &demux->segment, sizeof (GstSegment)); @@ -3210,8 +3210,8 @@ gst_mxf_demux_seek_pull (GstMXFDemux * demux, GstEvent * event) if (rate <= 0.0) goto wrong_rate; - flush = !!(flags & GST_SEEK_FLAG_FLUSH); - keyframe = !!(flags & GST_SEEK_FLAG_KEY_UNIT); + flush = ! !(flags & GST_SEEK_FLAG_FLUSH); + keyframe = ! !(flags & GST_SEEK_FLAG_KEY_UNIT); if (flush) { GstEvent *e; diff --git a/gst/nuvdemux/gstnuvdemux.c b/gst/nuvdemux/gstnuvdemux.c index 22efb9402..7569eb30b 100644 --- a/gst/nuvdemux/gstnuvdemux.c +++ b/gst/nuvdemux/gstnuvdemux.c @@ -773,7 +773,7 @@ gst_nuv_demux_read_bytes (GstNuvDemux * nuv, guint64 size, gboolean move, /* got eos */ } else if (ret == GST_FLOW_UNEXPECTED) { gst_nuv_demux_send_eos (nuv); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } } else { if (gst_adapter_available (nuv->adapter) < size) diff --git a/gst/tta/gstttaparse.c b/gst/tta/gstttaparse.c index 069408ab6..e7c131ba9 100644 --- a/gst/tta/gstttaparse.c +++ b/gst/tta/gstttaparse.c @@ -432,7 +432,7 @@ found_eos: { GST_DEBUG ("found EOS"); gst_pad_push_event (ttaparse->srcpad, gst_event_new_eos ()); - return GST_FLOW_WRONG_STATE; + return GST_FLOW_FLUSHING; } pull_error: { -- cgit v1.2.1