Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Linshizhi
ffmpeg.wasm-core
Commits
8c9c5479
Commit
8c9c5479
authored
Mar 29, 2015
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtp: Add an option to set the send/receive buffer size
It gets forwarded down to UDP.
parent
3c47e7c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
rtpproto.c
libavformat/rtpproto.c
+4
-0
No files found.
libavformat/rtpproto.c
View file @
8c9c5479
...
...
@@ -51,6 +51,7 @@ typedef struct RTPContext {
struct
sockaddr_storage
last_rtp_source
,
last_rtcp_source
;
socklen_t
last_rtp_source_len
,
last_rtcp_source_len
;
int
ttl
;
int
buffer_size
;
int
rtcp_port
,
local_rtpport
,
local_rtcpport
;
int
connect
;
int
pkt_size
;
...
...
@@ -63,6 +64,7 @@ typedef struct RTPContext {
#define E AV_OPT_FLAG_ENCODING_PARAM
static
const
AVOption
options
[]
=
{
{
"ttl"
,
"Time to live (in milliseconds, multicast only)"
,
OFFSET
(
ttl
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
-
1
,
INT_MAX
,
.
flags
=
D
|
E
},
{
"buffer_size"
,
"Send/Receive buffer size (in bytes)"
,
OFFSET
(
buffer_size
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
-
1
,
INT_MAX
,
.
flags
=
D
|
E
},
{
"rtcp_port"
,
"Custom rtcp port"
,
OFFSET
(
rtcp_port
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
-
1
,
INT_MAX
,
.
flags
=
D
|
E
},
{
"local_rtpport"
,
"Local rtp port"
,
OFFSET
(
local_rtpport
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
-
1
,
INT_MAX
,
.
flags
=
D
|
E
},
{
"local_rtcpport"
,
"Local rtcp port"
,
OFFSET
(
local_rtcpport
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
-
1
,
INT_MAX
,
.
flags
=
D
|
E
},
...
...
@@ -231,6 +233,8 @@ static void build_udp_url(RTPContext *s,
url_add_option
(
buf
,
buf_size
,
"localport=%d"
,
local_port
);
if
(
s
->
ttl
>=
0
)
url_add_option
(
buf
,
buf_size
,
"ttl=%d"
,
s
->
ttl
);
if
(
s
->
buffer_size
>=
0
)
url_add_option
(
buf
,
buf_size
,
"buffer_size=%d"
,
s
->
buffer_size
);
if
(
s
->
pkt_size
>=
0
)
url_add_option
(
buf
,
buf_size
,
"pkt_size=%d"
,
s
->
pkt_size
);
if
(
s
->
connect
)
...
...
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