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
* FIXME find a way to avoid it */
STREAM_UPDATE_SIZE,
/* 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_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 );
return VLC_EGENERIC;
case STREAM_UPDATE_SIZE:
- case STREAM_CONTROL_ACCESS:
case STREAM_CAN_SEEK:
case STREAM_CAN_FASTSEEK:
case STREAM_SET_RECORD_STATE:
tk->p_frame = NULL;
/* 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 ) &&
!b_access_selected )
{
if( !p_sys->b_access_control )
return VLC_EGENERIC;
- return stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
- ACCESS_SET_PRIVATE_ID_STATE, i_pid, b_selected );
+ return stream_Control( p_demux->s, STREAM_SET_PRIVATE_ID_STATE,
+ i_pid, b_selected );
}
static void SetPrgFilter( demux_t *p_demux, int i_prg_id, bool b_selected )
/* Set CAM descrambling */
if( !ProgramIsSelected( p_demux, prg->i_number )
- || stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
- ACCESS_SET_PRIVATE_ID_CA, p_pmt ) != VLC_SUCCESS )
+ || stream_Control( p_demux->s, STREAM_SET_PRIVATE_ID_CA,
+ p_pmt ) != VLC_SUCCESS )
dvbpsi_DeletePMT( p_pmt );
for( int i = 0; i < i_clean; i++ )
static_control_match(SET_PAUSE_STATE);
static_control_match(SET_TITLE);
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 )
{
case STREAM_GET_CONTENT_TYPE:
case STREAM_GET_SIGNAL:
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 );
case STREAM_GET_SIZE:
}
}
- 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:
AStreamControlUpdate( s );
return VLC_SUCCESS;
return VLC_SUCCESS;
}
- case STREAM_CONTROL_ACCESS:
case STREAM_GET_TITLE_INFO:
case STREAM_GET_META:
case STREAM_GET_CONTENT_TYPE:
case STREAM_SET_TITLE:
case STREAM_SET_SEEKPOINT:
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;
default:
case STREAM_SET_PAUSE_STATE:
break; /* nothing to do */
- case STREAM_CONTROL_ACCESS:
- msg_Err( s, "Hey, what are you thinking ?"
- "DON'T USE STREAM_CONTROL_ACCESS !!!" );
+ case STREAM_SET_PRIVATE_ID_STATE:
+ case STREAM_SET_PRIVATE_ID_CA:
+ case STREAM_GET_PRIVATE_ID_STATE:
+ msg_Err( s, "Hey, what are you thinking? "
+ "DO NOT USE PRIVATE STREAM CONTROLS!!!" );
return VLC_EGENERIC;
default: