Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
81400d7e
Commit
81400d7e
authored
Sep 25, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtp: fix Opus packetization and use zero copy
Opus cannot be fragmented, there must be one frame per RTP packet.
parent
1f5d476c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
modules/stream_out/rtpfmt.c
modules/stream_out/rtpfmt.c
+13
-1
No files found.
modules/stream_out/rtpfmt.c
View file @
81400d7e
...
...
@@ -39,6 +39,7 @@
static
int
rtp_packetize_mpa
(
sout_stream_id_sys_t
*
,
block_t
*
);
static
int
rtp_packetize_mpv
(
sout_stream_id_sys_t
*
,
block_t
*
);
static
int
rtp_packetize_ac3
(
sout_stream_id_sys_t
*
,
block_t
*
);
static
int
rtp_packetize_simple
(
sout_stream_id_sys_t
*
,
block_t
*
);
static
int
rtp_packetize_split
(
sout_stream_id_sys_t
*
,
block_t
*
);
static
int
rtp_packetize_swab
(
sout_stream_id_sys_t
*
,
block_t
*
);
static
int
rtp_packetize_mp4a
(
sout_stream_id_sys_t
*
,
block_t
*
);
...
...
@@ -512,7 +513,7 @@ int rtp_get_fmt( vlc_object_t *obj, es_format_t *p_fmt, const char *mux,
return
VLC_EGENERIC
;
}
rtp_fmt
->
ptname
=
"opus"
;
rtp_fmt
->
pf_packetize
=
rtp_packetize_s
plit
;
rtp_fmt
->
pf_packetize
=
rtp_packetize_s
imple
;
rtp_fmt
->
clock_rate
=
48000
;
rtp_fmt
->
channels
=
2
;
if
(
p_fmt
->
audio
.
i_channels
==
2
)
...
...
@@ -848,6 +849,17 @@ static int rtp_packetize_ac3( sout_stream_id_sys_t *id, block_t *in )
return
VLC_SUCCESS
;
}
static
int
rtp_packetize_simple
(
sout_stream_id_sys_t
*
id
,
block_t
*
block
)
{
block
=
block_Realloc
(
block
,
12
,
block
->
i_buffer
);
if
(
unlikely
(
block
==
NULL
))
return
VLC_ENOMEM
;
rtp_packetize_common
(
id
,
block
,
true
,
block
->
i_pts
);
rtp_packetize_send
(
id
,
block
);
return
VLC_SUCCESS
;
}
static
int
rtp_packetize_split
(
sout_stream_id_sys_t
*
id
,
block_t
*
in
)
{
int
i_max
=
rtp_mtu
(
id
);
/* payload max in one packet */
...
...
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