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
ddb88bf1
Commit
ddb88bf1
authored
Aug 25, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input/stream: remove STREAM_CONTROL_ACCESS and simplify
parent
86d3a929
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
29 deletions
+23
-29
include/vlc_stream.h
include/vlc_stream.h
+4
-5
modules/access/zip/zipstream.c
modules/access/zip/zipstream.c
+0
-1
modules/demux/asf/asf.c
modules/demux/asf/asf.c
+1
-1
modules/demux/ts.c
modules/demux/ts.c
+4
-4
src/input/stream.c
src/input/stream.c
+6
-14
src/input/stream_demux.c
src/input/stream_demux.c
+3
-1
src/input/stream_memory.c
src/input/stream_memory.c
+5
-3
No files found.
include/vlc_stream.h
View file @
ddb88bf1
...
@@ -99,11 +99,6 @@ enum stream_query_e
...
@@ -99,11 +99,6 @@ enum stream_query_e
STREAM_GET_SIZE
,
/**< arg1= uint64_t * res=cannot fail (0 if no sense)*/
STREAM_GET_SIZE
,
/**< arg1= uint64_t * res=cannot fail (0 if no sense)*/
/* Special for direct access control from demuxer.
* XXX: avoid using it by all means */
STREAM_CONTROL_ACCESS
,
/* arg1= int i_access_query, args res: can fail
if access unreachable or access control answer */
/* You should update size of source if any and then update size
/* You should update size of source if any and then update size
* FIXME find a way to avoid it */
* FIXME find a way to avoid it */
STREAM_UPDATE_SIZE
,
STREAM_UPDATE_SIZE
,
...
@@ -120,6 +115,10 @@ enum stream_query_e
...
@@ -120,6 +115,10 @@ enum stream_query_e
/* XXX only data read through stream_Read/Block will be recorded */
/* XXX only data read through stream_Read/Block will be recorded */
STREAM_SET_RECORD_STATE
,
/**< arg1=bool, arg2=const char *psz_ext (if arg1 is true) res=can fail */
STREAM_SET_RECORD_STATE
,
/**< arg1=bool, arg2=const char *psz_ext (if arg1 is true) res=can fail */
STREAM_SET_PRIVATE_ID_STATE
=
0x1000
,
/* arg1= int i_private_data, bool b_selected res=can fail */
STREAM_SET_PRIVATE_ID_CA
,
/* arg1= int i_program_number, uint16_t i_vpid, uint16_t i_apid1, uint16_t i_apid2, uint16_t i_apid3, uint8_t i_length, uint8_t *p_data */
STREAM_GET_PRIVATE_ID_STATE
,
/* arg1=int i_private_data arg2=bool * res=can fail */
};
};
VLC_API
int
stream_Read
(
stream_t
*
s
,
void
*
p_read
,
int
i_read
);
VLC_API
int
stream_Read
(
stream_t
*
s
,
void
*
p_read
,
int
i_read
);
...
...
modules/access/zip/zipstream.c
View file @
ddb88bf1
...
@@ -322,7 +322,6 @@ static int Control( stream_t *s, int i_query, va_list args )
...
@@ -322,7 +322,6 @@ static int Control( stream_t *s, int i_query, va_list args )
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
case
STREAM_UPDATE_SIZE
:
case
STREAM_UPDATE_SIZE
:
case
STREAM_CONTROL_ACCESS
:
case
STREAM_CAN_SEEK
:
case
STREAM_CAN_SEEK
:
case
STREAM_CAN_FASTSEEK
:
case
STREAM_CAN_FASTSEEK
:
case
STREAM_SET_RECORD_STATE
:
case
STREAM_SET_RECORD_STATE
:
...
...
modules/demux/asf/asf.c
View file @
ddb88bf1
...
@@ -789,7 +789,7 @@ static int DemuxInit( demux_t *p_demux )
...
@@ -789,7 +789,7 @@ static int DemuxInit( demux_t *p_demux )
tk
->
p_frame
=
NULL
;
tk
->
p_frame
=
NULL
;
/* Check (in case of mms) if this track is selected (ie will receive data) */
/* Check (in case of mms) if this track is selected (ie will receive data) */
if
(
!
stream_Control
(
p_demux
->
s
,
STREAM_
CONTROL_ACCESS
,
ACCESS_
GET_PRIVATE_ID_STATE
,
if
(
!
stream_Control
(
p_demux
->
s
,
STREAM_GET_PRIVATE_ID_STATE
,
p_sp
->
i_stream_number
,
&
b_access_selected
)
&&
p_sp
->
i_stream_number
,
&
b_access_selected
)
&&
!
b_access_selected
)
!
b_access_selected
)
{
{
...
...
modules/demux/ts.c
View file @
ddb88bf1
...
@@ -1359,8 +1359,8 @@ static int SetPIDFilter( demux_t *p_demux, int i_pid, bool b_selected )
...
@@ -1359,8 +1359,8 @@ static int SetPIDFilter( demux_t *p_demux, int i_pid, bool b_selected )
if
(
!
p_sys
->
b_access_control
)
if
(
!
p_sys
->
b_access_control
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
return
stream_Control
(
p_demux
->
s
,
STREAM_
CONTROL_ACCESS
,
return
stream_Control
(
p_demux
->
s
,
STREAM_
SET_PRIVATE_ID_STATE
,
ACCESS_SET_PRIVATE_ID_STATE
,
i_pid
,
b_selected
);
i_pid
,
b_selected
);
}
}
static
void
SetPrgFilter
(
demux_t
*
p_demux
,
int
i_prg_id
,
bool
b_selected
)
static
void
SetPrgFilter
(
demux_t
*
p_demux
,
int
i_prg_id
,
bool
b_selected
)
...
@@ -4181,8 +4181,8 @@ static void PMTCallBack( void *data, dvbpsi_pmt_t *p_pmt )
...
@@ -4181,8 +4181,8 @@ static void PMTCallBack( void *data, dvbpsi_pmt_t *p_pmt )
/* Set CAM descrambling */
/* Set CAM descrambling */
if
(
!
ProgramIsSelected
(
p_demux
,
prg
->
i_number
)
if
(
!
ProgramIsSelected
(
p_demux
,
prg
->
i_number
)
||
stream_Control
(
p_demux
->
s
,
STREAM_
CONTROL_ACCESS
,
||
stream_Control
(
p_demux
->
s
,
STREAM_
SET_PRIVATE_ID_CA
,
ACCESS_SET_PRIVATE_ID_CA
,
p_pmt
)
!=
VLC_SUCCESS
)
p_pmt
)
!=
VLC_SUCCESS
)
dvbpsi_DeletePMT
(
p_pmt
);
dvbpsi_DeletePMT
(
p_pmt
);
for
(
int
i
=
0
;
i
<
i_clean
;
i
++
)
for
(
int
i
=
0
;
i
<
i_clean
;
i
++
)
...
...
src/input/stream.c
View file @
ddb88bf1
...
@@ -561,6 +561,9 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
...
@@ -561,6 +561,9 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
static_control_match
(
SET_PAUSE_STATE
);
static_control_match
(
SET_PAUSE_STATE
);
static_control_match
(
SET_TITLE
);
static_control_match
(
SET_TITLE
);
static_control_match
(
SET_SEEKPOINT
);
static_control_match
(
SET_SEEKPOINT
);
static_control_match
(
SET_PRIVATE_ID_STATE
);
static_control_match
(
SET_PRIVATE_ID_CA
);
static_control_match
(
GET_PRIVATE_ID_STATE
);
switch
(
i_query
)
switch
(
i_query
)
{
{
...
@@ -573,6 +576,9 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
...
@@ -573,6 +576,9 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
case
STREAM_GET_CONTENT_TYPE
:
case
STREAM_GET_CONTENT_TYPE
:
case
STREAM_GET_SIGNAL
:
case
STREAM_GET_SIGNAL
:
case
STREAM_SET_PAUSE_STATE
:
case
STREAM_SET_PAUSE_STATE
:
case
STREAM_SET_PRIVATE_ID_STATE
:
case
STREAM_SET_PRIVATE_ID_CA
:
case
STREAM_GET_PRIVATE_ID_STATE
:
return
access_vaControl
(
p_access
,
i_query
,
args
);
return
access_vaControl
(
p_access
,
i_query
,
args
);
case
STREAM_GET_SIZE
:
case
STREAM_GET_SIZE
:
...
@@ -609,20 +615,6 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
...
@@ -609,20 +615,6 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
}
}
}
}
case
STREAM_CONTROL_ACCESS
:
{
int
i_int
=
(
int
)
va_arg
(
args
,
int
);
if
(
i_int
!=
ACCESS_SET_PRIVATE_ID_STATE
&&
i_int
!=
ACCESS_SET_PRIVATE_ID_CA
&&
i_int
!=
ACCESS_GET_PRIVATE_ID_STATE
)
{
msg_Err
(
s
,
"Hey, what are you thinking ?"
"DON'T USE STREAM_CONTROL_ACCESS !!!"
);
return
VLC_EGENERIC
;
}
return
access_vaControl
(
p_access
,
i_int
,
args
);
}
case
STREAM_UPDATE_SIZE
:
case
STREAM_UPDATE_SIZE
:
AStreamControlUpdate
(
s
);
AStreamControlUpdate
(
s
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
...
src/input/stream_demux.c
View file @
ddb88bf1
...
@@ -296,7 +296,6 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
...
@@ -296,7 +296,6 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
case
STREAM_CONTROL_ACCESS
:
case
STREAM_GET_TITLE_INFO
:
case
STREAM_GET_TITLE_INFO
:
case
STREAM_GET_META
:
case
STREAM_GET_META
:
case
STREAM_GET_CONTENT_TYPE
:
case
STREAM_GET_CONTENT_TYPE
:
...
@@ -305,6 +304,9 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
...
@@ -305,6 +304,9 @@ static int DStreamControl( stream_t *s, int i_query, va_list args )
case
STREAM_SET_TITLE
:
case
STREAM_SET_TITLE
:
case
STREAM_SET_SEEKPOINT
:
case
STREAM_SET_SEEKPOINT
:
case
STREAM_SET_RECORD_STATE
:
case
STREAM_SET_RECORD_STATE
:
case
STREAM_SET_PRIVATE_ID_STATE
:
case
STREAM_SET_PRIVATE_ID_CA
:
case
STREAM_GET_PRIVATE_ID_STATE
:
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
default:
default:
...
...
src/input/stream_memory.c
View file @
ddb88bf1
...
@@ -133,9 +133,11 @@ static int Control( stream_t *s, int i_query, va_list args )
...
@@ -133,9 +133,11 @@ static int Control( stream_t *s, int i_query, va_list args )
case
STREAM_SET_PAUSE_STATE
:
case
STREAM_SET_PAUSE_STATE
:
break
;
/* nothing to do */
break
;
/* nothing to do */
case
STREAM_CONTROL_ACCESS
:
case
STREAM_SET_PRIVATE_ID_STATE
:
msg_Err
(
s
,
"Hey, what are you thinking ?"
case
STREAM_SET_PRIVATE_ID_CA
:
"DON'T USE STREAM_CONTROL_ACCESS !!!"
);
case
STREAM_GET_PRIVATE_ID_STATE
:
msg_Err
(
s
,
"Hey, what are you thinking? "
"DO NOT USE PRIVATE STREAM CONTROLS!!!"
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
default:
default:
...
...
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