Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
1ed365b8
Commit
1ed365b8
authored
Apr 17, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: remove INPUT_FSTAT_NB_READS
This was only used for INPUT_UPDATE_SIZE.
parent
2e42f024
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
40 deletions
+11
-40
include/vlc_config.h
include/vlc_config.h
+0
-4
modules/access/file.c
modules/access/file.c
+1
-8
modules/access/gnomevfs.c
modules/access/gnomevfs.c
+10
-28
No files found.
include/vlc_config.h
View file @
1ed365b8
...
...
@@ -59,10 +59,6 @@
/* Used in ErrorThread */
#define INPUT_IDLE_SLEEP (CLOCK_FREQ/10)
/* Number of read() calls needed until we check the file size through
* fstat() */
#define INPUT_FSTAT_NB_READS 16
/*
* General limitations
*/
...
...
modules/access/file.c
View file @
1ed365b8
...
...
@@ -66,8 +66,6 @@
struct
access_sys_t
{
unsigned
int
i_nb_reads
;
int
fd
;
/* */
...
...
@@ -222,7 +220,6 @@ int FileOpen( vlc_object_t *p_this )
p_access
->
pf_block
=
NULL
;
p_access
->
pf_control
=
FileControl
;
p_access
->
p_sys
=
p_sys
;
p_sys
->
i_nb_reads
=
0
;
p_sys
->
fd
=
fd
;
if
(
S_ISREG
(
st
.
st_mode
)
||
S_ISBLK
(
st
.
st_mode
))
...
...
@@ -305,11 +302,7 @@ static ssize_t FileRead (access_t *p_access, uint8_t *p_buffer, size_t i_len)
p_access
->
info
.
i_pos
+=
val
;
p_access
->
info
.
b_eof
=
!
val
;
p_sys
->
i_nb_reads
++
;
if
(
!
(
p_sys
->
i_nb_reads
%
INPUT_FSTAT_NB_READS
)
||
(
p_access
->
info
.
i_pos
>
p_access
->
info
.
i_size
))
if
(
p_access
->
info
.
i_pos
>=
p_access
->
info
.
i_size
)
{
struct
stat
st
;
...
...
modules/access/gnomevfs.c
View file @
1ed365b8
...
...
@@ -63,7 +63,6 @@ static int Control( access_t *, int, va_list );
struct
access_sys_t
{
unsigned
int
i_nb_reads
;
char
*
psz_name
;
GnomeVFSHandle
*
p_handle
;
...
...
@@ -105,7 +104,6 @@ static int Open( vlc_object_t *p_this )
STANDARD_READ_ACCESS_INIT
;
p_sys
->
p_handle
=
p_handle
;
p_sys
->
i_nb_reads
=
0
;
p_sys
->
b_pace_control
=
true
;
if
(
strcmp
(
"gnomevfs"
,
p_access
->
psz_access
)
&&
...
...
@@ -288,35 +286,19 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
gnome_vfs_result_to_string
(
i_ret
)
);
}
}
else
{
p_sys
->
i_nb_reads
++
;
if
(
p_access
->
info
.
i_size
!=
0
&&
(
p_sys
->
i_nb_reads
%
INPUT_FSTAT_NB_READS
)
==
0
&&
p_sys
->
b_local
)
{
gnome_vfs_file_info_clear
(
p_sys
->
p_file_info
);
i_ret
=
gnome_vfs_get_file_info_from_handle
(
p_sys
->
p_handle
,
p_sys
->
p_file_info
,
8
);
if
(
i_ret
)
{
msg_Warn
(
p_access
,
"couldn't get file properties again (%s)"
,
gnome_vfs_result_to_string
(
i_ret
)
);
}
else
{
p_access
->
info
.
i_size
=
(
int64_t
)(
p_sys
->
p_file_info
->
size
);
}
}
}
p_access
->
info
.
i_pos
+=
(
int64_t
)
i_read_len
;
/* Some Acces (http) never return EOF and loop on the file */
if
(
p_access
->
info
.
i_pos
>
p_access
->
info
.
i_size
)
if
(
p_access
->
info
.
i_pos
>=
p_access
->
info
.
i_size
&&
p_access
->
info
.
i_size
!=
0
&&
p_sys
->
b_local
)
{
p_access
->
info
.
b_eof
=
true
;
return
0
;
gnome_vfs_file_info_clear
(
p_sys
->
p_file_info
);
i_ret
=
gnome_vfs_get_file_info_from_handle
(
p_sys
->
p_handle
,
p_sys
->
p_file_info
,
8
);
if
(
i_ret
)
msg_Warn
(
p_access
,
"couldn't get file properties again (%s)"
,
gnome_vfs_result_to_string
(
i_ret
)
);
else
p_access
->
info
.
i_size
=
(
int64_t
)(
p_sys
->
p_file_info
->
size
);
}
return
(
int
)
i_read_len
;
}
...
...
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