Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
videolan
vlc-gpu
Commits
c752af77
Commit
c752af77
authored
Oct 06, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RTP: support build without libvlc_srtp
parent
410a3de5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
10 deletions
+26
-10
modules/access/rtp/Modules.am
modules/access/rtp/Modules.am
+8
-6
modules/access/rtp/input.c
modules/access/rtp/input.c
+5
-2
modules/access/rtp/rtp.c
modules/access/rtp/rtp.c
+11
-1
modules/access/rtp/rtp.h
modules/access/rtp/rtp.h
+2
-0
modules/access/rtp/xiph.c
modules/access/rtp/xiph.c
+0
-1
No files found.
modules/access/rtp/Modules.am
View file @
c752af77
if HAVE_GCRYPT
# RTP plugin
libvlc_LTLIBRARIES += \
librtp_plugin.la
...
...
@@ -7,9 +6,12 @@ librtp_plugin_la_SOURCES = \
rtp.h \
input.c \
session.c
librtp_plugin_la_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/libs/srtp
librtp_plugin_la_LIBADD = $(AM_LIBADD) \
$(top_builddir)/libs/srtp/libvlc_srtp.la
librtp_plugin_la_DEPENDENCIES = \
$(top_builddir)/libs/srtp/libvlc_srtp.la
librtp_plugin_la_CFLAGS = $(AM_CFLAGS)
librtp_plugin_la_LIBADD = $(AM_LIBADD)
librtp_plugin_la_DEPENDENCIES =
if HAVE_GCRYPT
librtp_plugin_la_CFLAGS += -DHAVE_SRTP -I$(top_srcdir)/libs/srtp
librtp_plugin_la_LIBADD += $(top_builddir)/libs/srtp/libvlc_srtp.la
librtp_plugin_la_DEPENDENCIES += $(top_builddir)/libs/srtp/libvlc_srtp.la
endif
modules/access/rtp/input.c
View file @
c752af77
...
...
@@ -35,7 +35,9 @@
#endif
#include "rtp.h"
#include <srtp.h>
#ifdef HAVE_SRTP
# include <srtp.h>
#endif
static
bool
fd_dead
(
int
fd
)
{
...
...
@@ -139,7 +141,7 @@ static block_t *rtp_recv (demux_t *demux)
const
uint8_t
ptype
=
rtp_ptype
(
block
);
if
(
ptype
>=
72
&&
ptype
<=
76
)
continue
;
/* Muxed RTCP, ignore for now */
#ifdef HAVE_SRTP
if
(
p_sys
->
srtp
)
{
size_t
len
=
block
->
i_buffer
;
...
...
@@ -155,6 +157,7 @@ static block_t *rtp_recv (demux_t *demux)
}
block
->
i_buffer
=
len
;
}
#endif
return
block
;
/* success! */
}
return
NULL
;
...
...
modules/access/rtp/rtp.c
View file @
c752af77
...
...
@@ -37,7 +37,9 @@
#include <vlc_codecs.h>
#include "rtp.h"
#include <srtp.h>
#ifdef HAVE_SRTP
# include <srtp.h>
#endif
#define RTP_CACHING_TEXT N_("RTP de-jitter buffer length (msec)")
#define RTP_CACHING_LONGTEXT N_( \
...
...
@@ -97,10 +99,12 @@ vlc_module_begin ()
RTCP_PORT_LONGTEXT
,
false
)
change_integer_range
(
0
,
65535
)
change_safe
()
#ifdef HAVE_SRTP
add_string
(
"srtp-key"
,
""
,
NULL
,
SRTP_KEY_TEXT
,
SRTP_KEY_LONGTEXT
,
false
)
add_string
(
"srtp-salt"
,
""
,
NULL
,
SRTP_SALT_TEXT
,
SRTP_SALT_LONGTEXT
,
false
)
#endif
add_integer
(
"rtp-max-src"
,
1
,
NULL
,
RTP_MAX_SRC_TEXT
,
RTP_MAX_SRC_LONGTEXT
,
true
)
change_integer_range
(
1
,
255
)
...
...
@@ -236,7 +240,9 @@ static int Open (vlc_object_t *obj)
}
vlc_mutex_init
(
&
p_sys
->
lock
);
#ifdef HAVE_SRTP
p_sys
->
srtp
=
NULL
;
#endif
p_sys
->
fd
=
fd
;
p_sys
->
rtcp_fd
=
rtcp_fd
;
p_sys
->
caching
=
var_CreateGetInteger
(
obj
,
"rtp-caching"
);
...
...
@@ -254,6 +260,7 @@ static int Open (vlc_object_t *obj)
if
(
p_sys
->
session
==
NULL
)
goto
error
;
#ifdef HAVE_SRTP
char
*
key
=
var_CreateGetNonEmptyString
(
demux
,
"srtp-key"
);
if
(
key
)
{
...
...
@@ -275,6 +282,7 @@ static int Open (vlc_object_t *obj)
goto
error
;
}
}
#endif
if
(
vlc_clone
(
&
p_sys
->
thread
,
rtp_thread
,
demux
,
VLC_THREAD_PRIORITY_INPUT
))
...
...
@@ -303,8 +311,10 @@ static void Close (vlc_object_t *obj)
}
vlc_mutex_destroy
(
&
p_sys
->
lock
);
#ifdef HAVE_SRTP
if
(
p_sys
->
srtp
)
srtp_destroy
(
p_sys
->
srtp
);
#endif
if
(
p_sys
->
session
)
rtp_session_destroy
(
demux
,
p_sys
->
session
);
if
(
p_sys
->
rtcp_fd
!=
-
1
)
...
...
modules/access/rtp/rtp.h
View file @
c752af77
...
...
@@ -52,7 +52,9 @@ void *rtp_thread (void *data);
struct
demux_sys_t
{
rtp_session_t
*
session
;
#ifdef HAVE_SRTP
struct
srtp_session_t
*
srtp
;
#endif
int
fd
;
int
rtcp_fd
;
vlc_thread_t
thread
;
...
...
modules/access/rtp/xiph.c
View file @
c752af77
...
...
@@ -38,7 +38,6 @@
#include <vlc_codecs.h>
#include "rtp.h"
#include <srtp.h>
/* PT=dynamic
* vorbis: Xiph Vorbis audio (draft-ietf-avt-rtp-vorbis-09, RFC FIXME)
...
...
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