static gboolean gst_visual_sink_event (GstPad * pad, GstEvent * event);
static gboolean gst_visual_src_event (GstPad * pad, GstEvent * event);
-static gboolean gst_visual_src_query (GstPad * pad, GstQuery * query);
+static gboolean gst_visual_src_query (GstPad * pad, GstObject * parent,
+ GstQuery * query);
static gboolean gst_visual_sink_setcaps (GstPad * pad, GstCaps * caps);
static GstCaps *gst_visual_getcaps (GstPad * pad, GstCaps * filter);
}
static gboolean
-gst_visual_src_query (GstPad * pad, GstQuery * query)
+gst_visual_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res;
GstVisual *visual;
- visual = GST_VISUAL (GST_PAD_PARENT (pad));
+ visual = GST_VISUAL (parent);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_LATENCY:
res = TRUE;
}
default:
- res = gst_pad_query_default (pad, query);
+ res = gst_pad_query_default (pad, parent, query);
break;
}
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
visual->actor =
- visual_actor_new (GST_VISUAL_GET_CLASS (visual)->plugin->info->
- plugname);
+ visual_actor_new (GST_VISUAL_GET_CLASS (visual)->plugin->
+ info->plugname);
visual->video = visual_video_new ();
visual->audio = visual_audio_new ();
/* can't have a play without actors */
static void gst_ogg_pad_dispose (GObject * object);
static void gst_ogg_pad_finalize (GObject * object);
-static gboolean gst_ogg_pad_src_query (GstPad * pad, GstQuery * query);
+static gboolean gst_ogg_pad_src_query (GstPad * pad, GstObject * parent,
+ GstQuery * query);
static gboolean gst_ogg_pad_event (GstPad * pad, GstEvent * event);
static GstOggPad *gst_ogg_chain_get_stream (GstOggChain * chain,
guint32 serialno);
}
static gboolean
-gst_ogg_pad_src_query (GstPad * pad, GstQuery * query)
+gst_ogg_pad_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res = TRUE;
GstOggDemux *ogg;
- ogg = GST_OGG_DEMUX (gst_pad_get_parent (pad));
+ ogg = GST_OGG_DEMUX (parent);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_DURATION:
}
default:
- res = gst_pad_query_default (pad, query);
+ res = gst_pad_query_default (pad, parent, query);
break;
}
done:
- gst_object_unref (ogg);
return res;
static void gst_ogm_text_parse_init (GstOgmParse * ogm);
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_query (GstPad * pad, GstObject * parent,
+ GstQuery * query);
static gboolean gst_ogm_parse_sink_convert (GstPad * pad, GstFormat src_format,
gint64 src_value, GstFormat * dest_format, gint64 * dest_value);
}
static gboolean
-gst_ogm_parse_sink_query (GstPad * pad, GstQuery * query)
+gst_ogm_parse_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
- GstOgmParse *ogm = GST_OGM_PARSE (gst_pad_get_parent (pad));
+ GstOgmParse *ogm = GST_OGM_PARSE (parent);
GstFormat format;
gboolean res = FALSE;
break;
}
default:
- res = gst_pad_query_default (pad, query);
+ res = gst_pad_query_default (pad, parent, query);
break;
}
- gst_object_unref (ogm);
return res;
}
static gboolean gst_base_text_overlay_src_event (GstPad * pad,
GstEvent * event);
static gboolean gst_base_text_overlay_src_query (GstPad * pad,
- GstQuery * query);
+ GstObject * parent, GstQuery * query);
static gboolean gst_base_text_overlay_video_event (GstPad * pad,
GstEvent * event);
static gboolean gst_base_text_overlay_video_query (GstPad * pad,
- GstQuery * query);
+ GstObject * parent, GstQuery * query);
static GstFlowReturn gst_base_text_overlay_video_chain (GstPad * pad,
GstBuffer * buffer);
}
static gboolean
-gst_base_text_overlay_src_query (GstPad * pad, GstQuery * query)
+gst_base_text_overlay_src_query (GstPad * pad, GstObject * parent,
+ GstQuery * query)
{
gboolean ret = FALSE;
GstBaseTextOverlay *overlay = NULL;
- overlay = GST_BASE_TEXT_OVERLAY (gst_pad_get_parent (pad));
- if (G_UNLIKELY (!overlay))
- return FALSE;
+ overlay = GST_BASE_TEXT_OVERLAY (parent);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_CAPS:
break;
}
- gst_object_unref (overlay);
-
return ret;
}
}
static gboolean
-gst_base_text_overlay_video_query (GstPad * pad, GstQuery * query)
+gst_base_text_overlay_video_query (GstPad * pad, GstObject * parent,
+ GstQuery * query)
{
gboolean ret = FALSE;
- GstBaseTextOverlay *overlay = NULL;
-
- overlay = GST_BASE_TEXT_OVERLAY (gst_pad_get_parent (pad));
- if (G_UNLIKELY (!overlay)) {
- return FALSE;
- }
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_CAPS:
break;
}
default:
- ret = gst_pad_query_default (pad, query);
+ ret = gst_pad_query_default (pad, parent, query);
break;
}
- gst_object_unref (overlay);
-
return ret;
}
static GstStateChangeReturn theora_dec_change_state (GstElement * element,
GstStateChange transition);
static gboolean theora_dec_src_event (GstPad * pad, GstEvent * event);
-static gboolean theora_dec_src_query (GstPad * pad, GstQuery * query);
-static gboolean theora_dec_src_convert (GstPad * pad,
- GstFormat src_format, gint64 src_value,
- GstFormat * dest_format, gint64 * dest_value);
+static gboolean theora_dec_src_query (GstPad * pad, GstObject * parent,
+ GstQuery * query);
+static gboolean theora_dec_src_convert (GstPad * pad, GstFormat src_format,
+ gint64 src_value, GstFormat * dest_format, gint64 * dest_value);
#if 0
static const GstFormat *theora_get_formats (GstPad * pad);
#endif
static gboolean
-theora_dec_src_query (GstPad * pad, GstQuery * query)
+theora_dec_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
GstTheoraDec *dec;
-
gboolean res = FALSE;
- dec = GST_THEORA_DEC (gst_pad_get_parent (pad));
+ dec = GST_THEORA_DEC (parent);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_POSITION:
break;
}
default:
- res = gst_pad_query_default (pad, query);
+ res = gst_pad_query_default (pad, parent, query);
break;
}
done:
- gst_object_unref (dec);
return res;
static GstFlowReturn theora_enc_chain (GstPad * pad, GstBuffer * buffer);
static GstStateChangeReturn theora_enc_change_state (GstElement * element,
GstStateChange transition);
-static gboolean theora_enc_sink_query (GstPad * pad, GstQuery * query);
+static gboolean theora_enc_sink_query (GstPad * pad, GstObject * parent,
+ GstQuery * query);
static gboolean theora_enc_sink_setcaps (GstTheoraEnc * enc, GstCaps * caps);
static void theora_enc_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
}
static gboolean
-theora_enc_sink_query (GstPad * pad, GstQuery * query)
+theora_enc_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res = FALSE;
break;
}
default:
- res = gst_pad_query_default (pad, query);
+ res = gst_pad_query_default (pad, parent, query);
break;
}
static GstStateChangeReturn theora_parse_change_state (GstElement * element,
GstStateChange transition);
static gboolean theora_parse_sink_event (GstPad * pad, GstEvent * event);
-static gboolean theora_parse_src_query (GstPad * pad, GstQuery * query);
+static gboolean theora_parse_src_query (GstPad * pad, GstObject * parent,
+ GstQuery * query);
static void
gst_theora_parse_class_init (GstTheoraParseClass * klass)
}
static gboolean
-theora_parse_src_query (GstPad * pad, GstQuery * query)
+theora_parse_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
GstTheoraParse *parse;
-
gboolean res = FALSE;
- parse = GST_THEORA_PARSE (gst_pad_get_parent (pad));
+ parse = GST_THEORA_PARSE (parent);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_POSITION:
break;
}
default:
- res = gst_pad_query_default (pad, query);
+ res = gst_pad_query_default (pad, parent, query);
break;
}
done:
- gst_object_unref (parse);
return res;
static GstStateChangeReturn vorbis_parse_change_state (GstElement * element,
GstStateChange transition);
static gboolean vorbis_parse_sink_event (GstPad * pad, GstEvent * event);
-static gboolean vorbis_parse_src_query (GstPad * pad, GstQuery * query);
-static gboolean vorbis_parse_convert (GstPad * pad,
- GstFormat src_format, gint64 src_value,
- GstFormat * dest_format, gint64 * dest_value);
+static gboolean vorbis_parse_src_query (GstPad * pad, GstObject * parent,
+ GstQuery * query);
+static gboolean vorbis_parse_convert (GstPad * pad, GstFormat src_format,
+ gint64 src_value, GstFormat * dest_format, gint64 * dest_value);
static GstFlowReturn vorbis_parse_parse_packet (GstVorbisParse * parse,
GstBuffer * buf);
}
static gboolean
-vorbis_parse_src_query (GstPad * pad, GstQuery * query)
+vorbis_parse_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gint64 granulepos;
GstVorbisParse *parse;
gboolean res = FALSE;
- parse = GST_VORBIS_PARSE (GST_PAD_PARENT (pad));
+ parse = GST_VORBIS_PARSE (parent);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_POSITION:
parse->sinkpad);
goto error;
}
- if (!(res = gst_pad_query (GST_PAD_PEER (parse->sinkpad), query)))
+ if (!(res = gst_pad_peer_query (parse->sinkpad, query)))
goto error;
break;
}
break;
}
default:
- res = gst_pad_query_default (pad, query);
+ res = gst_pad_query_default (pad, parent, query);
break;
}
return res;
GstCaps * caps);
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 gboolean gst_audio_decoder_src_query (GstPad * pad, GstObject * parent,
+ GstQuery * query);
+static gboolean gst_audio_decoder_sink_query (GstPad * pad, GstObject * parent,
+ GstQuery * query);
static void gst_audio_decoder_reset (GstAudioDecoder * dec, gboolean full);
static GstElementClass *parent_class = NULL;
}
static gboolean
-gst_audio_decoder_sink_query (GstPad * pad, GstQuery * query)
+gst_audio_decoder_sink_query (GstPad * pad, GstObject * parent,
+ GstQuery * query)
{
- gboolean res = TRUE;
+ gboolean res = FALSE;
GstAudioDecoder *dec;
- dec = GST_AUDIO_DECODER (gst_pad_get_parent (pad));
+ dec = GST_AUDIO_DECODER (parent);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_FORMATS:
break;
}
default:
- res = gst_pad_query_default (pad, query);
+ res = gst_pad_query_default (pad, parent, query);
break;
}
error:
- gst_object_unref (dec);
return res;
}
* segment stuff etc at all
* Supposedly that's backward compatibility ... */
static gboolean
-gst_audio_decoder_src_query (GstPad * pad, GstQuery * query)
+gst_audio_decoder_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
GstAudioDecoder *dec;
- GstPad *peerpad;
gboolean res = FALSE;
- dec = GST_AUDIO_DECODER (GST_PAD_PARENT (pad));
- if (G_UNLIKELY (dec == NULL))
- return FALSE;
-
- peerpad = gst_pad_get_peer (GST_PAD (dec->sinkpad));
+ dec = GST_AUDIO_DECODER (parent);
GST_LOG_OBJECT (dec, "handling query: %" GST_PTR_FORMAT, query);
GstFormat format;
/* upstream in any case */
- if ((res = gst_pad_query_default (pad, query)))
+ if ((res = gst_pad_query_default (pad, parent, query)))
break;
gst_query_parse_duration (query, &format, NULL);
break;
}
default:
- res = gst_pad_query_default (pad, query);
+ res = gst_pad_query_default (pad, parent, query);
break;
}
- gst_object_unref (peerpad);
return res;
}
static gboolean gst_audio_encoder_sink_setcaps (GstAudioEncoder * enc,
GstCaps * caps);
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 gboolean gst_audio_encoder_src_query (GstPad * pad, GstObject * parent,
+ GstQuery * query);
+static gboolean gst_audio_encoder_sink_query (GstPad * pad, GstObject * parent,
+ GstQuery * query);
static void
gst_audio_encoder_class_init (GstAudioEncoderClass * klass)
}
static gboolean
-gst_audio_encoder_sink_query (GstPad * pad, GstQuery * query)
+gst_audio_encoder_sink_query (GstPad * pad, GstObject * parent,
+ GstQuery * query)
{
gboolean res = FALSE;
GstAudioEncoder *enc;
- enc = GST_AUDIO_ENCODER (gst_pad_get_parent (pad));
+ enc = GST_AUDIO_ENCODER (parent);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_FORMATS:
break;
}
default:
- res = gst_pad_query_default (pad, query);
+ res = gst_pad_query_default (pad, parent, query);
break;
}
error:
- gst_object_unref (enc);
-
return res;
}
* segment stuff etc at all
* Supposedly that's backward compatibility ... */
static gboolean
-gst_audio_encoder_src_query (GstPad * pad, GstQuery * query)
+gst_audio_encoder_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
GstAudioEncoder *enc;
- GstPad *peerpad;
gboolean res = FALSE;
- enc = GST_AUDIO_ENCODER (GST_PAD_PARENT (pad));
- if (G_UNLIKELY (enc == NULL))
- return FALSE;
-
- peerpad = gst_pad_get_peer (GST_PAD (enc->sinkpad));
+ enc = GST_AUDIO_ENCODER (parent);
GST_LOG_OBJECT (enc, "handling query: %" GST_PTR_FORMAT, query);
break;
}
- if (!peerpad) {
- GST_LOG_OBJECT (enc, "no peer");
- break;
- }
-
gst_query_parse_position (query, &req_fmt, NULL);
fmt = GST_FORMAT_TIME;
- if (!(res = gst_pad_query_position (peerpad, fmt, &pos)))
+ if (!(res = gst_pad_peer_query_position (enc->sinkpad, fmt, &pos)))
break;
- if ((res = gst_pad_query_convert (peerpad, fmt, pos, req_fmt, &val))) {
+ if ((res =
+ gst_pad_peer_query_convert (enc->sinkpad, fmt, pos, req_fmt,
+ &val))) {
gst_query_set_position (query, req_fmt, val);
}
break;
break;
}
- if (!peerpad) {
- GST_LOG_OBJECT (enc, "no peer");
- break;
- }
-
gst_query_parse_duration (query, &req_fmt, NULL);
fmt = GST_FORMAT_TIME;
- if (!(res = gst_pad_query_duration (peerpad, fmt, &dur)))
+ if (!(res = gst_pad_peer_query_duration (enc->sinkpad, fmt, &dur)))
break;
- if ((res = gst_pad_query_convert (peerpad, fmt, dur, req_fmt, &val))) {
+ if ((res =
+ gst_pad_peer_query_convert (enc->sinkpad, fmt, dur, req_fmt,
+ &val))) {
gst_query_set_duration (query, req_fmt, val);
}
break;
break;
}
default:
- res = gst_pad_query_default (pad, query);
+ res = gst_pad_query_default (pad, parent, query);
break;
}
- gst_object_unref (peerpad);
return res;
}
GstEvent * event);
static gboolean gst_rtp_base_payload_query_default (GstRTPBasePayload *
rtpbasepayload, GstPad * pad, GstQuery * query);
-static gboolean gst_rtp_base_payload_query (GstPad * pad, GstQuery * query);
+static gboolean gst_rtp_base_payload_query (GstPad * pad, GstObject * parent,
+ GstQuery * query);
static GstFlowReturn gst_rtp_base_payload_chain (GstPad * pad,
GstBuffer * buffer);
break;
}
default:
- res = gst_pad_query_default (pad, query);
+ res =
+ gst_pad_query_default (pad, GST_OBJECT_CAST (rtpbasepayload), query);
break;
}
return res;
}
static gboolean
-gst_rtp_base_payload_query (GstPad * pad, GstQuery * query)
+gst_rtp_base_payload_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
GstRTPBasePayload *rtpbasepayload;
GstRTPBasePayloadClass *rtpbasepayload_class;
gboolean res = FALSE;
- rtpbasepayload = GST_RTP_BASE_PAYLOAD (gst_pad_get_parent (pad));
- if (G_UNLIKELY (rtpbasepayload == NULL)) {
- return FALSE;
- }
-
+ rtpbasepayload = GST_RTP_BASE_PAYLOAD (parent);
rtpbasepayload_class = GST_RTP_BASE_PAYLOAD_GET_CLASS (rtpbasepayload);
if (rtpbasepayload_class->query)
res = rtpbasepayload_class->query (rtpbasepayload, pad, query);
- gst_object_unref (rtpbasepayload);
-
return res;
}
(is_list) ? -1 : gst_buffer_get_size (GST_BUFFER (obj)),
payload->seqnum, data.rtptime, GST_TIME_ARGS (data.timestamp));
- if (g_atomic_int_compare_and_exchange (&payload->
- priv->notified_first_timestamp, 1, 0)) {
+ if (g_atomic_int_compare_and_exchange (&payload->priv->
+ notified_first_timestamp, 1, 0)) {
g_object_notify (G_OBJECT (payload), "timestamp");
g_object_notify (G_OBJECT (payload), "seqnum");
}
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 gboolean gst_tag_demux_pad_query (GstPad * pad, GstObject * parent,
+ GstQuery * query);
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);
}
static gboolean
-gst_tag_demux_pad_query (GstPad * pad, GstQuery * query)
+gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
/* For a position or duration query, adjust the returned
* bytes to strip off the end and start areas */
-
- GstTagDemux *demux = GST_TAG_DEMUX (GST_PAD_PARENT (pad));
- GstPad *peer = NULL;
+ GstTagDemux *demux = GST_TAG_DEMUX (parent);
GstFormat format;
gint64 result;
- if ((peer = gst_pad_get_peer (demux->priv->sinkpad)) == NULL)
- return FALSE;
-
- if (!gst_pad_query (peer, query)) {
- gst_object_unref (peer);
+ if (!gst_pad_peer_query (demux->priv->sinkpad, query))
return FALSE;
- }
-
- gst_object_unref (peer);
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_POSITION:
static gboolean gst_adder_setcaps (GstAdder * adder, GstPad * pad,
GstCaps * caps);
-static gboolean gst_adder_src_query (GstPad * pad, GstQuery * query);
-static gboolean gst_adder_sink_query (GstPad * pad, GstQuery * query);
+static gboolean gst_adder_src_query (GstPad * pad, GstObject * parent,
+ GstQuery * query);
+static gboolean gst_adder_sink_query (GstPad * pad, GstObject * parent,
+ GstQuery * query);
static gboolean gst_adder_src_event (GstPad * pad, GstEvent * event);
static gboolean gst_adder_sink_event (GstPad * pad, GstEvent * event);
}
static gboolean
-gst_adder_sink_query (GstPad * pad, GstQuery * query)
+gst_adder_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res = FALSE;
break;
}
default:
- res = gst_pad_query_default (pad, query);
+ res = gst_pad_query_default (pad, parent, query);
break;
}
return res;
}
static gboolean
-gst_adder_src_query (GstPad * pad, GstQuery * query)
+gst_adder_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
- GstAdder *adder = GST_ADDER (gst_pad_get_parent (pad));
+ GstAdder *adder = GST_ADDER (parent);
gboolean res = FALSE;
switch (GST_QUERY_TYPE (query)) {
default:
/* FIXME, needs a custom query handler because we have multiple
* sinkpads */
- res = gst_pad_query_default (pad, query);
+ res = gst_pad_query_default (pad, parent, query);
break;
}
- gst_object_unref (adder);
return res;
}
GstEvent * event);
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 gboolean gst_audio_resample_query (GstPad * pad, GstObject * parent,
+ GstQuery * query);
#define gst_audio_resample_parent_class parent_class
G_DEFINE_TYPE (GstAudioResample, gst_audio_resample, GST_TYPE_BASE_TRANSFORM);
}
static gboolean
-gst_audio_resample_query (GstPad * pad, GstQuery * query)
+gst_audio_resample_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
- GstAudioResample *resample = GST_AUDIO_RESAMPLE (gst_pad_get_parent (pad));
+ GstAudioResample *resample = GST_AUDIO_RESAMPLE (parent);
GstBaseTransform *trans;
gboolean res = TRUE;
- if (G_UNLIKELY (resample == NULL))
- return FALSE;
trans = GST_BASE_TRANSFORM (resample);
GstClockTime min, max;
gboolean live;
guint64 latency;
- GstPad *peer;
gint rate = resample->inrate;
gint resampler_latency;
if (gst_base_transform_is_passthrough (trans))
resampler_latency = 0;
- if ((peer = gst_pad_get_peer (GST_BASE_TRANSFORM_SINK_PAD (trans)))) {
- if ((res = gst_pad_query (peer, query))) {
- gst_query_parse_latency (query, &live, &min, &max);
+ if ((res =
+ gst_pad_peer_query (GST_BASE_TRANSFORM_SINK_PAD (trans),
+ query))) {
+ gst_query_parse_latency (query, &live, &min, &max);
- GST_DEBUG_OBJECT (resample, "Peer latency: min %"
- GST_TIME_FORMAT " max %" GST_TIME_FORMAT,
- GST_TIME_ARGS (min), GST_TIME_ARGS (max));
+ GST_DEBUG_OBJECT (resample, "Peer latency: min %"
+ GST_TIME_FORMAT " max %" GST_TIME_FORMAT,
+ GST_TIME_ARGS (min), GST_TIME_ARGS (max));
- /* add our own latency */
- if (rate != 0 && resampler_latency != 0)
- latency = gst_util_uint64_scale_round (resampler_latency,
- GST_SECOND, rate);
- else
- latency = 0;
+ /* add our own latency */
+ if (rate != 0 && resampler_latency != 0)
+ latency = gst_util_uint64_scale_round (resampler_latency,
+ GST_SECOND, rate);
+ else
+ latency = 0;
- GST_DEBUG_OBJECT (resample, "Our latency: %" GST_TIME_FORMAT,
- GST_TIME_ARGS (latency));
+ GST_DEBUG_OBJECT (resample, "Our latency: %" GST_TIME_FORMAT,
+ GST_TIME_ARGS (latency));
- min += latency;
- if (GST_CLOCK_TIME_IS_VALID (max))
- max += latency;
+ min += latency;
+ if (GST_CLOCK_TIME_IS_VALID (max))
+ max += latency;
- GST_DEBUG_OBJECT (resample, "Calculated total latency : min %"
- GST_TIME_FORMAT " max %" GST_TIME_FORMAT,
- GST_TIME_ARGS (min), GST_TIME_ARGS (max));
+ GST_DEBUG_OBJECT (resample, "Calculated total latency : min %"
+ GST_TIME_FORMAT " max %" GST_TIME_FORMAT,
+ GST_TIME_ARGS (min), GST_TIME_ARGS (max));
- gst_query_set_latency (query, live, min, max);
- }
- gst_object_unref (peer);
+ gst_query_set_latency (query, live, min, max);
}
break;
}
default:
- res = gst_pad_query_default (pad, query);
+ res = gst_pad_query_default (pad, parent, query);
break;
}
- gst_object_unref (resample);
return res;
}
static GstFlowReturn gst_smart_encoder_chain (GstPad * pad, GstBuffer * buf);
static gboolean smart_encoder_sink_event (GstPad * pad, GstEvent * event);
-static gboolean smart_encoder_sink_query (GstPad * pad, GstQuery * query);
+static gboolean smart_encoder_sink_query (GstPad * pad, GstObject * parent,
+ GstQuery * query);
static GstCaps *smart_encoder_sink_getcaps (GstPad * pad, GstCaps * filter);
static GstStateChangeReturn
gst_smart_encoder_change_state (GstElement * element,
}
static gboolean
-smart_encoder_sink_query (GstPad * pad, GstQuery * query)
+smart_encoder_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res;
break;
}
default:
- res = gst_pad_query_default (pad, query);
+ res = gst_pad_query_default (pad, parent, query);
break;
}
return res;
}
static gboolean
-gst_stream_combiner_sink_query (GstPad * pad, GstQuery * query)
+gst_stream_combiner_sink_query (GstPad * pad, GstObject * parent,
+ GstQuery * query)
{
- GstStreamCombiner *stream_combiner =
- (GstStreamCombiner *) GST_PAD_PARENT (pad);
+ GstStreamCombiner *stream_combiner = (GstStreamCombiner *) parent;
return gst_pad_peer_query (stream_combiner->srcpad, query);
}
}
static gboolean
-gst_stream_combiner_src_query (GstPad * pad, GstQuery * query)
+gst_stream_combiner_src_query (GstPad * pad, GstObject * parent,
+ GstQuery * query)
{
- GstStreamCombiner *stream_combiner =
- (GstStreamCombiner *) GST_PAD_PARENT (pad);
+ GstStreamCombiner *stream_combiner = (GstStreamCombiner *) parent;
GstPad *sinkpad = NULL;
STREAMS_LOCK (stream_combiner);
}
static gboolean
-gst_stream_splitter_sink_query (GstPad * pad, GstQuery * query)
+gst_stream_splitter_sink_query (GstPad * pad, GstObject * parent,
+ GstQuery * query)
{
gboolean res;
break;
}
default:
- res = gst_pad_query_default (pad, query);
+ res = gst_pad_query_default (pad, parent, query);
break;
}
return res;
}
static gboolean
-gst_stream_splitter_src_query (GstPad * pad, GstQuery * query)
+gst_stream_splitter_src_query (GstPad * pad, GstObject * parent,
+ GstQuery * query)
{
- GstStreamSplitter *stream_splitter =
- (GstStreamSplitter *) GST_PAD_PARENT (pad);
+ GstStreamSplitter *stream_splitter = (GstStreamSplitter *) parent;
GST_DEBUG_OBJECT (pad, "%s", GST_QUERY_TYPE_NAME (query));
}
static gboolean
-gst_play_sink_convert_bin_query (GstPad * pad, GstQuery * query)
+gst_play_sink_convert_bin_query (GstPad * pad, GstObject * parent,
+ GstQuery * query)
{
gboolean res = FALSE;
break;
}
default:
- res = gst_pad_query_default (pad, query);
+ res = gst_pad_query_default (pad, parent, query);
break;
}
return res;
}
static gboolean
-gst_stream_synchronizer_query (GstPad * pad, GstQuery * query)
+gst_stream_synchronizer_query (GstPad * pad, GstObject * parent,
+ GstQuery * query)
{
GstPad *opad;
gboolean ret = FALSE;
}
static gboolean
-gst_subtitle_overlay_subtitle_sink_query (GstPad * pad, GstQuery * query)
+gst_subtitle_overlay_subtitle_sink_query (GstPad * pad, GstObject * parent,
+ GstQuery * query)
{
- GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY (gst_pad_get_parent (pad));
gboolean ret;
switch (GST_QUERY_TYPE (query)) {
break;
}
default:
- ret = gst_pad_query_default (pad, query);
+ ret = gst_pad_query_default (pad, parent, query);
break;
}
- gst_object_unref (self);
return ret;
}
static gboolean gst_sub_parse_src_event (GstPad * pad, GstEvent * event);
-static gboolean gst_sub_parse_src_query (GstPad * pad, GstQuery * query);
+static gboolean gst_sub_parse_src_query (GstPad * pad, GstObject * parent,
+ GstQuery * query);
static gboolean gst_sub_parse_sink_event (GstPad * pad, GstEvent * event);
static GstStateChangeReturn gst_sub_parse_change_state (GstElement * element,
*/
static gboolean
-gst_sub_parse_src_query (GstPad * pad, GstQuery * query)
+gst_sub_parse_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
- GstSubParse *self = GST_SUBPARSE (gst_pad_get_parent (pad));
+ GstSubParse *self = GST_SUBPARSE (parent);
gboolean ret = FALSE;
GST_DEBUG ("Handling %s query", GST_QUERY_TYPE_NAME (query));
break;
}
- gst_object_unref (self);
-
return ret;
}