Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
gstreamer-experiments
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
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
Evangelos Ribeiro Tzaras
gstreamer-experiments
Commits
7b2ce2d2
Commit
7b2ce2d2
authored
Jan 19, 2021
by
Evangelos Ribeiro Tzaras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add pad-removed handler
which does not get called :(
parent
39377b9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
combined.c
combined.c
+17
-1
No files found.
combined.c
View file @
7b2ce2d2
...
...
@@ -43,7 +43,7 @@ pad_added_cb (GstElement *rtpbin, GstPad *srcpad, GstElement *depayloader)
{
GstPad
*
sinkpad
;
g_debug
(
"%s"
,
GST_PAD_NAME
(
srcpad
));
g_debug
(
"
pad added:
%s"
,
GST_PAD_NAME
(
srcpad
));
sinkpad
=
gst_element_get_static_pad
(
depayloader
,
"sink"
);
if
(
gst_pad_link
(
srcpad
,
sinkpad
)
!=
GST_PAD_LINK_OK
)
...
...
@@ -52,6 +52,21 @@ pad_added_cb (GstElement *rtpbin, GstPad *srcpad, GstElement *depayloader)
gst_object_unref
(
sinkpad
);
}
static
void
pad_removed_cb
(
GstElement
*
rtpbin
,
GstPad
*
srcpad
,
GstElement
*
depayloader
)
{
GstPad
*
sinkpad
;
g_debug
(
"pad removed: %s"
,
GST_PAD_NAME
(
srcpad
));
sinkpad
=
gst_element_get_static_pad
(
depayloader
,
"sink"
);
if
(
!
gst_pad_unlink
(
srcpad
,
sinkpad
))
g_warning
(
"Failed to unlink from %s (probably never linked)"
,
GST_PAD_NAME
(
sinkpad
));
gst_object_unref
(
sinkpad
);
}
int
main
(
int
argc
,
char
**
argv
)
{
...
...
@@ -184,6 +199,7 @@ main (int argc, char **argv)
/* need to link RTP pad to the depayloader */
g_signal_connect
(
data
.
recv_rtpbin
,
"pad-added"
,
G_CALLBACK
(
pad_added_cb
),
data
.
depayloader
);
g_signal_connect
(
data
.
recv_rtpbin
,
"pad-removed"
,
G_CALLBACK
(
pad_removed_cb
),
data
.
depayloader
);
/* out/send direction */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment