}
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));
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);
{
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);
}
/* 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;
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;
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;
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;
/* 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
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 {
/* 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
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
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;
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);
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;
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;
/* 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
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;
/* 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 */
}
- 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 */