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
6f087f54
Commit
6f087f54
authored
Feb 26, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove net_ReadNonBlock(),
it was merely a slower (and buggier) recv() nowadays.
parent
5a605a9f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
11 deletions
+7
-11
include/vlc_network.h
include/vlc_network.h
+0
-3
modules/stream_out/switcher.c
modules/stream_out/switcher.c
+1
-2
src/stream_output/sap.c
src/stream_output/sap.c
+6
-6
No files found.
include/vlc_network.h
View file @
6f087f54
...
@@ -127,9 +127,6 @@ struct virtual_socket_t
...
@@ -127,9 +127,6 @@ struct virtual_socket_t
#define net_Read(a,b,c,d,e,f) __net_Read(VLC_OBJECT(a),b,c,d,e,f)
#define net_Read(a,b,c,d,e,f) __net_Read(VLC_OBJECT(a),b,c,d,e,f)
VLC_EXPORT
(
ssize_t
,
__net_Read
,
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
uint8_t
*
p_data
,
size_t
i_data
,
vlc_bool_t
b_retry
)
);
VLC_EXPORT
(
ssize_t
,
__net_Read
,
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
uint8_t
*
p_data
,
size_t
i_data
,
vlc_bool_t
b_retry
)
);
#define net_ReadNonBlock(a,b,c,d,e) __net_ReadNonBlock(VLC_OBJECT(a),b,c,d,e)
VLC_EXPORT
(
ssize_t
,
__net_ReadNonBlock
,
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
uint8_t
*
p_data
,
size_t
i_data
)
);
#define net_Select(a,b,c,d,e) __net_Select(VLC_OBJECT(a),b,c,d,e)
#define net_Select(a,b,c,d,e) __net_Select(VLC_OBJECT(a),b,c,d,e)
VLC_EXPORT
(
ssize_t
,
__net_Select
,
(
vlc_object_t
*
p_this
,
const
int
*
pi_fd
,
int
i_fd
,
uint8_t
*
p_data
,
size_t
i_data
)
);
VLC_EXPORT
(
ssize_t
,
__net_Select
,
(
vlc_object_t
*
p_this
,
const
int
*
pi_fd
,
int
i_fd
,
uint8_t
*
p_data
,
size_t
i_data
)
);
...
...
modules/stream_out/switcher.c
View file @
6f087f54
...
@@ -650,8 +650,7 @@ static void NetCommand( sout_stream_t *p_stream )
...
@@ -650,8 +650,7 @@ static void NetCommand( sout_stream_t *p_stream )
{
{
sout_stream_sys_t
*
p_sys
=
p_stream
->
p_sys
;
sout_stream_sys_t
*
p_sys
=
p_stream
->
p_sys
;
char
psz_buffer
[
11
];
char
psz_buffer
[
11
];
int
i_len
=
net_ReadNonBlock
(
p_stream
,
p_sys
->
i_fd
,
NULL
,
(
uint8_t
*
)
&
psz_buffer
[
0
],
int
i_len
=
recv
(
p_sys
->
i_fd
,
psz_buffer
,
sizeof
(
psz_buffer
)
-
1
,
0
);
sizeof
(
psz_buffer
)
-
1
);
if
(
i_len
>
0
)
if
(
i_len
>
0
)
{
{
...
...
src/stream_output/sap.c
View file @
6f087f54
...
@@ -638,9 +638,8 @@ static char *SDPGenerate( sap_handler_t *p_sap,
...
@@ -638,9 +638,8 @@ static char *SDPGenerate( sap_handler_t *p_sap,
static
int
CalculateRate
(
sap_handler_t
*
p_sap
,
sap_address_t
*
p_address
)
static
int
CalculateRate
(
sap_handler_t
*
p_sap
,
sap_address_t
*
p_address
)
{
{
int
i_read
;
uint8_t
buffer
[
SAP_MAX_BUFFER
];
uint8_t
buffer
[
SAP_MAX_BUFFER
];
in
t
i_tot
=
0
;
ssize_
t
i_tot
=
0
;
mtime_t
i_temp
;
mtime_t
i_temp
;
int
i_rate
;
int
i_rate
;
...
@@ -649,13 +648,14 @@ static int CalculateRate( sap_handler_t *p_sap, sap_address_t *p_address )
...
@@ -649,13 +648,14 @@ static int CalculateRate( sap_handler_t *p_sap, sap_address_t *p_address )
p_address
->
t1
=
mdate
();
p_address
->
t1
=
mdate
();
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
do
for
(;;)
{
{
/* Might be too slow if we have huge data */
/* Might be too slow if we have huge data */
i_read
=
net_ReadNonBlock
(
p_sap
,
p_address
->
i_rfd
,
NULL
,
buffer
,
ssize_t
i_read
=
recv
(
p_address
->
i_rfd
,
buffer
,
SAP_MAX_BUFFER
,
0
);
SAP_MAX_BUFFER
);
if
(
i_read
==
-
1
)
break
;
i_tot
+=
i_read
;
i_tot
+=
i_read
;
}
while
(
i_read
>
0
);
}
i_temp
=
mdate
();
i_temp
=
mdate
();
...
...
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