remove query types

This commit is contained in:
Wim Taymans 2011-11-09 11:47:54 +01:00
parent 36dce0ffda
commit 372b9329b9
8 changed files with 1 additions and 126 deletions

View file

@ -131,7 +131,6 @@ static gboolean gst_ogg_demux_receive_event (GstElement * element,
static void gst_ogg_pad_dispose (GObject * object);
static void gst_ogg_pad_finalize (GObject * object);
static const GstQueryType *gst_ogg_pad_query_types (GstPad * pad);
static gboolean gst_ogg_pad_src_query (GstPad * pad, GstQuery * query);
static gboolean gst_ogg_pad_event (GstPad * pad, GstEvent * event);
static GstOggPad *gst_ogg_chain_get_stream (GstOggChain * chain,
@ -168,8 +167,6 @@ gst_ogg_pad_init (GstOggPad * pad)
{
gst_pad_set_event_function (GST_PAD (pad),
GST_DEBUG_FUNCPTR (gst_ogg_pad_event));
gst_pad_set_query_type_function (GST_PAD (pad),
GST_DEBUG_FUNCPTR (gst_ogg_pad_query_types));
gst_pad_set_query_function (GST_PAD (pad),
GST_DEBUG_FUNCPTR (gst_ogg_pad_src_query));
gst_pad_use_fixed_caps (GST_PAD (pad));
@ -241,18 +238,6 @@ gst_ogg_pad_finalize (GObject * object)
G_OBJECT_CLASS (gst_ogg_pad_parent_class)->finalize (object);
}
static const GstQueryType *
gst_ogg_pad_query_types (GstPad * pad)
{
static const GstQueryType query_types[] = {
GST_QUERY_DURATION,
GST_QUERY_SEEKING,
0
};
return query_types;
}
static gboolean
gst_ogg_pad_src_query (GstPad * pad, GstQuery * query)
{

View file

@ -151,7 +151,6 @@ static void gst_ogm_video_parse_init (GstOgmParse * ogm);
static void gst_ogm_audio_parse_init (GstOgmParse * ogm);
static void gst_ogm_text_parse_init (GstOgmParse * ogm);
static const GstQueryType *gst_ogm_parse_get_sink_querytypes (GstPad * pad);
static gboolean gst_ogm_parse_sink_event (GstPad * pad, GstEvent * event);
static gboolean gst_ogm_parse_sink_query (GstPad * pad, GstQuery * query);
static gboolean gst_ogm_parse_sink_convert (GstPad * pad, GstFormat src_format,
@ -381,8 +380,6 @@ static void
gst_ogm_text_parse_init (GstOgmParse * ogm)
{
ogm->sinkpad = gst_pad_new_from_static_template (&sink_factory_text, "sink");
gst_pad_set_query_type_function (ogm->sinkpad,
gst_ogm_parse_get_sink_querytypes);
gst_pad_set_query_function (ogm->sinkpad,
GST_DEBUG_FUNCPTR (gst_ogm_parse_sink_query));
gst_pad_set_chain_function (ogm->sinkpad,
@ -395,17 +392,6 @@ gst_ogm_text_parse_init (GstOgmParse * ogm)
ogm->srcpadtempl = text_src_templ;
}
static const GstQueryType *
gst_ogm_parse_get_sink_querytypes (GstPad * pad)
{
static const GstQueryType types[] = {
GST_QUERY_POSITION,
0
};
return types;
}
static gboolean
gst_ogm_parse_sink_convert (GstPad * pad,
GstFormat src_format, gint64 src_value,

View file

@ -108,7 +108,6 @@ static const GstFormat *theora_get_formats (GstPad * pad);
#if 0
static const GstEventMask *theora_get_event_masks (GstPad * pad);
#endif
static const GstQueryType *theora_get_query_types (GstPad * pad);
static gboolean
gst_theora_dec_ctl_is_supported (int req)
@ -201,7 +200,6 @@ gst_theora_dec_init (GstTheoraDec * dec)
dec->srcpad =
gst_pad_new_from_static_template (&theora_dec_src_factory, "src");
gst_pad_set_event_function (dec->srcpad, theora_dec_src_event);
gst_pad_set_query_type_function (dec->srcpad, theora_get_query_types);
gst_pad_set_query_function (dec->srcpad, theora_dec_src_query);
gst_pad_use_fixed_caps (dec->srcpad);
@ -287,20 +285,6 @@ theora_get_event_masks (GstPad * pad)
}
#endif
static const GstQueryType *
theora_get_query_types (GstPad * pad)
{
static const GstQueryType theora_src_query_types[] = {
GST_QUERY_POSITION,
GST_QUERY_DURATION,
GST_QUERY_CONVERT,
0
};
return theora_src_query_types;
}
static gboolean
theora_dec_src_convert (GstPad * pad,
GstFormat src_format, gint64 src_value,

View file

@ -284,7 +284,6 @@ gboolean gst_audio_decoder_src_setcaps (GstAudioDecoder * dec, GstCaps * caps);
static GstFlowReturn gst_audio_decoder_chain (GstPad * pad, GstBuffer * buf);
static gboolean gst_audio_decoder_src_query (GstPad * pad, GstQuery * query);
static gboolean gst_audio_decoder_sink_query (GstPad * pad, GstQuery * query);
static const GstQueryType *gst_audio_decoder_get_query_types (GstPad * pad);
static void gst_audio_decoder_reset (GstAudioDecoder * dec, gboolean full);
static GstElementClass *parent_class = NULL;
@ -395,8 +394,6 @@ gst_audio_decoder_init (GstAudioDecoder * dec, GstAudioDecoderClass * klass)
GST_DEBUG_FUNCPTR (gst_audio_decoder_src_event));
gst_pad_set_query_function (dec->srcpad,
GST_DEBUG_FUNCPTR (gst_audio_decoder_src_query));
gst_pad_set_query_type_function (dec->srcpad,
GST_DEBUG_FUNCPTR (gst_audio_decoder_get_query_types));
gst_pad_use_fixed_caps (dec->srcpad);
gst_element_add_pad (GST_ELEMENT (dec), dec->srcpad);
GST_DEBUG_OBJECT (dec, "srcpad created");
@ -1766,20 +1763,6 @@ error:
return res;
}
static const GstQueryType *
gst_audio_decoder_get_query_types (GstPad * pad)
{
static const GstQueryType gst_audio_decoder_src_query_types[] = {
GST_QUERY_POSITION,
GST_QUERY_DURATION,
GST_QUERY_CONVERT,
GST_QUERY_LATENCY,
0
};
return gst_audio_decoder_src_query_types;
}
/* FIXME ? are any of these queries (other than latency) a decoder's business ??
* also, the conversion stuff might seem to make sense, but seems to not mind
* segment stuff etc at all

View file

@ -302,7 +302,6 @@ static gboolean gst_audio_encoder_sink_setcaps (GstAudioEncoder * enc,
static GstFlowReturn gst_audio_encoder_chain (GstPad * pad, GstBuffer * buffer);
static gboolean gst_audio_encoder_src_query (GstPad * pad, GstQuery * query);
static gboolean gst_audio_encoder_sink_query (GstPad * pad, GstQuery * query);
static const GstQueryType *gst_audio_encoder_get_query_types (GstPad * pad);
static GstCaps *gst_audio_encoder_sink_getcaps (GstPad * pad, GstCaps * filter);
static void
@ -378,8 +377,6 @@ gst_audio_encoder_init (GstAudioEncoder * enc, GstAudioEncoderClass * bclass)
enc->srcpad = gst_pad_new_from_template (pad_template, "src");
gst_pad_set_query_function (enc->srcpad,
GST_DEBUG_FUNCPTR (gst_audio_encoder_src_query));
gst_pad_set_query_type_function (enc->srcpad,
GST_DEBUG_FUNCPTR (gst_audio_encoder_get_query_types));
gst_pad_use_fixed_caps (enc->srcpad);
gst_element_add_pad (GST_ELEMENT (enc), enc->srcpad);
GST_DEBUG_OBJECT (enc, "src created");
@ -1410,20 +1407,6 @@ error:
return res;
}
static const GstQueryType *
gst_audio_encoder_get_query_types (GstPad * pad)
{
static const GstQueryType gst_audio_encoder_src_query_types[] = {
GST_QUERY_POSITION,
GST_QUERY_DURATION,
GST_QUERY_CONVERT,
GST_QUERY_LATENCY,
0
};
return gst_audio_encoder_src_query_types;
}
/*
* gst_audio_encoded_audio_convert:
* @fmt: audio format of the encoded audio

View file

@ -122,7 +122,6 @@ static void gst_cdda_base_src_get_property (GObject * object, guint prop_id,
static void gst_cdda_base_src_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_cdda_base_src_finalize (GObject * obj);
static const GstQueryType *gst_cdda_base_src_get_query_types (GstPad * pad);
static gboolean gst_cdda_base_src_query (GstBaseSrc * src, GstQuery * query);
static gboolean gst_cdda_base_src_handle_event (GstBaseSrc * basesrc,
GstEvent * event);
@ -259,9 +258,6 @@ gst_cdda_base_src_class_init (GstCddaBaseSrcClass * klass)
static void
gst_cdda_base_src_init (GstCddaBaseSrc * src)
{
gst_pad_set_query_type_function (GST_BASE_SRC_PAD (src),
GST_DEBUG_FUNCPTR (gst_cdda_base_src_get_query_types));
/* we're not live and we operate in time */
gst_base_src_set_format (GST_BASE_SRC (src), GST_FORMAT_TIME);
gst_base_src_set_live (GST_BASE_SRC (src), FALSE);
@ -430,19 +426,6 @@ gst_cdda_base_src_get_track_from_sector (GstCddaBaseSrc * src, gint sector)
return -1;
}
static const GstQueryType *
gst_cdda_base_src_get_query_types (GstPad * pad)
{
static const GstQueryType src_query_types[] = {
GST_QUERY_DURATION,
GST_QUERY_POSITION,
GST_QUERY_CONVERT,
0
};
return src_query_types;
}
static gboolean
gst_cdda_base_src_convert (GstCddaBaseSrc * src, GstFormat src_format,
gint64 src_val, GstFormat dest_format, gint64 * dest_val)

View file

@ -153,7 +153,6 @@ static gboolean gst_tag_demux_sink_activate (GstPad * sinkpad);
static GstStateChangeReturn gst_tag_demux_change_state (GstElement * element,
GstStateChange transition);
static gboolean gst_tag_demux_pad_query (GstPad * pad, GstQuery * query);
static const GstQueryType *gst_tag_demux_get_query_types (GstPad * pad);
static gboolean gst_tag_demux_get_upstream_size (GstTagDemux * tagdemux);
static void gst_tag_demux_send_pending_events (GstTagDemux * tagdemux);
static void gst_tag_demux_send_tag_event (GstTagDemux * tagdemux);
@ -335,8 +334,6 @@ gst_tag_demux_add_srcpad (GstTagDemux * tagdemux, GstCaps * new_caps)
(GST_ELEMENT_GET_CLASS (tagdemux), "src"), "src");
g_return_val_if_fail (tagdemux->priv->srcpad != NULL, FALSE);
gst_pad_set_query_type_function (tagdemux->priv->srcpad,
GST_DEBUG_FUNCPTR (gst_tag_demux_get_query_types));
gst_pad_set_query_function (tagdemux->priv->srcpad,
GST_DEBUG_FUNCPTR (gst_tag_demux_pad_query));
gst_pad_set_event_function (tagdemux->priv->srcpad,
@ -1416,18 +1413,6 @@ gst_tag_demux_pad_query (GstPad * pad, GstQuery * query)
return TRUE;
}
static const GstQueryType *
gst_tag_demux_get_query_types (GstPad * pad)
{
static const GstQueryType types[] = {
GST_QUERY_POSITION,
GST_QUERY_DURATION,
0
};
return types;
}
static void
gst_tag_demux_send_pending_events (GstTagDemux * demux)
{

View file

@ -118,7 +118,6 @@ static gboolean gst_audio_resample_sink_event (GstBaseTransform * base,
static gboolean gst_audio_resample_start (GstBaseTransform * base);
static gboolean gst_audio_resample_stop (GstBaseTransform * base);
static gboolean gst_audio_resample_query (GstPad * pad, GstQuery * query);
static const GstQueryType *gst_audio_resample_query_type (GstPad * pad);
#define gst_audio_resample_parent_class parent_class
G_DEFINE_TYPE (GstAudioResample, gst_audio_resample, GST_TYPE_BASE_TRANSFORM);
@ -179,8 +178,6 @@ gst_audio_resample_init (GstAudioResample * resample)
gst_base_transform_set_gap_aware (trans, TRUE);
gst_pad_set_query_function (trans->srcpad, gst_audio_resample_query);
gst_pad_set_query_type_function (trans->srcpad,
gst_audio_resample_query_type);
}
/* vmethods */
@ -1261,17 +1258,6 @@ gst_audio_resample_query (GstPad * pad, GstQuery * query)
return res;
}
static const GstQueryType *
gst_audio_resample_query_type (GstPad * pad)
{
static const GstQueryType types[] = {
GST_QUERY_LATENCY,
0
};
return types;
}
static void
gst_audio_resample_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)