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
abe93638
Commit
abe93638
authored
May 18, 2011
by
Martin Storsjö
Committed by
Michael Niedermayer
May 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sdp: Allow passing AVFormatContext flags to the SDP generation
parent
c78a85ad
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
internal.h
libavformat/internal.h
+2
-1
movenc.c
libavformat/movenc.c
+1
-1
sdp.c
libavformat/sdp.c
+6
-5
No files found.
libavformat/internal.h
View file @
abe93638
...
...
@@ -116,10 +116,11 @@ int ff_url_join(char *str, int size, const char *proto,
* @param dest_type the destination address type, may be NULL
* @param port the destination port of the media stream, 0 if unknown
* @param ttl the time to live of the stream, 0 if not multicast
* @param flags the AVFormatContext->flags, modifying the generated SDP
*/
void
ff_sdp_write_media
(
char
*
buff
,
int
size
,
AVCodecContext
*
c
,
const
char
*
dest_addr
,
const
char
*
dest_type
,
int
port
,
int
ttl
);
int
port
,
int
ttl
,
int
flags
);
/**
* Write a packet to another muxer than the one the user originally
...
...
libavformat/movenc.c
View file @
abe93638
...
...
@@ -1324,7 +1324,7 @@ static int mov_write_udta_sdp(AVIOContext *pb, AVCodecContext *ctx, int index)
char
buf
[
1000
]
=
""
;
int
len
;
ff_sdp_write_media
(
buf
,
sizeof
(
buf
),
ctx
,
NULL
,
NULL
,
0
,
0
);
ff_sdp_write_media
(
buf
,
sizeof
(
buf
),
ctx
,
NULL
,
NULL
,
0
,
0
,
0
);
av_strlcatf
(
buf
,
sizeof
(
buf
),
"a=control:streamid=%d
\r\n
"
,
index
);
len
=
strlen
(
buf
);
...
...
libavformat/sdp.c
View file @
abe93638
...
...
@@ -299,7 +299,7 @@ xiph_fail:
return
NULL
;
}
static
char
*
sdp_write_media_attributes
(
char
*
buff
,
int
size
,
AVCodecContext
*
c
,
int
payload_type
)
static
char
*
sdp_write_media_attributes
(
char
*
buff
,
int
size
,
AVCodecContext
*
c
,
int
payload_type
,
int
flags
)
{
char
*
config
=
NULL
;
...
...
@@ -448,7 +448,7 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
return
buff
;
}
void
ff_sdp_write_media
(
char
*
buff
,
int
size
,
AVCodecContext
*
c
,
const
char
*
dest_addr
,
const
char
*
dest_type
,
int
port
,
int
ttl
)
void
ff_sdp_write_media
(
char
*
buff
,
int
size
,
AVCodecContext
*
c
,
const
char
*
dest_addr
,
const
char
*
dest_type
,
int
port
,
int
ttl
,
int
flags
)
{
const
char
*
type
;
int
payload_type
;
...
...
@@ -471,7 +471,7 @@ void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *des
av_strlcatf
(
buff
,
size
,
"b=AS:%d
\r\n
"
,
c
->
bit_rate
/
1000
);
}
sdp_write_media_attributes
(
buff
,
size
,
c
,
payload_type
);
sdp_write_media_attributes
(
buff
,
size
,
c
,
payload_type
,
flags
);
}
int
av_sdp_create
(
AVFormatContext
*
ac
[],
int
n_files
,
char
*
buf
,
int
size
)
...
...
@@ -520,7 +520,8 @@ int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size)
for
(
j
=
0
;
j
<
ac
[
i
]
->
nb_streams
;
j
++
)
{
ff_sdp_write_media
(
buf
,
size
,
ac
[
i
]
->
streams
[
j
]
->
codec
,
dst
[
0
]
?
dst
:
NULL
,
dst_type
,
(
port
>
0
)
?
port
+
j
*
2
:
0
,
ttl
);
dst_type
,
(
port
>
0
)
?
port
+
j
*
2
:
0
,
ttl
,
ac
[
i
]
->
flags
);
if
(
port
<=
0
)
{
av_strlcatf
(
buf
,
size
,
"a=control:streamid=%d
\r\n
"
,
i
+
j
);
...
...
@@ -536,7 +537,7 @@ int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size)
return
AVERROR
(
ENOSYS
);
}
void
ff_sdp_write_media
(
char
*
buff
,
int
size
,
AVCodecContext
*
c
,
const
char
*
dest_addr
,
const
char
*
dest_type
,
int
port
,
int
ttl
)
void
ff_sdp_write_media
(
char
*
buff
,
int
size
,
AVCodecContext
*
c
,
const
char
*
dest_addr
,
const
char
*
dest_type
,
int
port
,
int
ttl
,
int
flags
)
{
}
#endif
...
...
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