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
4e49a139
Commit
4e49a139
authored
Jun 02, 2010
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vod_rtsp: C99 for loop iterator declarations
parent
19bc50ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
15 deletions
+8
-15
modules/misc/rtsp.c
modules/misc/rtsp.c
+7
-13
modules/stream_out/rtp.c
modules/stream_out/rtp.c
+1
-2
No files found.
modules/misc/rtsp.c
View file @
4e49a139
...
...
@@ -243,9 +243,8 @@ static char *SDPGenerate( const vod_media_t *, httpd_client_t *cl );
static
void
sprintf_hexa
(
char
*
s
,
uint8_t
*
p_data
,
int
i_data
)
{
static
const
char
hex
[
16
]
=
"0123456789abcdef"
;
int
i
;
for
(
i
=
0
;
i
<
i_data
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
i_data
;
i
++
)
{
s
[
2
*
i
+
0
]
=
hex
[(
p_data
[
i
]
>>
4
)
&
0xf
];
s
[
2
*
i
+
1
]
=
hex
[(
p_data
[
i
]
)
&
0xf
];
...
...
@@ -374,7 +373,6 @@ static void Close( vlc_object_t * p_this )
static
vod_media_t
*
MediaNew
(
vod_t
*
p_vod
,
const
char
*
psz_name
,
input_item_t
*
p_item
)
{
int
i
;
vod_sys_t
*
p_sys
=
p_vod
->
p_sys
;
vod_media_t
*
p_media
=
calloc
(
1
,
sizeof
(
vod_media_t
)
);
...
...
@@ -446,7 +444,7 @@ static vod_media_t *MediaNew( vod_t *p_vod, const char *psz_name,
vlc_mutex_lock
(
&
p_item
->
lock
);
msg_Dbg
(
p_vod
,
"media has %i declared ES"
,
p_item
->
i_es
);
for
(
i
=
0
;
i
<
p_item
->
i_es
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
p_item
->
i_es
;
i
++
)
{
MediaAddES
(
p_vod
,
p_media
,
p_item
->
es
[
i
]
);
}
...
...
@@ -725,10 +723,9 @@ static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt )
static
void
MediaDelES
(
vod_t
*
p_vod
,
vod_media_t
*
p_media
,
es_format_t
*
p_fmt
)
{
media_es_t
*
p_es
=
NULL
;
int
i
;
/* Find the ES */
for
(
i
=
0
;
i
<
p_media
->
i_es
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
p_media
->
i_es
;
i
++
)
{
if
(
p_media
->
es
[
i
]
->
fmt
.
i_cat
==
p_fmt
->
i_cat
&&
p_media
->
es
[
i
]
->
fmt
.
i_codec
==
p_fmt
->
i_codec
&&
...
...
@@ -887,9 +884,7 @@ static rtsp_client_t *RtspClientNew( vod_media_t *p_media, char *psz_session )
static
rtsp_client_t
*
RtspClientGet
(
vod_media_t
*
p_media
,
const
char
*
psz_session
)
{
int
i
;
for
(
i
=
0
;
psz_session
&&
i
<
p_media
->
i_rtsp
;
i
++
)
for
(
int
i
=
0
;
psz_session
&&
i
<
p_media
->
i_rtsp
;
i
++
)
{
if
(
!
strcmp
(
p_media
->
rtsp
[
i
]
->
psz_session
,
psz_session
)
)
return
p_media
->
rtsp
[
i
];
...
...
@@ -1079,7 +1074,7 @@ static int RtspCallback( httpd_callback_sys_t *p_args, httpd_client_t *cl,
case
HTTPD_MSG_PLAY
:
{
char
*
psz_output
,
ip
[
NI_MAXNUMERICHOST
];
int
i
,
i
_port_audio
=
0
,
i_port_video
=
0
;
int
i_port_audio
=
0
,
i_port_video
=
0
;
/* for now only multicast so easy */
if
(
!
psz_playnow
)
...
...
@@ -1164,7 +1159,7 @@ static int RtspCallback( httpd_callback_sys_t *p_args, httpd_client_t *cl,
p_rtsp
->
b_playing
=
true
;
/* FIXME for != 1 video and 1 audio */
for
(
i
=
0
;
i
<
p_rtsp
->
i_es
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
p_rtsp
->
i_es
;
i
++
)
{
if
(
p_rtsp
->
es
[
i
]
->
p_media_es
->
fmt
.
i_cat
==
AUDIO_ES
)
i_port_audio
=
p_rtsp
->
es
[
i
]
->
i_port
;
...
...
@@ -1305,7 +1300,6 @@ static int RtspCallbackES( httpd_callback_sys_t *p_args, httpd_client_t *cl,
const
char
*
psz_position
=
NULL
;
const
char
*
psz_cseq
=
NULL
;
int
i_cseq
=
0
;
int
i
;
if
(
answer
==
NULL
||
query
==
NULL
)
return
VLC_SUCCESS
;
...
...
@@ -1470,7 +1464,7 @@ static int RtspCallbackES( httpd_callback_sys_t *p_args, httpd_client_t *cl,
p_rtsp
=
RtspClientGet
(
p_media
,
psz_session
);
if
(
!
p_rtsp
)
break
;
for
(
i
=
0
;
i
<
p_rtsp
->
i_es
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
p_rtsp
->
i_es
;
i
++
)
{
if
(
p_rtsp
->
es
[
i
]
->
p_media_es
==
p_es
)
{
...
...
modules/stream_out/rtp.c
View file @
4e49a139
...
...
@@ -865,9 +865,8 @@ out:
static
void
sprintf_hexa
(
char
*
s
,
uint8_t
*
p_data
,
int
i_data
)
{
static
const
char
hex
[
16
]
=
"0123456789abcdef"
;
int
i
;
for
(
i
=
0
;
i
<
i_data
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
i_data
;
i
++
)
{
s
[
2
*
i
+
0
]
=
hex
[(
p_data
[
i
]
>>
4
)
&
0xf
];
s
[
2
*
i
+
1
]
=
hex
[(
p_data
[
i
]
)
&
0xf
];
...
...
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