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
9e842af8
Commit
9e842af8
authored
Aug 31, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream: remove STREAM_GET_POSITION control
parent
a4ca21be
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
5 additions
and
97 deletions
+5
-97
include/vlc_stream.h
include/vlc_stream.h
+1
-2
modules/access/archive/stream.c
modules/access/archive/stream.c
+0
-1
modules/access/zip/zipstream.c
modules/access/zip/zipstream.c
+0
-7
modules/stream_filter/aribcam.c
modules/stream_filter/aribcam.c
+0
-11
modules/stream_filter/cache_block.c
modules/stream_filter/cache_block.c
+0
-4
modules/stream_filter/cache_read.c
modules/stream_filter/cache_read.c
+0
-4
modules/stream_filter/decomp.c
modules/stream_filter/decomp.c
+3
-15
modules/stream_filter/hds/hds.c
modules/stream_filter/hds/hds.c
+1
-7
modules/stream_filter/prefetch.c
modules/stream_filter/prefetch.c
+0
-3
modules/stream_filter/smooth/smooth.c
modules/stream_filter/smooth/smooth.c
+0
-3
src/input/access.c
src/input/access.c
+0
-13
src/input/stream.c
src/input/stream.c
+0
-13
src/input/stream_demux.c
src/input/stream_demux.c
+0
-9
src/input/stream_memory.c
src/input/stream_memory.c
+0
-5
No files found.
include/vlc_stream.h
View file @
9e842af8
...
@@ -83,8 +83,7 @@ enum stream_query_e
...
@@ -83,8 +83,7 @@ enum stream_query_e
STREAM_CAN_CONTROL_PACE
,
/**< arg1= bool * res=cannot fail*/
STREAM_CAN_CONTROL_PACE
,
/**< arg1= bool * res=cannot fail*/
/* */
/* */
STREAM_SET_POSITION
,
/**< arg1= uint64_t res=can fail */
STREAM_SET_POSITION
,
/**< arg1= uint64_t res=can fail */
STREAM_GET_POSITION
,
/**< arg1= uint64_t * res=cannot fail*/
STREAM_GET_SIZE
=
6
,
/**< arg1= uint64_t * res=can fail */
STREAM_GET_SIZE
,
/**< arg1= uint64_t * res=can fail */
STREAM_IS_DIRECTORY
,
/**< arg1= bool *, arg2= bool *, arg3=bool *, res=cannot fail*/
STREAM_IS_DIRECTORY
,
/**< arg1= bool *, arg2= bool *, arg3=bool *, res=cannot fail*/
/* */
/* */
...
...
modules/access/archive/stream.c
View file @
9e842af8
...
@@ -54,7 +54,6 @@ static int Control(stream_t *p_stream, int i_query, va_list args)
...
@@ -54,7 +54,6 @@ static int Control(stream_t *p_stream, int i_query, va_list args)
case
STREAM_CAN_SEEK
:
case
STREAM_CAN_SEEK
:
case
STREAM_CAN_FASTSEEK
:
case
STREAM_CAN_FASTSEEK
:
case
STREAM_GET_SIZE
:
case
STREAM_GET_SIZE
:
case
STREAM_GET_POSITION
:
case
STREAM_SET_POSITION
:
case
STREAM_SET_POSITION
:
case
STREAM_SET_RECORD_STATE
:
case
STREAM_SET_RECORD_STATE
:
case
STREAM_GET_CONTENT_TYPE
:
case
STREAM_GET_CONTENT_TYPE
:
...
...
modules/access/zip/zipstream.c
View file @
9e842af8
...
@@ -290,13 +290,6 @@ static int Control( stream_t *s, int i_query, va_list args )
...
@@ -290,13 +290,6 @@ static int Control( stream_t *s, int i_query, va_list args )
}
}
}
}
case
STREAM_GET_POSITION
:
{
uint64_t
*
pi_position
=
va_arg
(
args
,
uint64_t
*
);
*
pi_position
=
p_sys
->
i_pos
;
return
VLC_SUCCESS
;
}
case
STREAM_GET_SIZE
:
case
STREAM_GET_SIZE
:
{
{
uint64_t
*
pi_size
=
va_arg
(
args
,
uint64_t
*
);
uint64_t
*
pi_size
=
va_arg
(
args
,
uint64_t
*
);
...
...
modules/stream_filter/aribcam.c
View file @
9e842af8
...
@@ -95,7 +95,6 @@ struct stream_sys_t
...
@@ -95,7 +95,6 @@ struct stream_sys_t
block_t
*
p_list
;
block_t
*
p_list
;
}
remain
;
}
remain
;
size_t
i_pos
;
bool
b_unitsizeset
;
bool
b_unitsizeset
;
};
};
...
@@ -256,8 +255,6 @@ static ssize_t Read( stream_t *p_stream, void *p_buf, size_t i_toread )
...
@@ -256,8 +255,6 @@ static ssize_t Read( stream_t *p_stream, void *p_buf, size_t i_toread )
int
i_read
=
DecoderRead
(
p_stream
,
p_buf
,
i_toread
);
int
i_read
=
DecoderRead
(
p_stream
,
p_buf
,
i_toread
);
if
(
i_read
<
0
)
if
(
i_read
<
0
)
return
-
1
;
return
-
1
;
else
p_sys
->
i_pos
+=
i_read
;
return
i_read
;
return
i_read
;
}
}
...
@@ -269,10 +266,7 @@ static int Seek( stream_t *p_stream, uint64_t i_pos )
...
@@ -269,10 +266,7 @@ static int Seek( stream_t *p_stream, uint64_t i_pos )
{
{
int
i_ret
=
stream_Seek
(
p_stream
->
p_source
,
i_pos
);
int
i_ret
=
stream_Seek
(
p_stream
->
p_source
,
i_pos
);
if
(
i_ret
==
VLC_SUCCESS
)
if
(
i_ret
==
VLC_SUCCESS
)
{
RemainFlush
(
p_stream
->
p_sys
);
RemainFlush
(
p_stream
->
p_sys
);
p_stream
->
p_sys
->
i_pos
=
i_pos
;
}
return
i_ret
;
return
i_ret
;
}
}
...
@@ -283,9 +277,6 @@ static int Control( stream_t *p_stream, int i_query, va_list args )
...
@@ -283,9 +277,6 @@ static int Control( stream_t *p_stream, int i_query, va_list args )
{
{
switch
(
i_query
)
switch
(
i_query
)
{
{
case
STREAM_GET_POSITION
:
*
va_arg
(
args
,
uint64_t
*
)
=
p_stream
->
p_sys
->
i_pos
;
return
VLC_SUCCESS
;
case
STREAM_SET_POSITION
:
case
STREAM_SET_POSITION
:
return
Seek
(
p_stream
,
va_arg
(
args
,
uint64_t
)
);
return
Seek
(
p_stream
,
va_arg
(
args
,
uint64_t
)
);
default:
default:
...
@@ -363,8 +354,6 @@ static int Open( vlc_object_t *p_object )
...
@@ -363,8 +354,6 @@ static int Open( vlc_object_t *p_object )
goto
error
;
goto
error
;
}
}
p_sys
->
i_pos
=
stream_Tell
(
p_stream
->
p_source
);
p_stream
->
pf_read
=
Read
;
p_stream
->
pf_read
=
Read
;
p_stream
->
pf_control
=
Control
;
p_stream
->
pf_control
=
Control
;
...
...
modules/stream_filter/cache_block.c
View file @
9e842af8
...
@@ -434,10 +434,6 @@ static int AStreamControl(stream_t *s, int i_query, va_list args)
...
@@ -434,10 +434,6 @@ static int AStreamControl(stream_t *s, int i_query, va_list args)
case
STREAM_GET_PRIVATE_ID_STATE
:
case
STREAM_GET_PRIVATE_ID_STATE
:
return
stream_vaControl
(
s
->
p_source
,
i_query
,
args
);
return
stream_vaControl
(
s
->
p_source
,
i_query
,
args
);
case
STREAM_GET_POSITION
:
*
va_arg
(
args
,
uint64_t
*
)
=
sys
->
i_pos
;
break
;
case
STREAM_SET_POSITION
:
case
STREAM_SET_POSITION
:
{
{
uint64_t
offset
=
va_arg
(
args
,
uint64_t
);
uint64_t
offset
=
va_arg
(
args
,
uint64_t
);
...
...
modules/stream_filter/cache_read.c
View file @
9e842af8
...
@@ -485,10 +485,6 @@ static int AStreamControl(stream_t *s, int i_query, va_list args)
...
@@ -485,10 +485,6 @@ static int AStreamControl(stream_t *s, int i_query, va_list args)
case
STREAM_GET_PRIVATE_ID_STATE
:
case
STREAM_GET_PRIVATE_ID_STATE
:
return
stream_vaControl
(
s
->
p_source
,
i_query
,
args
);
return
stream_vaControl
(
s
->
p_source
,
i_query
,
args
);
case
STREAM_GET_POSITION
:
*
va_arg
(
args
,
uint64_t
*
)
=
sys
->
i_pos
;
break
;
case
STREAM_SET_POSITION
:
case
STREAM_SET_POSITION
:
{
{
uint64_t
offset
=
va_arg
(
args
,
uint64_t
);
uint64_t
offset
=
va_arg
(
args
,
uint64_t
);
...
...
modules/stream_filter/decomp.c
View file @
9e842af8
...
@@ -86,8 +86,6 @@ struct stream_sys_t
...
@@ -86,8 +86,6 @@ struct stream_sys_t
vlc_thread_t
thread
;
vlc_thread_t
thread
;
pid_t
pid
;
pid_t
pid
;
uint64_t
offset
;
int
read_fd
;
int
read_fd
;
bool
can_pace
;
bool
can_pace
;
bool
can_pause
;
bool
can_pause
;
...
@@ -194,7 +192,6 @@ static void *Thread (void *data)
...
@@ -194,7 +192,6 @@ static void *Thread (void *data)
static
ssize_t
Read
(
stream_t
*
stream
,
void
*
buf
,
size_t
buflen
)
static
ssize_t
Read
(
stream_t
*
stream
,
void
*
buf
,
size_t
buflen
)
{
{
stream_sys_t
*
sys
=
stream
->
p_sys
;
stream_sys_t
*
sys
=
stream
->
p_sys
;
ssize_t
ret
=
0
;
if
(
buf
==
NULL
)
/* caller skips data, get big enough peek buffer */
if
(
buf
==
NULL
)
/* caller skips data, get big enough peek buffer */
{
{
...
@@ -202,20 +199,15 @@ static ssize_t Read (stream_t *stream, void *buf, size_t buflen)
...
@@ -202,20 +199,15 @@ static ssize_t Read (stream_t *stream, void *buf, size_t buflen)
if
(
unlikely
(
buf
==
NULL
))
if
(
unlikely
(
buf
==
NULL
))
return
-
1
;
return
-
1
;
ret
=
Read
(
stream
,
buf
,
buflen
);
ssize_t
val
=
Read
(
stream
,
buf
,
buflen
);
free
(
buf
);
free
(
buf
);
return
ret
;
return
val
;
}
}
assert
((
buf
!=
NULL
)
||
(
buflen
==
0
));
assert
((
buf
!=
NULL
)
||
(
buflen
==
0
));
ssize_t
val
=
vlc_read_i11e
(
sys
->
read_fd
,
buf
,
buflen
);
ssize_t
val
=
vlc_read_i11e
(
sys
->
read_fd
,
buf
,
buflen
);
if
(
val
>
0
)
return
(
val
>=
0
)
?
val
:
0
;
{
sys
->
offset
+=
val
;
ret
+=
val
;
}
return
ret
;
}
}
/**
/**
...
@@ -237,9 +229,6 @@ static int Control (stream_t *stream, int query, va_list args)
...
@@ -237,9 +229,6 @@ static int Control (stream_t *stream, int query, va_list args)
case
STREAM_CAN_CONTROL_PACE
:
case
STREAM_CAN_CONTROL_PACE
:
*
(
va_arg
(
args
,
bool
*
))
=
p_sys
->
can_pace
;
*
(
va_arg
(
args
,
bool
*
))
=
p_sys
->
can_pace
;
break
;
break
;
case
STREAM_GET_POSITION
:
*
(
va_arg
(
args
,
uint64_t
*
))
=
p_sys
->
offset
;
break
;
case
STREAM_GET_SIZE
:
case
STREAM_GET_SIZE
:
*
(
va_arg
(
args
,
uint64_t
*
))
=
0
;
*
(
va_arg
(
args
,
uint64_t
*
))
=
0
;
break
;
break
;
...
@@ -281,7 +270,6 @@ static int Open (stream_t *stream, const char *path)
...
@@ -281,7 +270,6 @@ static int Open (stream_t *stream, const char *path)
vlc_mutex_init
(
&
p_sys
->
lock
);
vlc_mutex_init
(
&
p_sys
->
lock
);
p_sys
->
paused
=
false
;
p_sys
->
paused
=
false
;
p_sys
->
pid
=
-
1
;
p_sys
->
pid
=
-
1
;
p_sys
->
offset
=
0
;
stream_Control
(
stream
->
p_source
,
STREAM_CAN_PAUSE
,
&
p_sys
->
can_pause
);
stream_Control
(
stream
->
p_source
,
STREAM_CAN_PAUSE
,
&
p_sys
->
can_pause
);
stream_Control
(
stream
->
p_source
,
STREAM_CAN_CONTROL_PACE
,
stream_Control
(
stream
->
p_source
,
STREAM_CAN_CONTROL_PACE
,
&
p_sys
->
can_pace
);
&
p_sys
->
can_pace
);
...
...
modules/stream_filter/hds/hds.c
View file @
9e842af8
...
@@ -144,7 +144,6 @@ struct stream_sys_t
...
@@ -144,7 +144,6 @@ struct stream_sys_t
size_t
flv_header_len
;
size_t
flv_header_len
;
size_t
flv_header_bytes_sent
;
size_t
flv_header_bytes_sent
;
uint64_t
duration_seconds
;
uint64_t
duration_seconds
;
uint64_t
playback_offset
;
bool
live
;
bool
live
;
bool
closed
;
bool
closed
;
...
@@ -1847,9 +1846,7 @@ static ssize_t Read( stream_t *s, void *buffer, size_t i_read )
...
@@ -1847,9 +1846,7 @@ static ssize_t Read( stream_t *s, void *buffer, size_t i_read )
if
(
header_unfinished
(
p_sys
)
)
if
(
header_unfinished
(
p_sys
)
)
return
send_flv_header
(
stream
,
p_sys
,
buffer
,
i_read
);
return
send_flv_header
(
stream
,
p_sys
,
buffer
,
i_read
);
i_read
=
read_chunk_data
(
(
vlc_object_t
*
)
s
,
buffer
,
i_read
,
stream
);
return
read_chunk_data
(
(
vlc_object_t
*
)
s
,
buffer
,
i_read
,
stream
);
p_sys
->
playback_offset
+=
i_read
;
return
i_read
;
}
}
static
int
Control
(
stream_t
*
s
,
int
i_query
,
va_list
args
)
static
int
Control
(
stream_t
*
s
,
int
i_query
,
va_list
args
)
...
@@ -1870,9 +1867,6 @@ static int Control( stream_t *s, int i_query, va_list args )
...
@@ -1870,9 +1867,6 @@ static int Control( stream_t *s, int i_query, va_list args )
*
va_arg
(
args
,
int64_t
*
)
=
INT64_C
(
1000
)
*
*
va_arg
(
args
,
int64_t
*
)
=
INT64_C
(
1000
)
*
var_InheritInteger
(
s
,
"network-caching"
);
var_InheritInteger
(
s
,
"network-caching"
);
break
;
break
;
case
STREAM_GET_POSITION
:
*
(
va_arg
(
args
,
uint64_t
*
))
=
s
->
p_sys
->
playback_offset
;
break
;
case
STREAM_GET_SIZE
:
case
STREAM_GET_SIZE
:
*
(
va_arg
(
args
,
uint64_t
*
))
=
get_stream_size
(
s
);
*
(
va_arg
(
args
,
uint64_t
*
))
=
get_stream_size
(
s
);
break
;
break
;
...
...
modules/stream_filter/prefetch.c
View file @
9e842af8
...
@@ -338,9 +338,6 @@ static int Control(stream_t *stream, int query, va_list args)
...
@@ -338,9 +338,6 @@ static int Control(stream_t *stream, int query, va_list args)
break
;
break
;
case
STREAM_SET_POSITION
:
case
STREAM_SET_POSITION
:
return
Seek
(
stream
,
va_arg
(
args
,
uint64_t
));
return
Seek
(
stream
,
va_arg
(
args
,
uint64_t
));
case
STREAM_GET_POSITION
:
*
va_arg
(
args
,
uint64_t
*
)
=
sys
->
stream_offset
;
break
;
case
STREAM_IS_DIRECTORY
:
case
STREAM_IS_DIRECTORY
:
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
case
STREAM_GET_SIZE
:
case
STREAM_GET_SIZE
:
...
...
modules/stream_filter/smooth/smooth.c
View file @
9e842af8
...
@@ -874,9 +874,6 @@ static int Control( stream_t *s, int i_query, va_list args )
...
@@ -874,9 +874,6 @@ static int Control( stream_t *s, int i_query, va_list args )
case
STREAM_CAN_CONTROL_PACE
:
case
STREAM_CAN_CONTROL_PACE
:
*
(
va_arg
(
args
,
bool
*
))
=
true
;
*
(
va_arg
(
args
,
bool
*
))
=
true
;
break
;
break
;
case
STREAM_GET_POSITION
:
*
(
va_arg
(
args
,
uint64_t
*
))
=
p_sys
->
playback
.
boffset
;
break
;
case
STREAM_SET_POSITION
:
case
STREAM_SET_POSITION
:
{
{
uint64_t
pos
=
(
uint64_t
)
va_arg
(
args
,
uint64_t
);
uint64_t
pos
=
(
uint64_t
)
va_arg
(
args
,
uint64_t
);
...
...
src/input/access.c
View file @
9e842af8
...
@@ -311,19 +311,6 @@ static int AStreamControl(stream_t *s, int cmd, va_list args)
...
@@ -311,19 +311,6 @@ static int AStreamControl(stream_t *s, int cmd, va_list args)
break
;
break
;
}
}
case
STREAM_GET_POSITION
:
{
uint64_t
*
ppos
=
va_arg
(
args
,
uint64_t
*
);
*
ppos
=
access
->
info
.
i_pos
;
if
(
sys
->
block
!=
NULL
)
{
assert
(
sys
->
block
->
i_buffer
<=
*
ppos
);
*
ppos
-=
sys
->
block
->
i_buffer
;
}
break
;
}
case
STREAM_SET_POSITION
:
case
STREAM_SET_POSITION
:
{
{
uint64_t
pos
=
va_arg
(
args
,
uint64_t
);
uint64_t
pos
=
va_arg
(
args
,
uint64_t
);
...
...
src/input/stream.c
View file @
9e842af8
...
@@ -470,19 +470,6 @@ int stream_vaControl(stream_t *s, int cmd, va_list args)
...
@@ -470,19 +470,6 @@ int stream_vaControl(stream_t *s, int cmd, va_list args)
switch
(
cmd
)
switch
(
cmd
)
{
{
case
STREAM_GET_POSITION
:
{
uint64_t
*
ppos
=
va_arg
(
args
,
uint64_t
*
);
stream_ControlInternal
(
s
,
STREAM_GET_POSITION
,
ppos
);
if
(
priv
->
peek
!=
NULL
)
{
assert
(
priv
->
peek
->
i_buffer
<=
*
ppos
);
*
ppos
-=
priv
->
peek
->
i_buffer
;
}
return
VLC_SUCCESS
;
}
case
STREAM_SET_POSITION
:
case
STREAM_SET_POSITION
:
{
{
uint64_t
pos
=
va_arg
(
args
,
uint64_t
);
uint64_t
pos
=
va_arg
(
args
,
uint64_t
);
...
...
src/input/stream_demux.c
View file @
9e842af8
...
@@ -40,8 +40,6 @@ struct stream_sys_t
...
@@ -40,8 +40,6 @@ struct stream_sys_t
block_fifo_t
*
p_fifo
;
block_fifo_t
*
p_fifo
;
block_t
*
p_block
;
block_t
*
p_block
;
uint64_t
i_pos
;
/* Demuxer */
/* Demuxer */
char
*
psz_name
;
char
*
psz_name
;
es_out_t
*
out
;
es_out_t
*
out
;
...
@@ -85,7 +83,6 @@ stream_t *stream_DemuxNew( demux_t *p_demux, const char *psz_demux, es_out_t *ou
...
@@ -85,7 +83,6 @@ stream_t *stream_DemuxNew( demux_t *p_demux, const char *psz_demux, es_out_t *ou
return
NULL
;
return
NULL
;
}
}
p_sys
->
i_pos
=
0
;
p_sys
->
out
=
out
;
p_sys
->
out
=
out
;
p_sys
->
p_block
=
NULL
;
p_sys
->
p_block
=
NULL
;
p_sys
->
psz_name
=
strdup
(
psz_demux
);
p_sys
->
psz_name
=
strdup
(
psz_demux
);
...
@@ -208,7 +205,6 @@ static ssize_t DStreamRead( stream_t *s, void *buf, size_t len )
...
@@ -208,7 +205,6 @@ static ssize_t DStreamRead( stream_t *s, void *buf, size_t len )
sys
->
p_block
=
NULL
;
sys
->
p_block
=
NULL
;
}
}
sys
->
i_pos
+=
copy
;
return
copy
;
return
copy
;
}
}
...
@@ -231,11 +227,6 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
...
@@ -231,11 +227,6 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
*
va_arg
(
args
,
bool
*
)
=
false
;
*
va_arg
(
args
,
bool
*
)
=
false
;
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
case
STREAM_GET_POSITION
:
p_i64
=
va_arg
(
args
,
uint64_t
*
);
*
p_i64
=
p_sys
->
i_pos
;
return
VLC_SUCCESS
;
case
STREAM_GET_PTS_DELAY
:
case
STREAM_GET_PTS_DELAY
:
*
va_arg
(
args
,
int64_t
*
)
=
DEFAULT_PTS_DELAY
;
*
va_arg
(
args
,
int64_t
*
)
=
DEFAULT_PTS_DELAY
;
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
...
src/input/stream_memory.c
View file @
9e842af8
...
@@ -107,11 +107,6 @@ static int Control( stream_t *s, int i_query, va_list args )
...
@@ -107,11 +107,6 @@ static int Control( stream_t *s, int i_query, va_list args )
*
va_arg
(
args
,
bool
*
)
=
true
;
*
va_arg
(
args
,
bool
*
)
=
true
;
break
;
break
;
case
STREAM_GET_POSITION
:
pi_64
=
va_arg
(
args
,
uint64_t
*
);
*
pi_64
=
p_sys
->
i_pos
;
break
;
case
STREAM_SET_POSITION
:
case
STREAM_SET_POSITION
:
i_64
=
va_arg
(
args
,
uint64_t
);
i_64
=
va_arg
(
args
,
uint64_t
);
i_64
=
__MIN
(
i_64
,
s
->
p_sys
->
i_size
);
i_64
=
__MIN
(
i_64
,
s
->
p_sys
->
i_size
);
...
...
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