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
dbc537ae
Commit
dbc537ae
authored
Oct 04, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to make 20ms packets for L8 and G.711
(rather than as big packets as possible)
parent
037b7ad2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
modules/stream_out/rtp.c
modules/stream_out/rtp.c
+8
-11
No files found.
modules/stream_out/rtp.c
View file @
dbc537ae
...
...
@@ -1827,16 +1827,14 @@ static int rtp_packetize_l16( sout_stream_t *p_stream, sout_stream_id_t *id,
static
int
rtp_packetize_l8
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
block_t
*
in
)
{
int
i_max
=
id
->
i_mtu
-
12
;
/* payload max in one packet */
int
i_count
=
(
in
->
i_buffer
+
i_max
-
1
)
/
i_max
;
/* ptime=20ms */
size_t
i_plen
=
id
->
i_channels
*
(
(
id
->
i_clock_rate
+
49
)
/
50
);
uint8_t
*
p_data
=
in
->
p_buffer
;
int
i_data
=
in
->
i_buffer
;
int
i_packet
=
0
;
size_t
i_data
=
in
->
i_buffer
;
while
(
i_data
>
0
)
for
(
unsigned
i_packet
=
0
;
i_data
>
0
;
i_packet
++
)
{
int
i_payload
=
(
__MIN
(
i_max
,
i_data
)
/
2
)
*
2
;
int
i_payload
=
__MIN
(
i_plen
,
i_data
)
;
block_t
*
out
=
block_New
(
p_stream
,
12
+
i_payload
);
/* rtp common header */
...
...
@@ -1844,15 +1842,14 @@ static int rtp_packetize_l8( sout_stream_t *p_stream, sout_stream_id_t *id,
(
in
->
i_pts
>
0
?
in
->
i_pts
:
in
->
i_dts
)
);
memcpy
(
&
out
->
p_buffer
[
12
],
p_data
,
i_payload
);
out
->
i_buffer
=
12
+
i_payload
;
out
->
i_dts
=
in
->
i_dts
+
i_packet
*
in
->
i_length
/
i_count
;
out
->
i_length
=
i
n
->
i_length
/
i_count
;
out
->
i_buffer
=
12
+
i_payload
;
out
->
i_dts
=
in
->
i_dts
+
i_packet
*
20000
;
out
->
i_length
=
i
_payload
*
20000
/
i_plen
;
rtp_packetize_send
(
id
,
out
);
p_data
+=
i_payload
;
i_data
-=
i_payload
;
i_packet
++
;
}
return
VLC_SUCCESS
;
...
...
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