From: Wim Taymans Date: Tue, 15 Nov 2011 17:01:16 +0000 (+0100) Subject: _query_peer_*() -> _peer_query_*() X-Git-Tag: RELEASE-0.11.1~243 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e7918a5aba38bb306ac0f2dab4f4a15fdf0bb629;p=platform%2Fupstream%2Fgst-plugins-good.git _query_peer_*() -> _peer_query_*() --- diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c index 7143945..1ab39d7 100644 --- a/ext/flac/gstflacenc.c +++ b/ext/flac/gstflacenc.c @@ -719,18 +719,18 @@ gst_flac_enc_getcaps (GstAudioEncoder * enc, GstCaps * filter) } static guint64 -gst_flac_enc_query_peer_total_samples (GstFlacEnc * flacenc, GstPad * pad) +gst_flac_enc_peer_query_total_samples (GstFlacEnc * flacenc, GstPad * pad) { gint64 duration; GST_DEBUG_OBJECT (flacenc, "querying peer for DEFAULT format duration"); - if (gst_pad_query_peer_duration (pad, GST_FORMAT_DEFAULT, &duration) + if (gst_pad_peer_query_duration (pad, GST_FORMAT_DEFAULT, &duration) && duration != GST_CLOCK_TIME_NONE) goto done; GST_DEBUG_OBJECT (flacenc, "querying peer for TIME format duration"); - if (gst_pad_query_peer_duration (pad, GST_FORMAT_TIME, &duration) + if (gst_pad_peer_query_duration (pad, GST_FORMAT_TIME, &duration) && duration != GST_CLOCK_TIME_NONE) { GST_DEBUG_OBJECT (flacenc, "peer reported duration %" GST_TIME_FORMAT, GST_TIME_ARGS (duration)); @@ -778,7 +778,7 @@ gst_flac_enc_set_format (GstAudioEncoder * enc, GstAudioInfo * info) gst_caps_unref (caps); - total_samples = gst_flac_enc_query_peer_total_samples (flacenc, + total_samples = gst_flac_enc_peer_query_total_samples (flacenc, GST_AUDIO_ENCODER_SINK_PAD (enc)); FLAC__stream_encoder_set_bits_per_sample (flacenc->encoder, flacenc->depth); diff --git a/gst/audioparsers/gstflacparse.c b/gst/audioparsers/gstflacparse.c index 412d9ff..4308610 100644 --- a/gst/audioparsers/gstflacparse.c +++ b/gst/audioparsers/gstflacparse.c @@ -1212,7 +1212,7 @@ gst_flac_parse_generate_headers (GstFlacParse * flacparse) { gint64 duration; - if (gst_pad_query_peer_duration (GST_BASE_PARSE_SINK_PAD (flacparse), + if (gst_pad_peer_query_duration (GST_BASE_PARSE_SINK_PAD (flacparse), GST_FORMAT_TIME, &duration)) { duration = GST_CLOCK_TIME_TO_FRAMES (duration, flacparse->samplerate); diff --git a/gst/audioparsers/gstmpegaudioparse.c b/gst/audioparsers/gstmpegaudioparse.c index 93d1a02..5e332ab 100644 --- a/gst/audioparsers/gstmpegaudioparse.c +++ b/gst/audioparsers/gstmpegaudioparse.c @@ -623,7 +623,7 @@ gst_mpeg_audio_parse_handle_first_frame (GstMpegAudioParse * mp3parse, } /* obtain real upstream total bytes */ - if (!gst_pad_query_peer_duration (GST_BASE_PARSE_SINK_PAD (mp3parse), + if (!gst_pad_peer_query_duration (GST_BASE_PARSE_SINK_PAD (mp3parse), GST_FORMAT_BYTES, &upstream_total_bytes)) upstream_total_bytes = 0; diff --git a/gst/auparse/gstauparse.c b/gst/auparse/gstauparse.c index e6c32a7..f2bab52 100644 --- a/gst/auparse/gstauparse.c +++ b/gst/auparse/gstauparse.c @@ -554,7 +554,7 @@ gst_au_parse_src_query (GstPad * pad, GstQuery * query) gint64 len, val; gst_query_parse_duration (query, &format, NULL); - if (!gst_pad_query_peer_duration (auparse->sinkpad, GST_FORMAT_BYTES, + if (!gst_pad_peer_query_duration (auparse->sinkpad, GST_FORMAT_BYTES, &len)) { GST_DEBUG_OBJECT (auparse, "failed to query upstream length"); break; @@ -577,7 +577,7 @@ gst_au_parse_src_query (GstPad * pad, GstQuery * query) gint64 pos, val; gst_query_parse_position (query, &format, NULL); - if (!gst_pad_query_peer_position (auparse->sinkpad, GST_FORMAT_BYTES, + if (!gst_pad_peer_query_position (auparse->sinkpad, GST_FORMAT_BYTES, &pos)) { GST_DEBUG_OBJECT (auparse, "failed to query upstream position"); break; diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c index 98e353c..225876b 100644 --- a/gst/avi/gstavidemux.c +++ b/gst/avi/gstavidemux.c @@ -2926,7 +2926,7 @@ gst_avi_demux_stream_scan (GstAviDemux * avi) GST_DEBUG_OBJECT (avi, "Creating index"); /* get the size of the file */ - if (!gst_pad_query_peer_duration (avi->sinkpad, GST_FORMAT_BYTES, &tmplength)) + if (!gst_pad_peer_query_duration (avi->sinkpad, GST_FORMAT_BYTES, &tmplength)) return FALSE; length = tmplength; @@ -3089,7 +3089,7 @@ gst_avi_demux_check_seekability (GstAviDemux * avi) /* try harder to query upstream size if we didn't get it the first time */ if (seekable && stop == -1) { GST_DEBUG_OBJECT (avi, "doing duration query to fix up unset stop"); - gst_pad_query_peer_duration (avi->sinkpad, GST_FORMAT_BYTES, &stop); + gst_pad_peer_query_duration (avi->sinkpad, GST_FORMAT_BYTES, &stop); } /* if upstream doesn't know the size, it's likely that it's not seekable in diff --git a/gst/debugutils/progressreport.c b/gst/debugutils/progressreport.c index 5e2eecf..82f4d7d 100644 --- a/gst/debugutils/progressreport.c +++ b/gst/debugutils/progressreport.c @@ -240,8 +240,8 @@ gst_progress_report_do_query (GstProgressReport * filter, GstFormat format, if (filter->do_query || !buf) { GST_LOG_OBJECT (filter, "using upstream query"); - if (!gst_pad_query_peer_position (sink_pad, format, &cur) || - !gst_pad_query_peer_duration (sink_pad, format, &total)) { + if (!gst_pad_peer_query_position (sink_pad, format, &cur) || + !gst_pad_peer_query_duration (sink_pad, format, &total)) { return FALSE; } } else { diff --git a/gst/flv/gstflvdemux.c b/gst/flv/gstflvdemux.c index 9d49eb2..a94abe6 100644 --- a/gst/flv/gstflvdemux.c +++ b/gst/flv/gstflvdemux.c @@ -205,7 +205,7 @@ gst_flv_demux_check_seekability (GstFlvDemux * demux) /* try harder to query upstream size if we didn't get it the first time */ if (demux->upstream_seekable && stop == -1) { GST_DEBUG_OBJECT (demux, "doing duration query to fix up unset stop"); - gst_pad_query_peer_duration (demux->sinkpad, GST_FORMAT_BYTES, &stop); + gst_pad_peer_query_duration (demux->sinkpad, GST_FORMAT_BYTES, &stop); } /* if upstream doesn't know the size, it's likely that it's not seekable in @@ -2213,7 +2213,7 @@ gst_flv_demux_create_index (GstFlvDemux * demux, gint64 pos, GstClockTime ts) GstClockTime tag_time; GstFlowReturn ret = GST_FLOW_OK; - if (!gst_pad_query_peer_duration (demux->sinkpad, GST_FORMAT_BYTES, &size)) + if (!gst_pad_peer_query_duration (demux->sinkpad, GST_FORMAT_BYTES, &size)) return GST_FLOW_OK; GST_DEBUG_OBJECT (demux, "building index at %" G_GINT64_FORMAT @@ -2255,7 +2255,7 @@ gst_flv_demux_get_metadata (GstFlvDemux * demux) GstBuffer *buffer = NULL; guint8 *data; - if (!gst_pad_query_peer_duration (demux->sinkpad, GST_FORMAT_BYTES, &offset)) + if (!gst_pad_peer_query_duration (demux->sinkpad, GST_FORMAT_BYTES, &offset)) goto exit; ret = offset; @@ -2612,7 +2612,7 @@ gst_flv_demux_handle_seek_push (GstFlvDemux * demux, GstEvent * event) if (!building_index) { demux->building_index = TRUE; if (!demux->file_size - && !gst_pad_query_peer_duration (demux->sinkpad, GST_FORMAT_BYTES, + && !gst_pad_peer_query_duration (demux->sinkpad, GST_FORMAT_BYTES, &demux->file_size)) { GST_WARNING_OBJECT (demux, "Failed to query upstream file size"); GST_OBJECT_UNLOCK (demux); diff --git a/gst/flv/gstflvmux.c b/gst/flv/gstflvmux.c index e5e4163..9efd60b 100644 --- a/gst/flv/gstflvmux.c +++ b/gst/flv/gstflvmux.c @@ -782,7 +782,7 @@ gst_flv_mux_create_metadata (GstFlvMux * mux) for (l = mux->collect->data; l; l = l->next) { GstCollectData *cdata = l->data; - if (gst_pad_query_peer_duration (cdata->pad, GST_FORMAT_TIME, + if (gst_pad_peer_query_duration (cdata->pad, GST_FORMAT_TIME, (gint64 *) & dur) && dur != GST_CLOCK_TIME_NONE) { if (mux->duration == GST_CLOCK_TIME_NONE) mux->duration = dur; diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index e07f11b..6caf7f4 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -2576,7 +2576,7 @@ qtdemux_parse_mfro (GstQTDemux * qtdemux, guint64 * mfra_offset, gint64 len; GstFormat fmt = GST_FORMAT_BYTES; - if (!gst_pad_query_peer_duration (qtdemux->sinkpad, &fmt, &len)) { + if (!gst_pad_peer_query_duration (qtdemux->sinkpad, &fmt, &len)) { GST_DEBUG_OBJECT (qtdemux, "upstream size not available; " "can not locate mfro"); goto exit; @@ -3993,7 +3993,7 @@ gst_qtdemux_check_seekability (GstQTDemux * demux) /* try harder to query upstream size if we didn't get it the first time */ if (seekable && stop == -1) { GST_DEBUG_OBJECT (demux, "doing duration query to fix up unset stop"); - gst_pad_query_peer_duration (demux->sinkpad, GST_FORMAT_BYTES, &stop); + gst_pad_peer_query_duration (demux->sinkpad, GST_FORMAT_BYTES, &stop); } /* if upstream doesn't know the size, it's likely that it's not seekable in @@ -7521,7 +7521,7 @@ gst_qtdemux_guess_bitrate (GstQTDemux * qtdemux) GST_DEBUG_OBJECT (qtdemux, "Looking for streams with unknown bitrate"); - if (!gst_pad_query_peer_duration (qtdemux->sinkpad, GST_FORMAT_BYTES, &size)) { + if (!gst_pad_peer_query_duration (qtdemux->sinkpad, GST_FORMAT_BYTES, &size)) { GST_DEBUG_OBJECT (qtdemux, "Size in bytes of the stream not known - bailing"); return; diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c index 0a90936..4a59d4f 100644 --- a/gst/wavparse/gstwavparse.c +++ b/gst/wavparse/gstwavparse.c @@ -918,7 +918,7 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event) /* make sure filesize is not exceeded due to rounding errors or so, * same precaution as in _stream_headers */ bformat = GST_FORMAT_BYTES; - if (gst_pad_query_peer_duration (wav->sinkpad, bformat, &upstream_size)) + if (gst_pad_peer_query_duration (wav->sinkpad, bformat, &upstream_size)) wav->end_offset = MIN (wav->end_offset, upstream_size); /* this is the range of bytes we will use for playback */ @@ -1274,7 +1274,7 @@ gst_wavparse_stream_headers (GstWavParse * wav) } - gst_pad_query_peer_duration (wav->sinkpad, GST_FORMAT_BYTES, &upstream_size); + gst_pad_peer_query_duration (wav->sinkpad, GST_FORMAT_BYTES, &upstream_size); GST_DEBUG_OBJECT (wav, "upstream size %" G_GUINT64_FORMAT, upstream_size); /* loop headers until we get data */