Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gst-plugins-base
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sebastian Dröge
gst-plugins-base
Commits
2202511e
Commit
2202511e
authored
Nov 16, 2011
by
Wim Taymans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add parent to query function
parent
94ac7e85
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
158 additions
and
197 deletions
+158
-197
ext/libvisual/visual.c
ext/libvisual/visual.c
+7
-6
ext/ogg/gstoggdemux.c
ext/ogg/gstoggdemux.c
+5
-5
ext/ogg/gstogmparse.c
ext/ogg/gstogmparse.c
+5
-5
ext/pango/gstbasetextoverlay.c
ext/pango/gstbasetextoverlay.c
+8
-18
ext/theora/gsttheoradec.c
ext/theora/gsttheoradec.c
+7
-9
ext/theora/gsttheoraenc.c
ext/theora/gsttheoraenc.c
+4
-3
ext/theora/gsttheoraparse.c
ext/theora/gsttheoraparse.c
+5
-6
ext/vorbis/gstvorbisparse.c
ext/vorbis/gstvorbisparse.c
+8
-8
gst-libs/gst/audio/gstaudiodecoder.c
gst-libs/gst/audio/gstaudiodecoder.c
+13
-17
gst-libs/gst/audio/gstaudioencoder.c
gst-libs/gst/audio/gstaudioencoder.c
+19
-30
gst-libs/gst/rtp/gstrtpbasepayload.c
gst-libs/gst/rtp/gstrtpbasepayload.c
+8
-12
gst-libs/gst/tag/gsttagdemux.c
gst-libs/gst/tag/gsttagdemux.c
+5
-13
gst/adder/gstadder.c
gst/adder/gstadder.c
+9
-8
gst/audioresample/gstaudioresample.c
gst/audioresample/gstaudioresample.c
+27
-31
gst/encoding/gstsmartencoder.c
gst/encoding/gstsmartencoder.c
+4
-3
gst/encoding/gststreamcombiner.c
gst/encoding/gststreamcombiner.c
+6
-6
gst/encoding/gststreamsplitter.c
gst/encoding/gststreamsplitter.c
+6
-5
gst/playback/gstplaysinkconvertbin.c
gst/playback/gstplaysinkconvertbin.c
+3
-2
gst/playback/gststreamsynchronizer.c
gst/playback/gststreamsynchronizer.c
+2
-1
gst/playback/gstsubtitleoverlay.c
gst/playback/gstsubtitleoverlay.c
+3
-4
gst/subparse/gstsubparse.c
gst/subparse/gstsubparse.c
+4
-5
No files found.
ext/libvisual/visual.c
View file @
2202511e
...
...
@@ -133,7 +133,8 @@ static GstFlowReturn gst_visual_chain (GstPad * pad, GstBuffer * buffer);
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
);
...
...
@@ -593,12 +594,12 @@ gst_visual_src_event (GstPad * pad, GstEvent * event)
}
static
gboolean
gst_visual_src_query
(
GstPad
*
pad
,
GstQuery
*
query
)
gst_visual_src_query
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Query
*
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
:
...
...
@@ -651,7 +652,7 @@ gst_visual_src_query (GstPad * pad, GstQuery * query)
res
=
TRUE
;
}
default:
res
=
gst_pad_query_default
(
pad
,
query
);
res
=
gst_pad_query_default
(
pad
,
parent
,
query
);
break
;
}
...
...
@@ -896,8 +897,8 @@ gst_visual_change_state (GstElement * element, GstStateChange transition)
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 */
...
...
ext/ogg/gstoggdemux.c
View file @
2202511e
...
...
@@ -131,7 +131,8 @@ 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
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
);
...
...
@@ -239,12 +240,12 @@ gst_ogg_pad_finalize (GObject * object)
}
static
gboolean
gst_ogg_pad_src_query
(
GstPad
*
pad
,
GstQuery
*
query
)
gst_ogg_pad_src_query
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Query
*
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
:
...
...
@@ -336,11 +337,10 @@ gst_ogg_pad_src_query (GstPad * pad, GstQuery * query)
}
default:
res
=
gst_pad_query_default
(
pad
,
query
);
res
=
gst_pad_query_default
(
pad
,
parent
,
query
);
break
;
}
done:
gst_object_unref
(
ogg
);
return
res
;
...
...
ext/ogg/gstogmparse.c
View file @
2202511e
...
...
@@ -152,7 +152,8 @@ static void gst_ogm_audio_parse_init (GstOgmParse * ogm);
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
);
...
...
@@ -454,9 +455,9 @@ gst_ogm_parse_sink_convert (GstPad * pad,
}
static
gboolean
gst_ogm_parse_sink_query
(
GstPad
*
pad
,
GstQuery
*
query
)
gst_ogm_parse_sink_query
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Query
*
query
)
{
GstOgmParse
*
ogm
=
GST_OGM_PARSE
(
gst_pad_get_parent
(
pad
)
);
GstOgmParse
*
ogm
=
GST_OGM_PARSE
(
parent
);
GstFormat
format
;
gboolean
res
=
FALSE
;
...
...
@@ -491,11 +492,10 @@ gst_ogm_parse_sink_query (GstPad * pad, GstQuery * query)
break
;
}
default:
res
=
gst_pad_query_default
(
pad
,
query
);
res
=
gst_pad_query_default
(
pad
,
parent
,
query
);
break
;
}
gst_object_unref
(
ogm
);
return
res
;
}
...
...
ext/pango/gstbasetextoverlay.c
View file @
2202511e
...
...
@@ -315,12 +315,12 @@ static gboolean gst_base_text_overlay_setcaps_txt (GstBaseTextOverlay * overlay,
static
gboolean
gst_base_text_overlay_src_event
(
GstPad
*
pad
,
GstEvent
*
event
);
static
gboolean
gst_base_text_overlay_src_query
(
GstPad
*
pad
,
GstQuery
*
query
);
Gst
Object
*
parent
,
Gst
Query
*
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
);
Gst
Object
*
parent
,
Gst
Query
*
query
);
static
GstFlowReturn
gst_base_text_overlay_video_chain
(
GstPad
*
pad
,
GstBuffer
*
buffer
);
...
...
@@ -993,14 +993,13 @@ gst_base_text_overlay_get_property (GObject * object, guint prop_id,
}
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
:
...
...
@@ -1019,8 +1018,6 @@ gst_base_text_overlay_src_query (GstPad * pad, GstQuery * query)
break
;
}
gst_object_unref
(
overlay
);
return
ret
;
}
...
...
@@ -2326,15 +2323,10 @@ gst_base_text_overlay_video_event (GstPad * pad, GstEvent * event)
}
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
:
...
...
@@ -2349,12 +2341,10 @@ gst_base_text_overlay_video_query (GstPad * pad, GstQuery * query)
break
;
}
default:
ret
=
gst_pad_query_default
(
pad
,
query
);
ret
=
gst_pad_query_default
(
pad
,
parent
,
query
);
break
;
}
gst_object_unref
(
overlay
);
return
ret
;
}
...
...
ext/theora/gsttheoradec.c
View file @
2202511e
...
...
@@ -97,10 +97,10 @@ static GstFlowReturn theora_dec_chain (GstPad * pad, GstBuffer * buffer);
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
,
Gst
Query
*
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
,
Gst
Object
*
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);
...
...
@@ -432,13 +432,12 @@ no_header:
#endif
static
gboolean
theora_dec_src_query
(
GstPad
*
pad
,
GstQuery
*
query
)
theora_dec_src_query
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Query
*
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
:
...
...
@@ -492,11 +491,10 @@ theora_dec_src_query (GstPad * pad, GstQuery * query)
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
;
...
...
ext/theora/gsttheoraenc.c
View file @
2202511e
...
...
@@ -253,7 +253,8 @@ static gboolean theora_enc_src_event (GstPad * pad, GstEvent * event);
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
);
...
...
@@ -656,7 +657,7 @@ theora_enc_sink_getcaps (GstPad * pad, GstCaps * filter)
}
static
gboolean
theora_enc_sink_query
(
GstPad
*
pad
,
GstQuery
*
query
)
theora_enc_sink_query
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Query
*
query
)
{
gboolean
res
=
FALSE
;
...
...
@@ -673,7 +674,7 @@ theora_enc_sink_query (GstPad * pad, GstQuery * query)
break
;
}
default:
res
=
gst_pad_query_default
(
pad
,
query
);
res
=
gst_pad_query_default
(
pad
,
parent
,
query
);
break
;
}
...
...
ext/theora/gsttheoraparse.c
View file @
2202511e
...
...
@@ -98,7 +98,8 @@ static GstFlowReturn theora_parse_chain (GstPad * pad, GstBuffer * buffer);
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
)
...
...
@@ -801,13 +802,12 @@ no_header:
}
static
gboolean
theora_parse_src_query
(
GstPad
*
pad
,
GstQuery
*
query
)
theora_parse_src_query
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Query
*
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
:
...
...
@@ -872,11 +872,10 @@ theora_parse_src_query (GstPad * pad, GstQuery * query)
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
;
...
...
ext/vorbis/gstvorbisparse.c
View file @
2202511e
...
...
@@ -79,10 +79,10 @@ static GstFlowReturn vorbis_parse_chain (GstPad * pad, GstBuffer * buffer);
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
,
Gst
Query
*
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
,
Gst
Object
*
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
);
...
...
@@ -545,13 +545,13 @@ vorbis_parse_convert (GstPad * pad,
}
static
gboolean
vorbis_parse_src_query
(
GstPad
*
pad
,
GstQuery
*
query
)
vorbis_parse_src_query
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Query
*
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
:
...
...
@@ -590,7 +590,7 @@ vorbis_parse_src_query (GstPad * pad, GstQuery * query)
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
;
}
...
...
@@ -608,7 +608,7 @@ vorbis_parse_src_query (GstPad * pad, GstQuery * query)
break
;
}
default:
res
=
gst_pad_query_default
(
pad
,
query
);
res
=
gst_pad_query_default
(
pad
,
parent
,
query
);
break
;
}
return
res
;
...
...
gst-libs/gst/audio/gstaudiodecoder.c
View file @
2202511e
...
...
@@ -282,8 +282,10 @@ static gboolean gst_audio_decoder_sink_setcaps (GstAudioDecoder * dec,
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
;
...
...
@@ -1730,12 +1732,13 @@ exit:
}
static
gboolean
gst_audio_decoder_sink_query
(
GstPad
*
pad
,
GstQuery
*
query
)
gst_audio_decoder_sink_query
(
GstPad
*
pad
,
GstObject
*
parent
,
GstQuery
*
query
)
{
gboolean
res
=
TRU
E
;
gboolean
res
=
FALS
E
;
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
:
...
...
@@ -1758,12 +1761,11 @@ gst_audio_decoder_sink_query (GstPad * pad, GstQuery * query)
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
;
}
...
...
@@ -1772,17 +1774,12 @@ error:
* 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
,
Gst
Object
*
parent
,
Gst
Query
*
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
);
...
...
@@ -1792,7 +1789,7 @@ gst_audio_decoder_src_query (GstPad * pad, GstQuery * 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
);
...
...
@@ -1886,11 +1883,10 @@ gst_audio_decoder_src_query (GstPad * pad, GstQuery * query)
break
;
}
default:
res
=
gst_pad_query_default
(
pad
,
query
);
res
=
gst_pad_query_default
(
pad
,
parent
,
query
);
break
;
}
gst_object_unref
(
peerpad
);
return
res
;
}
...
...
gst-libs/gst/audio/gstaudioencoder.c
View file @
2202511e
...
...
@@ -303,8 +303,10 @@ static gboolean gst_audio_encoder_sink_event (GstPad * pad, GstEvent * event);
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
)
...
...
@@ -1361,12 +1363,13 @@ gst_audio_encoder_sink_event (GstPad * pad, GstEvent * event)
}
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
:
...
...
@@ -1406,13 +1409,11 @@ gst_audio_encoder_sink_query (GstPad * pad, GstQuery * query)
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
;
}
...
...
@@ -1494,17 +1495,12 @@ exit:
* 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
,
Gst
Object
*
parent
,
Gst
Query
*
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
);
...
...
@@ -1519,17 +1515,14 @@ gst_audio_encoder_src_query (GstPad * pad, GstQuery * 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
(
peer
pad
,
fmt
,
&
pos
)))
if
(
!
(
res
=
gst_pad_
peer_query_position
(
enc
->
sink
pad
,
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
;
...
...
@@ -1544,17 +1537,14 @@ gst_audio_encoder_src_query (GstPad * pad, GstQuery * query)
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
(
peer
pad
,
fmt
,
&
dur
)))
if
(
!
(
res
=
gst_pad_
peer_query_duration
(
enc
->
sink
pad
,
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
;
...
...
@@ -1602,11 +1592,10 @@ gst_audio_encoder_src_query (GstPad * pad, GstQuery * query)
break
;
}
default:
res
=
gst_pad_query_default
(
pad
,
query
);
res
=
gst_pad_query_default
(
pad
,
parent
,
query
);
break
;
}
gst_object_unref
(
peerpad
);
return
res
;
}
...
...
gst-libs/gst/rtp/gstrtpbasepayload.c
View file @
2202511e
...
...
@@ -105,7 +105,8 @@ static gboolean gst_rtp_base_payload_sink_event (GstPad * pad,
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
);
...
...
@@ -439,31 +440,26 @@ gst_rtp_base_payload_query_default (GstRTPBasePayload * rtpbasepayload,
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
,
Gst
Object
*
parent
,
Gst
Query
*
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
;
}
...
...
@@ -862,8 +858,8 @@ gst_rtp_base_payload_prepare_push (GstRTPBasePayload * payload,
(
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"
);
}
...
...
gst-libs/gst/tag/gsttagdemux.c
View file @
2202511e
...
...
@@ -151,7 +151,8 @@ static gboolean gst_tag_demux_srcpad_event (GstPad * pad, GstEvent * event);
static
gboolean
gst_tag_demux_sink_activate
(
GstPad
*
sinkpad
);