Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
7db32193
Commit
7db32193
authored
Aug 23, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Loosen dependency of RTSP code on stream ID
- Do not refer to bogus TTL values
parent
317ce5cf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
14 deletions
+27
-14
modules/stream_out/rtp.c
modules/stream_out/rtp.c
+16
-2
modules/stream_out/rtp.h
modules/stream_out/rtp.h
+3
-0
modules/stream_out/rtsp.c
modules/stream_out/rtsp.c
+8
-12
No files found.
modules/stream_out/rtp.c
View file @
7db32193
...
@@ -849,7 +849,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
...
@@ -849,7 +849,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
char
url
[
NI_MAXHOST
+
8
];
char
url
[
NI_MAXHOST
+
8
];
/* first try to create the access out */
/* first try to create the access out */
if
(
p_sys
->
i_ttl
)
if
(
p_sys
->
i_ttl
>
0
)
{
{
snprintf
(
access
,
sizeof
(
access
),
"udp{raw,rtcp,ttl=%d}"
,
snprintf
(
access
,
sizeof
(
access
),
"udp{raw,rtcp,ttl=%d}"
,
p_sys
->
i_ttl
);
p_sys
->
i_ttl
);
...
@@ -1461,6 +1461,20 @@ static void rtp_packetize_send( sout_stream_id_t *id, block_t *out )
...
@@ -1461,6 +1461,20 @@ static void rtp_packetize_send( sout_stream_id_t *id, block_t *out )
}
}
}
}
int
rtp_add_sink
(
sout_stream_id_t
*
id
,
sout_access_out_t
*
access
)
{
vlc_mutex_lock
(
&
id
->
lock_rtsp
);
TAB_APPEND
(
id
->
i_rtsp_access
,
id
->
rtsp_access
,
access
);
vlc_mutex_unlock
(
&
id
->
lock_rtsp
);
}
void
rtp_del_sink
(
sout_stream_id_t
*
id
,
sout_access_out_t
*
access
)
{
vlc_mutex_lock
(
&
id
->
lock_rtsp
);
TAB_REMOVE
(
id
->
i_rtsp_access
,
id
->
rtsp_access
,
access
);
vlc_mutex_unlock
(
&
id
->
lock_rtsp
);
}
static
int
rtp_packetize_mpa
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
static
int
rtp_packetize_mpa
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
block_t
*
in
)
block_t
*
in
)
{
{
...
...
modules/stream_out/rtp.h
View file @
7db32193
...
@@ -34,6 +34,9 @@ void RtspClientDel( sout_stream_t *, rtsp_client_t * );
...
@@ -34,6 +34,9 @@ void RtspClientDel( sout_stream_t *, rtsp_client_t * );
char
*
SDPGenerate
(
const
sout_stream_t
*
p_stream
,
char
*
SDPGenerate
(
const
sout_stream_t
*
p_stream
,
const
char
*
psz_destination
,
vlc_bool_t
b_rtsp
);
const
char
*
psz_destination
,
vlc_bool_t
b_rtsp
);
int
rtp_add_sink
(
sout_stream_id_t
*
id
,
sout_access_out_t
*
access
);
void
rtp_del_sink
(
sout_stream_id_t
*
id
,
sout_access_out_t
*
access
);
typedef
int
(
*
pf_rtp_packetizer_t
)(
sout_stream_t
*
,
sout_stream_id_t
*
,
typedef
int
(
*
pf_rtp_packetizer_t
)(
sout_stream_t
*
,
sout_stream_id_t
*
,
block_t
*
);
block_t
*
);
...
...
modules/stream_out/rtsp.c
View file @
7db32193
...
@@ -213,9 +213,7 @@ static int RtspCallback( httpd_callback_sys_t *p_args,
...
@@ -213,9 +213,7 @@ static int RtspCallback( httpd_callback_sys_t *p_args,
}
}
if
(
i
>=
p_sys
->
i_es
)
continue
;
if
(
i
>=
p_sys
->
i_es
)
continue
;
vlc_mutex_lock
(
&
id
->
lock_rtsp
);
rtp_add_sink
(
id
,
rtsp
->
access
[
i_id
]
);
TAB_APPEND
(
id
->
i_rtsp_access
,
id
->
rtsp_access
,
rtsp
->
access
[
i_id
]
);
vlc_mutex_unlock
(
&
id
->
lock_rtsp
);
}
}
vlc_mutex_unlock
(
&
p_sys
->
lock_es
);
vlc_mutex_unlock
(
&
p_sys
->
lock_es
);
}
}
...
@@ -253,9 +251,7 @@ static int RtspCallback( httpd_callback_sys_t *p_args,
...
@@ -253,9 +251,7 @@ static int RtspCallback( httpd_callback_sys_t *p_args,
}
}
if
(
i
>=
p_sys
->
i_es
)
continue
;
if
(
i
>=
p_sys
->
i_es
)
continue
;
vlc_mutex_lock
(
&
id
->
lock_rtsp
);
rtp_del_sink
(
id
,
rtsp
->
access
[
i_id
]
);
TAB_REMOVE
(
id
->
i_rtsp_access
,
id
->
rtsp_access
,
rtsp
->
access
[
i_id
]
);
vlc_mutex_unlock
(
&
id
->
lock_rtsp
);
}
}
vlc_mutex_unlock
(
&
p_sys
->
lock_es
);
vlc_mutex_unlock
(
&
p_sys
->
lock_es
);
...
@@ -313,7 +309,7 @@ static inline const char *parameter_next( const char *str )
...
@@ -313,7 +309,7 @@ static inline const char *parameter_next( const char *str )
httpd_message_t
*
answer
,
httpd_message_t
*
query
)
httpd_message_t
*
answer
,
httpd_message_t
*
query
)
{
{
sout_stream_id_t
*
id
=
(
sout_stream_id_t
*
)
p_args
;
sout_stream_id_t
*
id
=
(
sout_stream_id_t
*
)
p_args
;
sout_stream_t
*
p_stream
=
id
->
p_stream
;
sout_stream_t
*
p_stream
=
id
d
->
p_stream
;
sout_stream_sys_t
*
p_sys
=
p_stream
->
p_sys
;
sout_stream_sys_t
*
p_sys
=
p_stream
->
p_sys
;
char
psz_session_init
[
21
];
char
psz_session_init
[
21
];
const
char
*
psz_session
;
const
char
*
psz_session
;
...
@@ -418,7 +414,7 @@ static inline const char *parameter_next( const char *str )
...
@@ -418,7 +414,7 @@ static inline const char *parameter_next( const char *str )
if
(
b_multicast
)
if
(
b_multicast
)
{
{
if
(
id
->
psz_destination
==
NULL
)
if
(
p_sys
->
psz_destination
==
NULL
)
continue
;
continue
;
answer
->
i_status
=
200
;
answer
->
i_status
=
200
;
...
@@ -426,7 +422,7 @@ static inline const char *parameter_next( const char *str )
...
@@ -426,7 +422,7 @@ static inline const char *parameter_next( const char *str )
httpd_MsgAdd
(
answer
,
"Transport"
,
httpd_MsgAdd
(
answer
,
"Transport"
,
"RTP/AVP/UDP;destination=%s;port=%d-%d;"
"RTP/AVP/UDP;destination=%s;port=%d-%d;"
"ttl=%d;mode=play"
,
"ttl=%d;mode=play"
,
id
->
psz_destination
,
id
->
i_port
,
i
d
->
i_port
+
1
,
p_sys
->
psz_destination
,
idd
->
i_port
,
id
d
->
i_port
+
1
,
(
p_sys
->
i_ttl
>
0
)
?
p_sys
->
i_ttl
:
1
);
(
p_sys
->
i_ttl
>
0
)
?
p_sys
->
i_ttl
:
1
);
}
}
else
else
...
@@ -462,7 +458,7 @@ static inline const char *parameter_next( const char *str )
...
@@ -462,7 +458,7 @@ static inline const char *parameter_next( const char *str )
continue
;
continue
;
}
}
if
(
p_sys
->
i_ttl
)
if
(
p_sys
->
i_ttl
>
0
)
snprintf
(
psz_access
,
sizeof
(
psz_access
),
snprintf
(
psz_access
,
sizeof
(
psz_access
),
"udp{raw,rtcp,ttl=%d}"
,
p_sys
->
i_ttl
);
"udp{raw,rtcp,ttl=%d}"
,
p_sys
->
i_ttl
);
else
else
...
...
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