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
3ce51320
Commit
3ce51320
authored
May 01, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide va_list variant to MakeSDPMedia
parent
60db8724
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
20 deletions
+23
-20
src/stream_output/sdp.c
src/stream_output/sdp.c
+8
-18
src/stream_output/stream_output.h
src/stream_output/stream_output.h
+15
-2
No files found.
src/stream_output/sdp.c
View file @
3ce51320
...
@@ -4,11 +4,9 @@
...
@@ -4,11 +4,9 @@
* Copyright © 2007 Rémi Denis-Courmont
* Copyright © 2007 Rémi Denis-Courmont
* $Id$
* $Id$
*
*
* Authors: Rémi Denis-Courmont
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU
Lesser
General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2
.1
of the License, or
* (at your option) any later version.
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* This program is distributed in the hope that it will be useful,
...
@@ -153,8 +151,9 @@ char *StartSDP (const char *name, const char *description, const char *url,
...
@@ -153,8 +151,9 @@ char *StartSDP (const char *name, const char *description, const char *url,
}
}
char
*
MakeSDPMedia
(
const
char
*
type
,
int
dport
,
const
char
*
protocol
,
char
*
vMakeSDPMedia
(
const
char
*
type
,
int
dport
,
const
char
*
protocol
,
unsigned
pt
,
const
char
*
rtpmap
,
const
char
*
fmtpfmt
,
...)
unsigned
pt
,
const
char
*
rtpmap
,
const
char
*
fmtpfmt
,
va_list
ap
)
{
{
char
*
sdp_media
=
NULL
;
char
*
sdp_media
=
NULL
;
...
@@ -176,18 +175,9 @@ char *MakeSDPMedia (const char *type, int dport, const char *protocol,
...
@@ -176,18 +175,9 @@ char *MakeSDPMedia (const char *type, int dport, const char *protocol,
/* Format parameters */
/* Format parameters */
char
*
fmtp
=
NULL
;
char
*
fmtp
=
NULL
;
if
(
fmtpfmt
!=
NULL
)
if
((
fmtpfmt
!=
NULL
)
{
&&
(
vasprintf
(
&
fmtp
,
fmtpfmt
,
ap
)
==
-
1
))
va_list
ap
;
return
NULL
;
va_start
(
ap
,
fmtpfmt
);
if
(
vasprintf
(
&
fmtp
,
fmtpfmt
,
ap
)
==
-
1
)
fmtpfmt
=
NULL
;
va_end
(
ap
);
if
(
fmtp
==
NULL
)
return
NULL
;
}
char
sdp_fmtp
[
fmtp
?
(
sizeof
(
"a=fmtp:123 *
\r\n
"
)
+
strlen
(
fmtp
))
:
1
];
char
sdp_fmtp
[
fmtp
?
(
sizeof
(
"a=fmtp:123 *
\r\n
"
)
+
strlen
(
fmtp
))
:
1
];
if
(
fmtp
!=
NULL
)
if
(
fmtp
!=
NULL
)
...
...
src/stream_output/stream_output.h
View file @
3ce51320
...
@@ -112,10 +112,23 @@ int announce_UnRegister( announce_handler_t *p_announce,
...
@@ -112,10 +112,23 @@ int announce_UnRegister( announce_handler_t *p_announce,
sap_handler_t
*
announce_SAPHandlerCreate
(
announce_handler_t
*
p_announce
);
sap_handler_t
*
announce_SAPHandlerCreate
(
announce_handler_t
*
p_announce
);
void
announce_SAPHandlerDestroy
(
sap_handler_t
*
p_sap
);
void
announce_SAPHandlerDestroy
(
sap_handler_t
*
p_sap
);
#include <stdarg.h>
char
*
StartSDP
(
const
char
*
name
,
const
char
*
description
,
const
char
*
url
,
char
*
StartSDP
(
const
char
*
name
,
const
char
*
description
,
const
char
*
url
,
const
char
*
email
,
const
char
*
phone
,
vlc_bool_t
ssm
,
const
char
*
email
,
const
char
*
phone
,
vlc_bool_t
ssm
,
const
struct
sockaddr
*
orig
,
socklen_t
origlen
,
const
struct
sockaddr
*
orig
,
socklen_t
origlen
,
const
struct
sockaddr
*
addr
,
socklen_t
addrlen
);
const
struct
sockaddr
*
addr
,
socklen_t
addrlen
);
char
*
vMakeSDPMedia
(
const
char
*
type
,
int
dport
,
const
char
*
protocol
,
unsigned
pt
,
const
char
*
rtpmap
,
const
char
*
fmtp
,
va_list
ap
);
static
inline
char
*
MakeSDPMedia
(
const
char
*
type
,
int
dport
,
const
char
*
protocol
,
char
*
MakeSDPMedia
(
const
char
*
type
,
int
dport
,
const
char
*
protocol
,
unsigned
pt
,
const
char
*
rtpmap
,
const
char
*
fmtp
,
...);
unsigned
pt
,
const
char
*
rtpmap
,
const
char
*
fmtpfmt
,
...)
{
va_list
ap
;
char
*
ret
;
va_start
(
ap
,
fmtpfmt
);
ret
=
vMakeSDPMedia
(
type
,
dport
,
protocol
,
pt
,
rtpmap
,
fmtpfmt
,
ap
);
va_end
(
ap
);
return
ret
;
}
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