mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
Pass unhandled queries upstream instead of just dropping them (#326446). Update query type arrays here and there.
Original commit message from CVS: * ext/dv/gstdvdemux.c: (gst_dvdemux_src_query), (gst_dvdemux_sink_query): * ext/flac/gstflacdec.c: (gst_flac_dec_src_query): * ext/speex/gstspeexdec.c: (speex_get_query_types), (speex_dec_src_query): * ext/speex/gstspeexenc.c: (gst_speexenc_src_query), (gst_speexenc_sink_query): * gst/avi/gstavidemux.c: (gst_avi_demux_handle_src_query): * gst/matroska/matroska-demux.c: (gst_matroska_demux_get_src_query_types), (gst_matroska_demux_handle_src_query): * gst/wavparse/gstwavparse.c: (gst_wavparse_get_query_types), (gst_wavparse_pad_query): Pass unhandled queries upstream instead of just dropping them (#326446). Update query type arrays here and there.
This commit is contained in:
parent
323331a051
commit
3a27956d47
8 changed files with 41 additions and 17 deletions
18
ChangeLog
18
ChangeLog
|
@ -1,3 +1,21 @@
|
||||||
|
2006-02-06 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* ext/dv/gstdvdemux.c: (gst_dvdemux_src_query),
|
||||||
|
(gst_dvdemux_sink_query):
|
||||||
|
* ext/flac/gstflacdec.c: (gst_flac_dec_src_query):
|
||||||
|
* ext/speex/gstspeexdec.c: (speex_get_query_types),
|
||||||
|
(speex_dec_src_query):
|
||||||
|
* ext/speex/gstspeexenc.c: (gst_speexenc_src_query),
|
||||||
|
(gst_speexenc_sink_query):
|
||||||
|
* gst/avi/gstavidemux.c: (gst_avi_demux_handle_src_query):
|
||||||
|
* gst/matroska/matroska-demux.c:
|
||||||
|
(gst_matroska_demux_get_src_query_types),
|
||||||
|
(gst_matroska_demux_handle_src_query):
|
||||||
|
* gst/wavparse/gstwavparse.c: (gst_wavparse_get_query_types),
|
||||||
|
(gst_wavparse_pad_query):
|
||||||
|
Pass unhandled queries upstream instead of just dropping
|
||||||
|
them (#326446). Update query type arrays here and there.
|
||||||
|
|
||||||
2006-02-06 Tim-Philipp Müller <tim at centricular dot net>
|
2006-02-06 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* tests/check/elements/matroskamux.c: (setup_src_pad):
|
* tests/check/elements/matroskamux.c: (setup_src_pad):
|
||||||
|
|
|
@ -516,7 +516,7 @@ gst_dvdemux_src_query (GstPad * pad, GstQuery * query)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
res = FALSE;
|
res = gst_pad_query_default (pad, query);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
gst_object_unref (dvdemux);
|
gst_object_unref (dvdemux);
|
||||||
|
@ -565,7 +565,7 @@ gst_dvdemux_sink_query (GstPad * pad, GstQuery * query)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
res = FALSE;
|
res = gst_pad_query_default (pad, query);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
gst_object_unref (dvdemux);
|
gst_object_unref (dvdemux);
|
||||||
|
|
|
@ -826,7 +826,7 @@ gst_flac_dec_src_query (GstPad * pad, GstQuery * query)
|
||||||
}
|
}
|
||||||
|
|
||||||
default:{
|
default:{
|
||||||
res = FALSE;
|
res = gst_pad_query_default (pad, query);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,6 +118,7 @@ speex_get_query_types (GstPad * pad)
|
||||||
{
|
{
|
||||||
static const GstQueryType speex_dec_src_query_types[] = {
|
static const GstQueryType speex_dec_src_query_types[] = {
|
||||||
GST_QUERY_POSITION,
|
GST_QUERY_POSITION,
|
||||||
|
GST_QUERY_DURATION,
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -212,6 +213,7 @@ static gboolean
|
||||||
speex_dec_src_query (GstPad * pad, GstQuery * query)
|
speex_dec_src_query (GstPad * pad, GstQuery * query)
|
||||||
{
|
{
|
||||||
GstSpeexDec *dec = GST_SPEEXDEC (GST_OBJECT_PARENT (pad));
|
GstSpeexDec *dec = GST_SPEEXDEC (GST_OBJECT_PARENT (pad));
|
||||||
|
gboolean res = FALSE;
|
||||||
|
|
||||||
switch (GST_QUERY_TYPE (query)) {
|
switch (GST_QUERY_TYPE (query)) {
|
||||||
case GST_QUERY_POSITION:
|
case GST_QUERY_POSITION:
|
||||||
|
@ -221,10 +223,10 @@ speex_dec_src_query (GstPad * pad, GstQuery * query)
|
||||||
|
|
||||||
gst_query_parse_position (query, &format, NULL);
|
gst_query_parse_position (query, &format, NULL);
|
||||||
|
|
||||||
speex_dec_convert (dec->srcpad, GST_FORMAT_DEFAULT, dec->samples_out,
|
if ((res = speex_dec_convert (dec->srcpad, GST_FORMAT_DEFAULT,
|
||||||
&format, &cur);
|
dec->samples_out, &format, &cur))) {
|
||||||
|
gst_query_set_position (query, format, cur);
|
||||||
gst_query_set_position (query, format, cur);
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GST_QUERY_DURATION:
|
case GST_QUERY_DURATION:
|
||||||
|
@ -234,19 +236,19 @@ speex_dec_src_query (GstPad * pad, GstQuery * query)
|
||||||
gint64 total_samples;
|
gint64 total_samples;
|
||||||
|
|
||||||
if (!(peer = gst_pad_get_peer (dec->sinkpad)))
|
if (!(peer = gst_pad_get_peer (dec->sinkpad)))
|
||||||
return FALSE;
|
break;
|
||||||
|
|
||||||
gst_pad_query_duration (peer, &my_format, &total_samples);
|
gst_pad_query_duration (peer, &my_format, &total_samples);
|
||||||
gst_object_unref (peer);
|
gst_object_unref (peer);
|
||||||
|
|
||||||
speex_dec_convert (dec->srcpad, GST_FORMAT_DEFAULT, total_samples,
|
if ((res = speex_dec_convert (dec->srcpad, GST_FORMAT_DEFAULT,
|
||||||
&my_format, &total_samples);
|
total_samples, &my_format, &total_samples))) {
|
||||||
|
gst_query_set_duration (query, GST_FORMAT_TIME, total_samples);
|
||||||
gst_query_set_duration (query, GST_FORMAT_TIME, total_samples);
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
res = gst_pad_query_default (pad, query);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -440,7 +440,7 @@ gst_speexenc_src_query (GstPad * pad, GstQuery * query)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
res = FALSE;
|
res = gst_pad_query_default (pad, query);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -473,7 +473,7 @@ gst_speexenc_sink_query (GstPad * pad, GstQuery * query)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
res = FALSE;
|
res = gst_pad_query_default (pad, query);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -416,7 +416,7 @@ gst_avi_demux_handle_src_query (GstPad * pad, GstQuery * query)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
res = FALSE;
|
res = gst_pad_query_default (pad, query);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -928,6 +928,7 @@ gst_matroska_demux_get_src_query_types (GstPad * pad)
|
||||||
{
|
{
|
||||||
static const GstQueryType query_types[] = {
|
static const GstQueryType query_types[] = {
|
||||||
GST_QUERY_POSITION,
|
GST_QUERY_POSITION,
|
||||||
|
GST_QUERY_DURATION,
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -981,6 +982,7 @@ gst_matroska_demux_handle_src_query (GstPad * pad, GstQuery * query)
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
res = gst_pad_query_default (pad, query);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1260,6 +1260,8 @@ gst_wavparse_get_query_types (GstPad * pad)
|
||||||
{
|
{
|
||||||
static const GstQueryType types[] = {
|
static const GstQueryType types[] = {
|
||||||
GST_QUERY_POSITION,
|
GST_QUERY_POSITION,
|
||||||
|
GST_QUERY_DURATION,
|
||||||
|
GST_QUERY_CONVERT,
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1343,7 +1345,7 @@ gst_wavparse_pad_query (GstPad * pad, GstQuery * query)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
res = FALSE;
|
res = gst_pad_query_default (pad, query);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|
Loading…
Reference in a new issue