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
e302833e
Commit
e302833e
authored
Nov 17, 2011
by
Wim Taymans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add parent to pad functions
parent
67364dff
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
353 additions
and
377 deletions
+353
-377
ext/libvisual/visual.c
ext/libvisual/visual.c
+16
-13
ext/ogg/gstoggaviparse.c
ext/ogg/gstoggaviparse.c
+8
-6
ext/ogg/gstoggdemux.c
ext/ogg/gstoggdemux.c
+14
-13
ext/ogg/gstoggmux.c
ext/ogg/gstoggmux.c
+8
-7
ext/ogg/gstoggparse.c
ext/ogg/gstoggparse.c
+4
-3
ext/ogg/gstogmparse.c
ext/ogg/gstogmparse.c
+9
-8
ext/pango/gstbasetextoverlay.c
ext/pango/gstbasetextoverlay.c
+26
-38
ext/pango/gsttextrender.c
ext/pango/gsttextrender.c
+3
-3
ext/theora/gsttheoradec.c
ext/theora/gsttheoradec.c
+14
-15
ext/theora/gsttheoraenc.c
ext/theora/gsttheoraenc.c
+12
-9
ext/theora/gsttheoraparse.c
ext/theora/gsttheoraparse.c
+12
-14
ext/vorbis/gstvorbisparse.c
ext/vorbis/gstvorbisparse.c
+12
-12
gst-libs/gst/audio/gstaudiodecoder.c
gst-libs/gst/audio/gstaudiodecoder.c
+14
-17
gst-libs/gst/audio/gstaudioencoder.c
gst-libs/gst/audio/gstaudioencoder.c
+10
-8
gst-libs/gst/rtp/gstrtpbasedepayload.c
gst-libs/gst/rtp/gstrtpbasedepayload.c
+7
-12
gst-libs/gst/rtp/gstrtpbasepayload.c
gst-libs/gst/rtp/gstrtpbasepayload.c
+15
-24
gst-libs/gst/tag/gsttagdemux.c
gst-libs/gst/tag/gsttagdemux.c
+19
-17
gst-libs/gst/tag/gsttagmux.c
gst-libs/gst/tag/gsttagmux.c
+10
-10
gst/adder/gstadder.c
gst/adder/gstadder.c
+9
-9
gst/audiorate/gstaudiorate.c
gst/audiorate/gstaudiorate.c
+13
-16
gst/encoding/gstsmartencoder.c
gst/encoding/gstsmartencoder.c
+9
-9
gst/encoding/gststreamcombiner.c
gst/encoding/gststreamcombiner.c
+8
-9
gst/encoding/gststreamsplitter.c
gst/encoding/gststreamsplitter.c
+8
-9
gst/gdp/gstgdpdepay.c
gst/gdp/gstgdpdepay.c
+12
-12
gst/gdp/gstgdppay.c
gst/gdp/gstgdppay.c
+13
-12
gst/playback/gstplaysinkconvertbin.c
gst/playback/gstplaysinkconvertbin.c
+4
-5
gst/playback/gststreamsynchronizer.c
gst/playback/gststreamsynchronizer.c
+9
-16
gst/playback/gstsubtitleoverlay.c
gst/playback/gstsubtitleoverlay.c
+25
-23
gst/subparse/gstssaparse.c
gst/subparse/gstssaparse.c
+12
-9
gst/subparse/gstsubparse.c
gst/subparse/gstsubparse.c
+18
-19
No files found.
ext/libvisual/visual.c
View file @
e302833e
...
...
@@ -129,9 +129,12 @@ static void gst_visual_finalize (GObject * object);
static
GstStateChangeReturn
gst_visual_change_state
(
GstElement
*
element
,
GstStateChange
transition
);
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
GstFlowReturn
gst_visual_chain
(
GstPad
*
pad
,
GstObject
*
parent
,
GstBuffer
*
buffer
);
static
gboolean
gst_visual_sink_event
(
GstPad
*
pad
,
GstObject
*
parent
,
GstEvent
*
event
);
static
gboolean
gst_visual_src_event
(
GstPad
*
pad
,
GstObject
*
parent
,
GstEvent
*
event
);
static
gboolean
gst_visual_src_query
(
GstPad
*
pad
,
GstObject
*
parent
,
GstQuery
*
query
);
...
...
@@ -504,12 +507,12 @@ no_format:
}
static
gboolean
gst_visual_sink_event
(
GstPad
*
pad
,
GstEvent
*
event
)
gst_visual_sink_event
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Event
*
event
)
{
GstVisual
*
visual
;
gboolean
res
;
visual
=
GST_VISUAL
(
GST_PAD_PARENT
(
pad
)
);
visual
=
GST_VISUAL
(
parent
);
switch
(
GST_EVENT_TYPE
(
event
))
{
case
GST_EVENT_FLUSH_START
:
...
...
@@ -541,7 +544,7 @@ gst_visual_sink_event (GstPad * pad, GstEvent * event)
break
;
}
default:
res
=
gst_pad_event_default
(
pad
,
event
);
res
=
gst_pad_event_default
(
pad
,
parent
,
event
);
break
;
}
...
...
@@ -549,12 +552,12 @@ gst_visual_sink_event (GstPad * pad, GstEvent * event)
}
static
gboolean
gst_visual_src_event
(
GstPad
*
pad
,
GstEvent
*
event
)
gst_visual_src_event
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Event
*
event
)
{
GstVisual
*
visual
;
gboolean
res
;
visual
=
GST_VISUAL
(
GST_PAD_PARENT
(
pad
)
);
visual
=
GST_VISUAL
(
parent
);
switch
(
GST_EVENT_TYPE
(
event
))
{
case
GST_EVENT_QOS
:
...
...
@@ -586,7 +589,7 @@ gst_visual_src_event (GstPad * pad, GstEvent * event)
res
=
TRUE
;
break
;
default:
res
=
gst_pad_event_default
(
pad
,
event
);
res
=
gst_pad_event_default
(
pad
,
parent
,
event
);
break
;
}
...
...
@@ -676,11 +679,11 @@ ensure_negotiated (GstVisual * visual)
}
static
GstFlowReturn
gst_visual_chain
(
GstPad
*
pad
,
GstBuffer
*
buffer
)
gst_visual_chain
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Buffer
*
buffer
)
{
GstBuffer
*
outbuf
=
NULL
;
guint
i
;
GstVisual
*
visual
=
GST_VISUAL
(
GST_PAD_PARENT
(
pad
)
);
GstVisual
*
visual
=
GST_VISUAL
(
parent
);
GstFlowReturn
ret
=
GST_FLOW_OK
;
guint
avail
;
gint
bpf
,
rate
,
channels
;
...
...
@@ -897,8 +900,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/gstoggaviparse.c
View file @
e302833e
...
...
@@ -124,8 +124,10 @@ GST_STATIC_PAD_TEMPLATE ("sink",
static
void
gst_ogg_avi_parse_finalize
(
GObject
*
object
);
static
GstStateChangeReturn
gst_ogg_avi_parse_change_state
(
GstElement
*
element
,
GstStateChange
transition
);
static
gboolean
gst_ogg_avi_parse_event
(
GstPad
*
pad
,
GstEvent
*
event
);
static
GstFlowReturn
gst_ogg_avi_parse_chain
(
GstPad
*
pad
,
GstBuffer
*
buffer
);
static
gboolean
gst_ogg_avi_parse_event
(
GstPad
*
pad
,
GstObject
*
parent
,
GstEvent
*
event
);
static
GstFlowReturn
gst_ogg_avi_parse_chain
(
GstPad
*
pad
,
GstObject
*
parent
,
GstBuffer
*
buffer
);
static
gboolean
gst_ogg_avi_parse_setcaps
(
GstPad
*
pad
,
GstCaps
*
caps
);
static
void
...
...
@@ -289,12 +291,12 @@ buffer_too_small:
}
static
gboolean
gst_ogg_avi_parse_event
(
GstPad
*
pad
,
GstEvent
*
event
)
gst_ogg_avi_parse_event
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Event
*
event
)
{
GstOggAviParse
*
ogg
;
gboolean
ret
;
ogg
=
GST_OGG_AVI_PARSE
(
GST_OBJECT_PARENT
(
pad
)
);
ogg
=
GST_OGG_AVI_PARSE
(
parent
);
switch
(
GST_EVENT_TYPE
(
event
))
{
case
GST_EVENT_CAPS
:
...
...
@@ -347,7 +349,7 @@ gst_ogg_avi_parse_push_packet (GstOggAviParse * ogg, ogg_packet * packet)
}
static
GstFlowReturn
gst_ogg_avi_parse_chain
(
GstPad
*
pad
,
GstBuffer
*
buffer
)
gst_ogg_avi_parse_chain
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Buffer
*
buffer
)
{
GstFlowReturn
result
=
GST_FLOW_OK
;
GstOggAviParse
*
ogg
;
...
...
@@ -355,7 +357,7 @@ gst_ogg_avi_parse_chain (GstPad * pad, GstBuffer * buffer)
gchar
*
oggbuf
;
gint
ret
=
-
1
;
ogg
=
GST_OGG_AVI_PARSE
(
GST_OBJECT_PARENT
(
pad
)
);
ogg
=
GST_OGG_AVI_PARSE
(
parent
);
size
=
gst_buffer_get_size
(
buffer
);
...
...
ext/ogg/gstoggdemux.c
View file @
e302833e
...
...
@@ -133,7 +133,8 @@ static void gst_ogg_pad_finalize (GObject * object);
static
gboolean
gst_ogg_pad_src_query
(
GstPad
*
pad
,
GstObject
*
parent
,
GstQuery
*
query
);
static
gboolean
gst_ogg_pad_event
(
GstPad
*
pad
,
GstEvent
*
event
);
static
gboolean
gst_ogg_pad_event
(
GstPad
*
pad
,
GstObject
*
parent
,
GstEvent
*
event
);
static
GstOggPad
*
gst_ogg_chain_get_stream
(
GstOggChain
*
chain
,
guint32
serialno
);
...
...
@@ -384,12 +385,12 @@ error:
}
static
gboolean
gst_ogg_pad_event
(
GstPad
*
pad
,
GstEvent
*
event
)
gst_ogg_pad_event
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Event
*
event
)
{
gboolean
res
;
GstOggDemux
*
ogg
;
ogg
=
GST_OGG_DEMUX
(
gst_pad_get_parent
(
pad
)
);
ogg
=
GST_OGG_DEMUX
(
parent
);
switch
(
GST_EVENT_TYPE
(
event
))
{
case
GST_EVENT_SEEK
:
...
...
@@ -398,10 +399,9 @@ gst_ogg_pad_event (GstPad * pad, GstEvent * event)
gst_event_unref
(
event
);
break
;
default:
res
=
gst_pad_event_default
(
pad
,
event
);
res
=
gst_pad_event_default
(
pad
,
parent
,
event
);
break
;
}
gst_object_unref
(
ogg
);
return
res
;
}
...
...
@@ -1776,9 +1776,11 @@ static GstFlowReturn gst_ogg_demux_read_chain (GstOggDemux * ogg,
static
GstFlowReturn
gst_ogg_demux_read_end_chain
(
GstOggDemux
*
ogg
,
GstOggChain
*
chain
);
static
gboolean
gst_ogg_demux_sink_event
(
GstPad
*
pad
,
GstEvent
*
event
);
static
gboolean
gst_ogg_demux_sink_event
(
GstPad
*
pad
,
GstObject
*
parent
,
GstEvent
*
event
);
static
void
gst_ogg_demux_loop
(
GstOggPad
*
pad
);
static
GstFlowReturn
gst_ogg_demux_chain
(
GstPad
*
pad
,
GstBuffer
*
buffer
);
static
GstFlowReturn
gst_ogg_demux_chain
(
GstPad
*
pad
,
GstObject
*
parent
,
GstBuffer
*
buffer
);
static
gboolean
gst_ogg_demux_sink_activate
(
GstPad
*
sinkpad
);
static
gboolean
gst_ogg_demux_sink_activate_pull
(
GstPad
*
sinkpad
,
gboolean
active
);
...
...
@@ -1879,12 +1881,12 @@ gst_ogg_demux_reset_streams (GstOggDemux * ogg)
}
static
gboolean
gst_ogg_demux_sink_event
(
GstPad
*
pad
,
GstEvent
*
event
)
gst_ogg_demux_sink_event
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Event
*
event
)
{
gboolean
res
;
GstOggDemux
*
ogg
;
ogg
=
GST_OGG_DEMUX
(
gst_pad_get_parent
(
pad
)
);
ogg
=
GST_OGG_DEMUX
(
parent
);
switch
(
GST_EVENT_TYPE
(
event
))
{
case
GST_EVENT_FLUSH_START
:
...
...
@@ -1954,7 +1956,6 @@ gst_ogg_demux_sink_event (GstPad * pad, GstEvent * event)
res
=
gst_ogg_demux_send_event
(
ogg
,
event
);
break
;
}
gst_object_unref
(
ogg
);
return
res
;
}
...
...
@@ -3910,13 +3911,13 @@ unknown_chain:
* the serialno, submit pages and packets to the oggpads
*/
static
GstFlowReturn
gst_ogg_demux_chain
(
GstPad
*
pad
,
GstBuffer
*
buffer
)
gst_ogg_demux_chain
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Buffer
*
buffer
)
{
GstOggDemux
*
ogg
;
gint
ret
=
0
;
GstFlowReturn
result
=
GST_FLOW_OK
;
ogg
=
GST_OGG_DEMUX
(
GST_OBJECT_PARENT
(
pad
)
);
ogg
=
GST_OGG_DEMUX
(
parent
);
GST_DEBUG_OBJECT
(
ogg
,
"enter"
);
result
=
gst_ogg_demux_submit_buffer
(
ogg
,
buffer
);
...
...
@@ -4060,7 +4061,7 @@ gst_ogg_demux_loop_forward (GstOggDemux * ogg)
ogg
->
newsegment
=
NULL
;
}
ret
=
gst_ogg_demux_chain
(
ogg
->
sinkpad
,
buffer
);
ret
=
gst_ogg_demux_chain
(
ogg
->
sinkpad
,
GST_OBJECT_CAST
(
ogg
),
buffer
);
if
(
ret
!=
GST_FLOW_OK
)
{
GST_LOG_OBJECT
(
ogg
,
"Failed demux_chain"
);
goto
done
;
...
...
ext/ogg/gstoggmux.c
View file @
e302833e
...
...
@@ -130,7 +130,8 @@ static void gst_ogg_mux_finalize (GObject * object);
static
GstFlowReturn
gst_ogg_mux_collected
(
GstCollectPads2
*
pads
,
GstOggMux
*
ogg_mux
);
static
gboolean
gst_ogg_mux_handle_src_event
(
GstPad
*
pad
,
GstEvent
*
event
);
static
gboolean
gst_ogg_mux_handle_src_event
(
GstPad
*
pad
,
GstObject
*
parent
,
GstEvent
*
event
);
static
GstPad
*
gst_ogg_mux_request_new_pad
(
GstElement
*
element
,
GstPadTemplate
*
templ
,
const
gchar
*
name
,
const
GstCaps
*
caps
);
static
void
gst_ogg_mux_release_pad
(
GstElement
*
element
,
GstPad
*
pad
);
...
...
@@ -303,9 +304,9 @@ gst_ogg_mux_sinkconnect (GstPad * pad, GstPad * peer)
}
static
gboolean
gst_ogg_mux_sink_event
(
GstPad
*
pad
,
GstEvent
*
event
)
gst_ogg_mux_sink_event
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Event
*
event
)
{
GstOggMux
*
ogg_mux
=
GST_OGG_MUX
(
gst_pad_get_parent
(
pad
)
);
GstOggMux
*
ogg_mux
=
GST_OGG_MUX
(
parent
);
GstOggPadData
*
ogg_pad
=
(
GstOggPadData
*
)
gst_pad_get_element_private
(
pad
);
gboolean
ret
=
FALSE
;
...
...
@@ -350,9 +351,8 @@ gst_ogg_mux_sink_event (GstPad * pad, GstEvent * event)
/* now GstCollectPads can take care of the rest, e.g. EOS */
if
(
event
!=
NULL
)
ret
=
ogg_pad
->
collect_event
(
pad
,
event
);
ret
=
ogg_pad
->
collect_event
(
pad
,
parent
,
event
);
gst_object_unref
(
ogg_mux
);
return
ret
;
}
...
...
@@ -512,7 +512,8 @@ gst_ogg_mux_release_pad (GstElement * element, GstPad * pad)
/* handle events */
static
gboolean
gst_ogg_mux_handle_src_event
(
GstPad
*
pad
,
GstEvent
*
event
)
gst_ogg_mux_handle_src_event
(
GstPad
*
pad
,
GstObject
*
parent
,
GstEvent
*
event
)
{
GstEventType
type
;
...
...
@@ -526,7 +527,7 @@ gst_ogg_mux_handle_src_event (GstPad * pad, GstEvent * event)
break
;
}
return
gst_pad_event_default
(
pad
,
event
);
return
gst_pad_event_default
(
pad
,
parent
,
event
);
}
static
GstBuffer
*
...
...
ext/ogg/gstoggparse.c
View file @
e302833e
...
...
@@ -212,7 +212,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
static
void
gst_ogg_parse_dispose
(
GObject
*
object
);
static
GstStateChangeReturn
gst_ogg_parse_change_state
(
GstElement
*
element
,
GstStateChange
transition
);
static
GstFlowReturn
gst_ogg_parse_chain
(
GstPad
*
pad
,
GstBuffer
*
buffer
);
static
GstFlowReturn
gst_ogg_parse_chain
(
GstPad
*
pad
,
GstObject
*
parent
,
GstBuffer
*
buffer
);
static
void
gst_ogg_parse_base_init
(
gpointer
g_class
)
...
...
@@ -383,7 +384,7 @@ gst_ogg_parse_buffer_from_page (ogg_page * page,
* pages to output pad.
*/
static
GstFlowReturn
gst_ogg_parse_chain
(
GstPad
*
pad
,
GstBuffer
*
buffer
)
gst_ogg_parse_chain
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Buffer
*
buffer
)
{
GstOggParse
*
ogg
;
GstFlowReturn
result
=
GST_FLOW_OK
;
...
...
@@ -392,7 +393,7 @@ gst_ogg_parse_chain (GstPad * pad, GstBuffer * buffer)
GstBuffer
*
pagebuffer
;
GstClockTime
buffertimestamp
=
GST_BUFFER_TIMESTAMP
(
buffer
);
ogg
=
GST_OGG_PARSE
(
GST_OBJECT_PARENT
(
pad
)
);
ogg
=
GST_OGG_PARSE
(
parent
);
GST_LOG_OBJECT
(
ogg
,
"Chain function received buffer of size %"
G_GSIZE_FORMAT
,
...
...
ext/ogg/gstogmparse.c
View file @
e302833e
...
...
@@ -151,13 +151,15 @@ 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
gboolean
gst_ogm_parse_sink_event
(
GstPad
*
pad
,
GstEvent
*
event
);
static
gboolean
gst_ogm_parse_sink_event
(
GstPad
*
pad
,
GstObject
*
parent
,
GstEvent
*
event
);
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
GstFlowReturn
gst_ogm_parse_chain
(
GstPad
*
pad
,
GstBuffer
*
buffer
);
static
GstFlowReturn
gst_ogm_parse_chain
(
GstPad
*
pad
,
GstObject
*
parent
,
GstBuffer
*
buffer
);
static
GstStateChangeReturn
gst_ogm_parse_change_state
(
GstElement
*
element
,
GstStateChange
transition
);
...
...
@@ -837,10 +839,10 @@ buffer_too_small:
}
static
GstFlowReturn
gst_ogm_parse_chain
(
GstPad
*
pad
,
GstBuffer
*
buf
)
gst_ogm_parse_chain
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Buffer
*
buf
)
{
GstFlowReturn
ret
=
GST_FLOW_OK
;
GstOgmParse
*
ogm
=
GST_OGM_PARSE
(
GST_PAD_PARENT
(
pad
)
);
GstOgmParse
*
ogm
=
GST_OGM_PARSE
(
parent
);
guint8
*
data
;
gsize
size
;
...
...
@@ -885,9 +887,9 @@ buffer_too_small:
}
static
gboolean
gst_ogm_parse_sink_event
(
GstPad
*
pad
,
GstEvent
*
event
)
gst_ogm_parse_sink_event
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Event
*
event
)
{
GstOgmParse
*
ogm
=
GST_OGM_PARSE
(
gst_pad_get_parent
(
pad
)
);
GstOgmParse
*
ogm
=
GST_OGM_PARSE
(
parent
);
gboolean
res
;
GST_LOG_OBJECT
(
ogm
,
"processing %s event"
,
GST_EVENT_TYPE_NAME
(
event
));
...
...
@@ -899,10 +901,9 @@ gst_ogm_parse_sink_event (GstPad * pad, GstEvent * event)
res
=
TRUE
;
}
else
{
GST_OBJECT_UNLOCK
(
ogm
);
res
=
gst_pad_event_default
(
pad
,
event
);
res
=
gst_pad_event_default
(
pad
,
parent
,
event
);
}
gst_object_unref
(
ogm
);
return
res
;
}
...
...
ext/pango/gstbasetextoverlay.c
View file @
e302833e
...
...
@@ -313,21 +313,21 @@ static gboolean gst_base_text_overlay_setcaps (GstBaseTextOverlay * overlay,
static
gboolean
gst_base_text_overlay_setcaps_txt
(
GstBaseTextOverlay
*
overlay
,
GstCaps
*
caps
);
static
gboolean
gst_base_text_overlay_src_event
(
GstPad
*
pad
,
GstEvent
*
event
);
Gst
Object
*
parent
,
Gst
Event
*
event
);
static
gboolean
gst_base_text_overlay_src_query
(
GstPad
*
pad
,
GstObject
*
parent
,
GstQuery
*
query
);
static
gboolean
gst_base_text_overlay_video_event
(
GstPad
*
pad
,
GstEvent
*
event
);
Gst
Object
*
parent
,
Gst
Event
*
event
);
static
gboolean
gst_base_text_overlay_video_query
(
GstPad
*
pad
,
GstObject
*
parent
,
GstQuery
*
query
);
static
GstFlowReturn
gst_base_text_overlay_video_chain
(
GstPad
*
pad
,
GstBuffer
*
buffer
);
Gst
Object
*
parent
,
Gst
Buffer
*
buffer
);
static
gboolean
gst_base_text_overlay_text_event
(
GstPad
*
pad
,
GstEvent
*
event
);
Gst
Object
*
parent
,
Gst
Event
*
event
);
static
GstFlowReturn
gst_base_text_overlay_text_chain
(
GstPad
*
pad
,
GstBuffer
*
buffer
);
Gst
Object
*
parent
,
Gst
Buffer
*
buffer
);
static
GstPadLinkReturn
gst_base_text_overlay_text_pad_link
(
GstPad
*
pad
,
GstPad
*
peer
);
static
void
gst_base_text_overlay_text_pad_unlink
(
GstPad
*
pad
);
...
...
@@ -1022,16 +1022,13 @@ gst_base_text_overlay_src_query (GstPad * pad, GstObject * parent,
}
static
gboolean
gst_base_text_overlay_src_event
(
GstPad
*
pad
,
GstEvent
*
event
)
gst_base_text_overlay_src_event
(
GstPad
*
pad
,
GstObject
*
parent
,
GstEvent
*
event
)
{
gboolean
ret
=
FALSE
;
GstBaseTextOverlay
*
overlay
=
NULL
;
overlay
=
GST_BASE_TEXT_OVERLAY
(
gst_pad_get_parent
(
pad
));
if
(
G_UNLIKELY
(
!
overlay
))
{
gst_event_unref
(
event
);
return
FALSE
;
}
overlay
=
GST_BASE_TEXT_OVERLAY
(
parent
);
switch
(
GST_EVENT_TYPE
(
event
))
{
case
GST_EVENT_SEEK
:{
...
...
@@ -1081,7 +1078,6 @@ gst_base_text_overlay_src_event (GstPad * pad, GstEvent * event)
}
beach:
gst_object_unref
(
overlay
);
return
ret
;
}
...
...
@@ -2150,16 +2146,13 @@ gst_base_text_overlay_text_pad_unlink (GstPad * pad)
}
static
gboolean
gst_base_text_overlay_text_event
(
GstPad
*
pad
,
GstEvent
*
event
)
gst_base_text_overlay_text_event
(
GstPad
*
pad
,
GstObject
*
parent
,
GstEvent
*
event
)
{
gboolean
ret
=
FALSE
;
GstBaseTextOverlay
*
overlay
=
NULL
;
overlay
=
GST_BASE_TEXT_OVERLAY
(
gst_pad_get_parent
(
pad
));
if
(
G_UNLIKELY
(
!
overlay
))
{
gst_event_unref
(
event
);
return
FALSE
;
}
overlay
=
GST_BASE_TEXT_OVERLAY
(
parent
);
GST_LOG_OBJECT
(
pad
,
"received event %s"
,
GST_EVENT_TYPE_NAME
(
event
));
...
...
@@ -2234,26 +2227,21 @@ gst_base_text_overlay_text_event (GstPad * pad, GstEvent * event)
ret
=
TRUE
;
break
;
default:
ret
=
gst_pad_event_default
(
pad
,
event
);
ret
=
gst_pad_event_default
(
pad
,
parent
,
event
);
break
;
}
gst_object_unref
(
overlay
);
return
ret
;
}
static
gboolean
gst_base_text_overlay_video_event
(
GstPad
*
pad
,
GstEvent
*
event
)
gst_base_text_overlay_video_event
(
GstPad
*
pad
,
GstObject
*
parent
,
GstEvent
*
event
)
{
gboolean
ret
=
FALSE
;
GstBaseTextOverlay
*
overlay
=
NULL
;
overlay
=
GST_BASE_TEXT_OVERLAY
(
gst_pad_get_parent
(
pad
));
if
(
G_UNLIKELY
(
!
overlay
))
{
gst_event_unref
(
event
);
return
FALSE
;
}
overlay
=
GST_BASE_TEXT_OVERLAY
(
parent
);
GST_DEBUG_OBJECT
(
pad
,
"received event %s"
,
GST_EVENT_TYPE_NAME
(
event
));
...
...
@@ -2285,7 +2273,7 @@ gst_base_text_overlay_video_event (GstPad * pad, GstEvent * event)
(
"received non-TIME newsegment event on video input"
));
}
ret
=
gst_pad_event_default
(
pad
,
event
);
ret
=
gst_pad_event_default
(
pad
,
parent
,
event
);
break
;
}
case
GST_EVENT_EOS
:
...
...
@@ -2293,7 +2281,7 @@ gst_base_text_overlay_video_event (GstPad * pad, GstEvent * event)
GST_INFO_OBJECT
(
overlay
,
"video EOS"
);
overlay
->
video_eos
=
TRUE
;
GST_OBJECT_UNLOCK
(
overlay
);
ret
=
gst_pad_event_default
(
pad
,
event
);
ret
=
gst_pad_event_default
(
pad
,
parent
,
event
);
break
;
case
GST_EVENT_FLUSH_START
:
GST_OBJECT_LOCK
(
overlay
);
...
...
@@ -2301,7 +2289,7 @@ gst_base_text_overlay_video_event (GstPad * pad, GstEvent * event)
overlay
->
video_flushing
=
TRUE
;
GST_BASE_TEXT_OVERLAY_BROADCAST
(
overlay
);
GST_OBJECT_UNLOCK
(
overlay
);
ret
=
gst_pad_event_default
(
pad
,
event
);
ret
=
gst_pad_event_default
(
pad
,
parent
,
event
);
break
;
case
GST_EVENT_FLUSH_STOP
:
GST_OBJECT_LOCK
(
overlay
);
...
...
@@ -2310,15 +2298,13 @@ gst_base_text_overlay_video_event (GstPad * pad, GstEvent * event)
overlay
->
video_eos
=
FALSE
;
gst_segment_init
(
&
overlay
->
segment
,
GST_FORMAT_TIME
);
GST_OBJECT_UNLOCK
(
overlay
);
ret
=
gst_pad_event_default
(
pad
,
event
);
ret
=
gst_pad_event_default
(
pad
,
parent
,
event
);
break
;
default:
ret
=
gst_pad_event_default
(
pad
,
event
);
ret
=
gst_pad_event_default
(
pad
,
parent
,
event
);
break
;
}
gst_object_unref
(
overlay
);
return
ret
;
}
...
...
@@ -2369,14 +2355,15 @@ gst_base_text_overlay_pop_text (GstBaseTextOverlay * overlay)
If the buffer is in our segment we keep it internally except if another one
is already waiting here, in that case we wait that it gets kicked out */
static
GstFlowReturn
gst_base_text_overlay_text_chain
(
GstPad
*
pad
,
GstBuffer
*
buffer
)
gst_base_text_overlay_text_chain
(
GstPad
*
pad
,
GstObject
*
parent
,
GstBuffer
*
buffer
)
{
GstFlowReturn
ret
=
GST_FLOW_OK
;
GstBaseTextOverlay
*
overlay
=
NULL
;
gboolean
in_seg
=
FALSE
;
guint64
clip_start
=
0
,
clip_stop
=
0
;
overlay
=
GST_BASE_TEXT_OVERLAY
(
GST_PAD_PARENT
(
pad
)
);
overlay
=
GST_BASE_TEXT_OVERLAY
(
parent
);
GST_OBJECT_LOCK
(
overlay
);
...
...
@@ -2452,7 +2439,8 @@ beach:
}
static
GstFlowReturn
gst_base_text_overlay_video_chain
(
GstPad
*
pad
,
GstBuffer
*
buffer
)
gst_base_text_overlay_video_chain
(
GstPad
*
pad
,
GstObject
*
parent
,
GstBuffer
*
buffer
)
{
GstBaseTextOverlayClass
*
klass
;
GstBaseTextOverlay
*
overlay
;
...
...
@@ -2461,7 +2449,7 @@ gst_base_text_overlay_video_chain (GstPad * pad, GstBuffer * buffer)
guint64
start
,
stop
,
clip_start
=
0
,
clip_stop
=
0
;
gchar
*
text
=
NULL
;
overlay
=
GST_BASE_TEXT_OVERLAY
(
GST_PAD_PARENT
(
pad
)
);
overlay
=
GST_BASE_TEXT_OVERLAY
(
parent
);
klass
=
GST_BASE_TEXT_OVERLAY_GET_CLASS
(
overlay
);
if
(
!
GST_BUFFER_TIMESTAMP_IS_VALID
(
buffer
))
...
...
ext/pango/gsttextrender.c
View file @
e302833e
...
...
@@ -465,7 +465,7 @@ gst_text_renderer_image_to_argb (GstTextRender * render, guchar * pixbuf,
}
static
GstFlowReturn
gst_text_render_chain
(
GstPad
*
pad
,
GstBuffer
*
inbuf
)
gst_text_render_chain
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Buffer
*
inbuf
)
{
GstTextRender
*
render
;
GstFlowReturn
ret
;
...
...
@@ -476,7 +476,7 @@ gst_text_render_chain (GstPad * pad, GstBuffer * inbuf)
gint
n
;
gint
xpos
,
ypos
;
render
=
GST_TEXT_RENDER
(
gst_pad_get_parent
(
pad
)
);
render
=
GST_TEXT_RENDER
(
parent
);
data
=
gst_buffer_map
(
inbuf
,
&
size
,
NULL
,
GST_MAP_READ
);
...
...
@@ -574,7 +574,7 @@ done:
if
(
caps
)
gst_caps_unref
(
caps
);
gst_buffer_unref
(
inbuf
);
gst_object_unref
(
render
);
return
ret
;
}
...
...
ext/theora/gsttheoradec.c
View file @
e302833e
...
...
@@ -92,11 +92,14 @@ static void theora_dec_set_property (GObject * object, guint prop_id,
const
GValue
*
value
,
GParamSpec
*
pspec
);
static
gboolean
theora_dec_setcaps
(
GstTheoraDec
*
dec
,
GstCaps
*
caps
);
static
gboolean
theora_dec_sink_event
(
GstPad
*
pad
,
GstEvent
*
event
);
static
GstFlowReturn
theora_dec_chain
(
GstPad
*
pad
,
GstBuffer
*
buffer
);
static
gboolean
theora_dec_sink_event
(
GstPad
*
pad
,
GstObject
*
parent
,
GstEvent
*
event
);
static
GstFlowReturn
theora_dec_chain
(
GstPad
*
pad
,
GstObject
*
parent
,
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_event
(
GstPad
*
pad
,
GstObject
*
parent
,
GstEvent
*
event
);
static
gboolean
theora_dec_src_query
(
GstPad
*
pad
,
GstObject
*
parent
,
GstQuery
*
query
);
static
gboolean
theora_dec_src_convert
(
GstPad
*
pad
,
GstFormat
src_format
,
...
...
@@ -507,12 +510,12 @@ error:
}
static
gboolean
theora_dec_src_event
(
GstPad
*
pad
,
GstEvent
*
event
)
theora_dec_src_event
(
GstPad
*
pad
,
Gst
Object
*
parent
,
Gst
Event
*
event
)
{
gboolean
res
=
TRUE
;
GstTheoraDec
*
dec
;
dec
=
GST_THEORA_DEC
(
gst_pad_get_parent
(
pad
)
);
dec
=
GST_THEORA_DEC
(
parent
);
switch
(
GST_EVENT_TYPE
(
event
))
{
case
GST_EVENT_SEEK
:
...
...
@@ -579,7 +582,6 @@ theora_dec_src_event (GstPad * pad, GstEvent * event)
break
;
}
done:
gst_object_unref
(
dec
);
return
res
;
...
...
@@ -592,12 +594,12 @@ convert_error:
}
static
gboolean