remove query types

This commit is contained in:
Wim Taymans 2011-11-09 11:53:01 +01:00
parent c48df77320
commit 49658dd5b5
6 changed files with 4 additions and 100 deletions

View file

@ -90,7 +90,6 @@ static void gst_cmml_dec_get_property (GObject * dec, guint property_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static void gst_cmml_dec_set_property (GObject * dec, guint property_id, static void gst_cmml_dec_set_property (GObject * dec, guint property_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);
static const GstQueryType *gst_cmml_dec_query_types (GstPad * pad);
static gboolean gst_cmml_dec_sink_query (GstPad * pad, GstQuery * query); static gboolean gst_cmml_dec_sink_query (GstPad * pad, GstQuery * query);
static gboolean gst_cmml_dec_sink_event (GstPad * pad, GstEvent * event); static gboolean gst_cmml_dec_sink_event (GstPad * pad, GstEvent * event);
static gboolean gst_cmml_dec_convert (GstPad * pad, GstFormat src_fmt, static gboolean gst_cmml_dec_convert (GstPad * pad, GstFormat src_fmt,
@ -154,7 +153,6 @@ gst_cmml_dec_init (GstCmmlDec * dec)
dec->sinkpad = dec->sinkpad =
gst_pad_new_from_static_template (&gst_cmml_dec_sink_factory, "sink"); gst_pad_new_from_static_template (&gst_cmml_dec_sink_factory, "sink");
gst_pad_set_chain_function (dec->sinkpad, gst_cmml_dec_chain); gst_pad_set_chain_function (dec->sinkpad, gst_cmml_dec_chain);
gst_pad_set_query_type_function (dec->sinkpad, gst_cmml_dec_query_types);
gst_pad_set_query_function (dec->sinkpad, gst_cmml_dec_sink_query); gst_pad_set_query_function (dec->sinkpad, gst_cmml_dec_sink_query);
gst_pad_set_event_function (dec->sinkpad, gst_cmml_dec_sink_event); gst_pad_set_event_function (dec->sinkpad, gst_cmml_dec_sink_event);
gst_element_add_pad (GST_ELEMENT (dec), dec->sinkpad); gst_element_add_pad (GST_ELEMENT (dec), dec->sinkpad);
@ -254,17 +252,6 @@ gst_cmml_dec_change_state (GstElement * element, GstStateChange transition)
return res; return res;
} }
static const GstQueryType *
gst_cmml_dec_query_types (GstPad * pad)
{
static const GstQueryType query_types[] = {
GST_QUERY_CONVERT,
0
};
return query_types;
}
static gboolean static gboolean
gst_cmml_dec_sink_query (GstPad * pad, GstQuery * query) gst_cmml_dec_sink_query (GstPad * pad, GstQuery * query)
{ {

View file

@ -73,8 +73,6 @@ static gboolean gst_audio_fx_base_fir_filter_setup (GstAudioFilter * base,
static gboolean gst_audio_fx_base_fir_filter_query (GstPad * pad, static gboolean gst_audio_fx_base_fir_filter_query (GstPad * pad,
GstQuery * query); GstQuery * query);
static const GstQueryType *gst_audio_fx_base_fir_filter_query_type (GstPad *
pad);
/* /*
* The code below calculates the linear convolution: * The code below calculates the linear convolution:
@ -616,8 +614,6 @@ gst_audio_fx_base_fir_filter_init (GstAudioFXBaseFIRFilter * self)
gst_pad_set_query_function (GST_BASE_TRANSFORM (self)->srcpad, gst_pad_set_query_function (GST_BASE_TRANSFORM (self)->srcpad,
gst_audio_fx_base_fir_filter_query); gst_audio_fx_base_fir_filter_query);
gst_pad_set_query_type_function (GST_BASE_TRANSFORM (self)->srcpad,
gst_audio_fx_base_fir_filter_query_type);
} }
void void
@ -1004,17 +1000,6 @@ gst_audio_fx_base_fir_filter_query (GstPad * pad, GstQuery * query)
return res; return res;
} }
static const GstQueryType *
gst_audio_fx_base_fir_filter_query_type (GstPad * pad)
{
static const GstQueryType types[] = {
GST_QUERY_LATENCY,
0
};
return types;
}
static gboolean static gboolean
gst_audio_fx_base_fir_filter_sink_event (GstBaseTransform * base, gst_audio_fx_base_fir_filter_sink_event (GstBaseTransform * base,
GstEvent * event) GstEvent * event)

View file

@ -87,7 +87,6 @@ static gboolean gst_avi_demux_push_event (GstAviDemux * avi, GstEvent * event);
#if 0 #if 0
static const GstFormat *gst_avi_demux_get_src_formats (GstPad * pad); static const GstFormat *gst_avi_demux_get_src_formats (GstPad * pad);
#endif #endif
static const GstQueryType *gst_avi_demux_get_src_query_types (GstPad * pad);
static gboolean gst_avi_demux_handle_src_query (GstPad * pad, GstQuery * query); static gboolean gst_avi_demux_handle_src_query (GstPad * pad, GstQuery * query);
static gboolean gst_avi_demux_src_convert (GstPad * pad, GstFormat src_format, static gboolean gst_avi_demux_src_convert (GstPad * pad, GstFormat src_format,
gint64 src_value, GstFormat * dest_format, gint64 * dest_value); gint64 src_value, GstFormat * dest_format, gint64 * dest_value);
@ -417,20 +416,6 @@ done:
return res; return res;
} }
static const GstQueryType *
gst_avi_demux_get_src_query_types (GstPad * pad)
{
static const GstQueryType src_types[] = {
GST_QUERY_POSITION,
GST_QUERY_DURATION,
GST_QUERY_SEEKING,
GST_QUERY_CONVERT,
0
};
return src_types;
}
static gboolean static gboolean
gst_avi_demux_handle_src_query (GstPad * pad, GstQuery * query) gst_avi_demux_handle_src_query (GstPad * pad, GstQuery * query)
{ {
@ -2255,8 +2240,6 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf)
#endif #endif
gst_pad_set_event_function (pad, gst_pad_set_event_function (pad,
GST_DEBUG_FUNCPTR (gst_avi_demux_handle_src_event)); GST_DEBUG_FUNCPTR (gst_avi_demux_handle_src_event));
gst_pad_set_query_type_function (pad,
GST_DEBUG_FUNCPTR (gst_avi_demux_get_src_query_types));
gst_pad_set_query_function (pad, gst_pad_set_query_function (pad,
GST_DEBUG_FUNCPTR (gst_avi_demux_handle_src_query)); GST_DEBUG_FUNCPTR (gst_avi_demux_handle_src_query));
#if 0 #if 0

View file

@ -119,11 +119,11 @@ gst_flv_demux_parse_and_add_index_entry (GstFlvDemux * demux, GstClockTime ts,
gboolean key; gboolean key;
gst_index_entry_assoc_map (entry, GST_FORMAT_TIME, &time); gst_index_entry_assoc_map (entry, GST_FORMAT_TIME, &time);
key = !!(GST_INDEX_ASSOC_FLAGS (entry) & GST_ASSOCIATION_FLAG_KEY_UNIT); key = ! !(GST_INDEX_ASSOC_FLAGS (entry) & GST_ASSOCIATION_FLAG_KEY_UNIT);
GST_LOG_OBJECT (demux, "position already mapped to time %" GST_TIME_FORMAT GST_LOG_OBJECT (demux, "position already mapped to time %" GST_TIME_FORMAT
", keyframe %d", GST_TIME_ARGS (time), key); ", keyframe %d", GST_TIME_ARGS (time), key);
/* there is not really a way to delete the existing one */ /* there is not really a way to delete the existing one */
if (time != ts || key != !!keyframe) if (time != ts || key != ! !keyframe)
GST_DEBUG_OBJECT (demux, "metadata mismatch"); GST_DEBUG_OBJECT (demux, "metadata mismatch");
#endif #endif
return; return;
@ -179,19 +179,6 @@ FLV_GET_STRING (GstByteReader * reader)
return string; return string;
} }
static const GstQueryType *
gst_flv_demux_query_types (GstPad * pad)
{
static const GstQueryType query_types[] = {
GST_QUERY_DURATION,
GST_QUERY_POSITION,
GST_QUERY_SEEKING,
0
};
return query_types;
}
static void static void
gst_flv_demux_check_seekability (GstFlvDemux * demux) gst_flv_demux_check_seekability (GstFlvDemux * demux)
{ {
@ -903,8 +890,6 @@ gst_flv_demux_parse_tag_audio (GstFlvDemux * demux, GstBuffer * buffer)
#endif #endif
/* Set functions on the pad */ /* Set functions on the pad */
gst_pad_set_query_type_function (demux->audio_pad,
GST_DEBUG_FUNCPTR (gst_flv_demux_query_types));
gst_pad_set_query_function (demux->audio_pad, gst_pad_set_query_function (demux->audio_pad,
GST_DEBUG_FUNCPTR (gst_flv_demux_query)); GST_DEBUG_FUNCPTR (gst_flv_demux_query));
gst_pad_set_event_function (demux->audio_pad, gst_pad_set_event_function (demux->audio_pad,
@ -1275,8 +1260,6 @@ gst_flv_demux_parse_tag_video (GstFlvDemux * demux, GstBuffer * buffer)
#endif #endif
/* Set functions on the pad */ /* Set functions on the pad */
gst_pad_set_query_type_function (demux->video_pad,
GST_DEBUG_FUNCPTR (gst_flv_demux_query_types));
gst_pad_set_query_function (demux->video_pad, gst_pad_set_query_function (demux->video_pad,
GST_DEBUG_FUNCPTR (gst_flv_demux_query)); GST_DEBUG_FUNCPTR (gst_flv_demux_query));
gst_pad_set_event_function (demux->video_pad, gst_pad_set_event_function (demux->video_pad,
@ -2493,7 +2476,7 @@ flv_demux_handle_seek_push (GstFlvDemux * demux, GstEvent * event)
if (format != GST_FORMAT_TIME) if (format != GST_FORMAT_TIME)
goto wrong_format; goto wrong_format;
flush = !!(flags & GST_SEEK_FLAG_FLUSH); flush = ! !(flags & GST_SEEK_FLAG_FLUSH);
/* FIXME : the keyframe flag is never used ! */ /* FIXME : the keyframe flag is never used ! */
/* Work on a copy until we are sure the seek succeeded. */ /* Work on a copy until we are sure the seek succeeded. */
@ -2654,7 +2637,7 @@ gst_flv_demux_handle_seek_pull (GstFlvDemux * demux, GstEvent * event,
demux->seeking = seeking; demux->seeking = seeking;
GST_OBJECT_UNLOCK (demux); GST_OBJECT_UNLOCK (demux);
flush = !!(flags & GST_SEEK_FLAG_FLUSH); flush = ! !(flags & GST_SEEK_FLAG_FLUSH);
/* FIXME : the keyframe flag is never used */ /* FIXME : the keyframe flag is never used */
if (flush) { if (flush) {

View file

@ -678,21 +678,6 @@ done:
} }
#endif #endif
static const GstQueryType *
gst_qtdemux_get_src_query_types (GstPad * pad)
{
static const GstQueryType src_types[] = {
GST_QUERY_POSITION,
GST_QUERY_DURATION,
GST_QUERY_CONVERT,
GST_QUERY_FORMATS,
GST_QUERY_SEEKING,
0
};
return src_types;
}
static gboolean static gboolean
gst_qtdemux_get_duration (GstQTDemux * qtdemux, gint64 * duration) gst_qtdemux_get_duration (GstQTDemux * qtdemux, gint64 * duration)
{ {
@ -5141,8 +5126,6 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux,
gst_pad_use_fixed_caps (stream->pad); gst_pad_use_fixed_caps (stream->pad);
gst_pad_set_event_function (stream->pad, gst_qtdemux_handle_src_event); gst_pad_set_event_function (stream->pad, gst_qtdemux_handle_src_event);
gst_pad_set_query_type_function (stream->pad,
gst_qtdemux_get_src_query_types);
gst_pad_set_query_function (stream->pad, gst_qtdemux_handle_src_query); gst_pad_set_query_function (stream->pad, gst_qtdemux_handle_src_query);
GST_DEBUG_OBJECT (qtdemux, "setting caps %" GST_PTR_FORMAT, stream->caps); GST_DEBUG_OBJECT (qtdemux, "setting caps %" GST_PTR_FORMAT, stream->caps);

View file

@ -71,7 +71,6 @@ static gboolean gst_wavparse_send_event (GstElement * element,
static GstStateChangeReturn gst_wavparse_change_state (GstElement * element, static GstStateChangeReturn gst_wavparse_change_state (GstElement * element,
GstStateChange transition); GstStateChange transition);
static const GstQueryType *gst_wavparse_get_query_types (GstPad * pad);
static gboolean gst_wavparse_pad_query (GstPad * pad, GstQuery * query); static gboolean gst_wavparse_pad_query (GstPad * pad, GstQuery * query);
static gboolean gst_wavparse_pad_convert (GstPad * pad, static gboolean gst_wavparse_pad_convert (GstPad * pad,
GstFormat src_format, GstFormat src_format,
@ -202,8 +201,6 @@ gst_wavparse_init (GstWavParse * wavparse)
gst_pad_new_from_template (gst_element_class_get_pad_template gst_pad_new_from_template (gst_element_class_get_pad_template
(GST_ELEMENT_GET_CLASS (wavparse), "src"), "src"); (GST_ELEMENT_GET_CLASS (wavparse), "src"), "src");
gst_pad_use_fixed_caps (wavparse->srcpad); gst_pad_use_fixed_caps (wavparse->srcpad);
gst_pad_set_query_type_function (wavparse->srcpad,
GST_DEBUG_FUNCPTR (gst_wavparse_get_query_types));
gst_pad_set_query_function (wavparse->srcpad, gst_pad_set_query_function (wavparse->srcpad,
GST_DEBUG_FUNCPTR (gst_wavparse_pad_query)); GST_DEBUG_FUNCPTR (gst_wavparse_pad_query));
gst_pad_set_event_function (wavparse->srcpad, gst_pad_set_event_function (wavparse->srcpad,
@ -2402,20 +2399,6 @@ no_bps_fact:
} }
} }
static const GstQueryType *
gst_wavparse_get_query_types (GstPad * pad)
{
static const GstQueryType types[] = {
GST_QUERY_POSITION,
GST_QUERY_DURATION,
GST_QUERY_CONVERT,
GST_QUERY_SEEKING,
0
};
return types;
}
/* handle queries for location and length in requested format */ /* handle queries for location and length in requested format */
static gboolean static gboolean
gst_wavparse_pad_query (GstPad * pad, GstQuery * query) gst_wavparse_pad_query (GstPad * pad, GstQuery * query)