Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
2a1f755e
Commit
2a1f755e
authored
Apr 10, 2020
by
Andrew Voznytsa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't add rtp jitter buffer for RTSP streams
parent
caa0e2cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
52 deletions
+3
-52
GstVideoReceiver.cc
src/VideoReceiver/GstVideoReceiver.cc
+2
-51
GstVideoReceiver.h
src/VideoReceiver/GstVideoReceiver.h
+1
-1
No files found.
src/VideoReceiver/GstVideoReceiver.cc
View file @
2a1f755e
...
...
@@ -810,7 +810,7 @@ GstVideoReceiver::_makeSource(const QString& uri)
}
}
}
else
{
g_signal_connect
(
source
,
"pad-added"
,
G_CALLBACK
(
_linkPad
WithOptionalBuffer
),
parser
);
g_signal_connect
(
source
,
"pad-added"
,
G_CALLBACK
(
_linkPad
),
parser
);
}
g_signal_connect
(
parser
,
"pad-added"
,
G_CALLBACK
(
_wrapWithGhostPad
),
nullptr
);
...
...
@@ -1401,57 +1401,8 @@ GstVideoReceiver::_wrapWithGhostPad(GstElement* element, GstPad* pad, gpointer d
}
void
GstVideoReceiver
::
_linkPad
WithOptionalBuffer
(
GstElement
*
element
,
GstPad
*
pad
,
gpointer
data
)
GstVideoReceiver
::
_linkPad
(
GstElement
*
element
,
GstPad
*
pad
,
gpointer
data
)
{
bool
isRtpPad
=
false
;
GstCaps
*
filter
;
if
((
filter
=
gst_caps_from_string
(
"application/x-rtp"
))
!=
nullptr
)
{
GstCaps
*
caps
=
gst_pad_query_caps
(
pad
,
nullptr
);
if
(
caps
!=
nullptr
)
{
if
(
!
gst_caps_is_any
(
caps
)
&&
gst_caps_can_intersect
(
caps
,
filter
))
{
isRtpPad
=
true
;
}
gst_caps_unref
(
caps
);
caps
=
nullptr
;
}
gst_caps_unref
(
filter
);
filter
=
nullptr
;
}
if
(
isRtpPad
)
{
GstElement
*
buffer
;
if
((
buffer
=
gst_element_factory_make
(
"rtpjitterbuffer"
,
nullptr
))
!=
nullptr
)
{
gst_bin_add
(
GST_BIN
(
GST_ELEMENT_PARENT
(
element
)),
buffer
);
gst_element_sync_state_with_parent
(
buffer
);
GstPad
*
sinkpad
=
gst_element_get_static_pad
(
buffer
,
"sink"
);
if
(
sinkpad
!=
nullptr
)
{
const
GstPadLinkReturn
ret
=
gst_pad_link
(
pad
,
sinkpad
);
gst_object_unref
(
sinkpad
);
sinkpad
=
nullptr
;
if
(
ret
==
GST_PAD_LINK_OK
)
{
pad
=
gst_element_get_static_pad
(
buffer
,
"src"
);
element
=
buffer
;
}
else
{
qCDebug
(
VideoReceiverLog
)
<<
"Partially failed - gst_pad_link()"
;
}
}
else
{
qCDebug
(
VideoReceiverLog
)
<<
"Partially failed - gst_element_get_static_pad()"
;
}
}
else
{
qCDebug
(
VideoReceiverLog
)
<<
"Partially failed - gst_element_factory_make('rtpjitterbuffer')"
;
}
}
gchar
*
name
;
if
((
name
=
gst_pad_get_name
(
pad
))
!=
nullptr
)
{
...
...
src/VideoReceiver/GstVideoReceiver.h
View file @
2a1f755e
...
...
@@ -123,7 +123,7 @@ protected:
static
gboolean
_onBusMessage
(
GstBus
*
bus
,
GstMessage
*
message
,
gpointer
user_data
);
static
void
_onNewPad
(
GstElement
*
element
,
GstPad
*
pad
,
gpointer
data
);
static
void
_wrapWithGhostPad
(
GstElement
*
element
,
GstPad
*
pad
,
gpointer
data
);
static
void
_linkPad
WithOptionalBuffer
(
GstElement
*
element
,
GstPad
*
pad
,
gpointer
data
);
static
void
_linkPad
(
GstElement
*
element
,
GstPad
*
pad
,
gpointer
data
);
static
gboolean
_padProbe
(
GstElement
*
element
,
GstPad
*
pad
,
gpointer
user_data
);
static
gboolean
_filterParserCaps
(
GstElement
*
bin
,
GstPad
*
pad
,
GstElement
*
element
,
GstQuery
*
query
,
gpointer
data
);
static
gboolean
_autoplugQueryCaps
(
GstElement
*
bin
,
GstPad
*
pad
,
GstElement
*
element
,
GstQuery
*
query
,
gpointer
data
);
...
...
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