Commit 3e01621d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

access: remove ACCESS controls, use STREAM

They have been identical for a while.
parent 642a329a
......@@ -24,7 +24,7 @@
#ifndef VLC_ACCESS_H
#define VLC_ACCESS_H 1
#include <vlc_block.h>
#include <vlc_stream.h>
/**
* \defgroup access Access
......@@ -35,42 +35,6 @@
* Input byte stream modules interface
*/
enum access_query_e
{
/* capabilities */
ACCESS_CAN_SEEK, /* arg1= bool* cannot fail */
ACCESS_CAN_FASTSEEK, /* arg1= bool* cannot fail */
ACCESS_CAN_PAUSE, /* arg1= bool* cannot fail */
ACCESS_CAN_CONTROL_PACE,/* arg1= bool* cannot fail */
ACCESS_GET_SIZE=6, /* arg1= uin64_t* */
ACCESS_IS_DIRECTORY, /* arg1= bool *, res=can fail */
/* */
ACCESS_GET_PTS_DELAY = 0x101,/* arg1= int64_t* cannot fail */
ACCESS_GET_TITLE_INFO, /* arg1=input_title_t*** arg2=int* res=can fail */
ACCESS_GET_TITLE, /* arg1=unsigned * res=can fail */
ACCESS_GET_SEEKPOINT, /* arg1=unsigned * res=can fail */
/* Meta data */
ACCESS_GET_META, /* arg1= vlc_meta_t * res=can fail */
ACCESS_GET_CONTENT_TYPE,/* arg1=char **ppsz_content_type res=can fail */
ACCESS_GET_SIGNAL, /* arg1=double *pf_quality, arg2=double *pf_strength res=can fail */
/* */
ACCESS_SET_PAUSE_STATE = 0x200, /* arg1= bool can fail */
/* */
ACCESS_SET_TITLE, /* arg1= int can fail */
ACCESS_SET_SEEKPOINT, /* arg1= int can fail */
/* Special mode for access/demux communication
* XXX: avoid to use it unless you can't */
ACCESS_SET_PRIVATE_ID_STATE = 0x1000, /* arg1= int i_private_data, bool b_selected res=can fail */
ACCESS_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 */
ACCESS_GET_PRIVATE_ID_STATE, /* arg1=int i_private_data arg2=bool * res=can fail */
};
struct access_t
{
VLC_COMMON_MEMBERS
......@@ -96,7 +60,7 @@ struct access_t
int (*pf_seek) ( access_t *, uint64_t ); /* can be null if can't seek */
/* Used to retrieve and configure the access
* XXX mandatory. look at access_query_e to know what query you *have to* support */
* XXX mandatory. look at stream_query_e to know what query you *have to* support */
int (*pf_control)( access_t *, int i_query, va_list args);
/* Access has to maintain them uptodate */
......@@ -236,7 +200,7 @@ static inline int access_Control( access_t *p_access, int i_query, ... )
static inline int access_GetSize( access_t *p_access, uint64_t *size )
{
return access_Control( p_access, ACCESS_GET_SIZE, size );
return access_Control( p_access, STREAM_GET_SIZE, size );
}
/**
......
......@@ -265,11 +265,11 @@ static int Control(access_t *p_access, int i_query, va_list args)
switch (i_query)
{
case ACCESS_CAN_SEEK:
case STREAM_CAN_SEEK:
*va_arg(args, bool *)= p_sys->b_seekable;
break;
case ACCESS_CAN_FASTSEEK:
case STREAM_CAN_FASTSEEK:
if (!p_sys->b_seekable || !p_sys->p_stream)
{
*va_arg( args, bool* ) = false;
......@@ -278,19 +278,19 @@ static int Control(access_t *p_access, int i_query, va_list args)
else
return stream_vaControl( p_sys->p_stream, i_query, args );
case ACCESS_SET_PAUSE_STATE:
case STREAM_SET_PAUSE_STATE:
break;
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
case STREAM_CAN_PAUSE:
case STREAM_CAN_CONTROL_PACE:
*va_arg(args, bool *) = true;
break;
case ACCESS_GET_SIZE:
case STREAM_GET_SIZE:
*va_arg(args, uint64_t *) = archive_entry_size(p_sys->p_entry);
break;
case ACCESS_GET_PTS_DELAY:
case STREAM_GET_PTS_DELAY:
*va_arg(args, int64_t *) = DEFAULT_PTS_DELAY;
break;
......
......@@ -144,19 +144,19 @@ static int Control(access_t *access, int query, va_list args)
switch (query)
{
case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
case STREAM_CAN_SEEK:
case STREAM_CAN_FASTSEEK:
case STREAM_CAN_PAUSE:
case STREAM_CAN_CONTROL_PACE:
*va_arg(args, bool *) = true;
break;
case ACCESS_GET_SIZE:
case STREAM_GET_SIZE:
*va_arg(args, uint64_t *) = sys->attachment->i_data;
break;
case ACCESS_GET_PTS_DELAY:
case STREAM_GET_PTS_DELAY:
*va_arg(args, int64_t *) = DEFAULT_PTS_DELAY;
break;
case ACCESS_SET_PAUSE_STATE:
case STREAM_SET_PAUSE_STATE:
return VLC_SUCCESS;
default:
......
......@@ -406,8 +406,8 @@ static int Control(access_t *access, int query, va_list args)
bool *b;
switch (query) {
case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK: /* FIXME how to do that ? */
case STREAM_CAN_SEEK:
case STREAM_CAN_FASTSEEK: /* FIXME how to do that ? */
b = va_arg(args, bool *);
#if LIBAVFORMAT_VERSION_MAJOR < 54
*b = !sys->context->is_streamed;
......@@ -415,7 +415,7 @@ static int Control(access_t *access, int query, va_list args)
*b = sys->context->seekable;
#endif
return VLC_SUCCESS;
case ACCESS_CAN_PAUSE:
case STREAM_CAN_PAUSE:
b = va_arg(args, bool *);
#if LIBAVFORMAT_VERSION_MAJOR < 54
*b = sys->context->prot->url_read_pause != NULL;
......@@ -423,21 +423,21 @@ static int Control(access_t *access, int query, va_list args)
*b = sys->context->read_pause != NULL;
#endif
return VLC_SUCCESS;
case ACCESS_CAN_CONTROL_PACE:
case STREAM_CAN_CONTROL_PACE:
b = va_arg(args, bool *);
*b = true; /* FIXME */
return VLC_SUCCESS;
case ACCESS_GET_SIZE:
case STREAM_GET_SIZE:
if (sys->size < 0)
return VLC_EGENERIC;
*va_arg(args, uint64_t *) = sys->size;
return VLC_SUCCESS;
case ACCESS_GET_PTS_DELAY: {
case STREAM_GET_PTS_DELAY: {
int64_t *delay = va_arg(args, int64_t *);
*delay = INT64_C(1000) * var_InheritInteger(access, "network-caching");
return VLC_SUCCESS;
}
case ACCESS_SET_PAUSE_STATE: {
case STREAM_SET_PAUSE_STATE: {
bool is_paused = va_arg(args, int);
if (avio_pause(sys->context, is_paused)< 0)
return VLC_EGENERIC;
......
......@@ -351,21 +351,21 @@ static int Control( access_t *p_access, int i_query, va_list args )
{
switch( i_query )
{
case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
case STREAM_CAN_SEEK:
case STREAM_CAN_FASTSEEK:
case STREAM_CAN_PAUSE:
case STREAM_CAN_CONTROL_PACE:
*va_arg( args, bool* ) = true;
break;
case ACCESS_GET_SIZE:
case STREAM_GET_SIZE:
*va_arg( args, uint64_t * ) = p_access->p_sys->size;
break;
case ACCESS_GET_PTS_DELAY:
case STREAM_GET_PTS_DELAY:
*va_arg( args, int64_t * ) =
INT64_C(1000) * var_InheritInteger( p_access, "disc-caching" );
break;
case ACCESS_SET_PAUSE_STATE:
case STREAM_SET_PAUSE_STATE:
break;
default:
......
......@@ -142,7 +142,7 @@ static int Seek(access_t *access, uint64_t position)
break;
bool can_seek;
access_Control(a, ACCESS_CAN_SEEK, &can_seek);
access_Control(a, STREAM_CAN_SEEK, &can_seek);
if (!can_seek)
break;
......@@ -171,29 +171,29 @@ static int Control(access_t *access, int query, va_list args)
switch (query)
{
case ACCESS_CAN_SEEK:
case STREAM_CAN_SEEK:
*va_arg(args, bool *) = sys->can_seek;
break;
case ACCESS_CAN_FASTSEEK:
case STREAM_CAN_FASTSEEK:
*va_arg(args, bool *) = sys->can_seek_fast;
break;
case ACCESS_CAN_PAUSE:
case STREAM_CAN_PAUSE:
*va_arg(args, bool *) = sys->can_pause;
break;
case ACCESS_CAN_CONTROL_PACE:
case STREAM_CAN_CONTROL_PACE:
*va_arg(args, bool *) = sys->can_control_pace;
break;
case ACCESS_GET_SIZE:
case STREAM_GET_SIZE:
if (sys->size == UINT64_MAX)
return VLC_EGENERIC;
*va_arg(args, uint64_t *) = sys->size;
break;
case ACCESS_GET_PTS_DELAY:
case STREAM_GET_PTS_DELAY:
*va_arg(args, int64_t *) = sys->caching;
break;
case ACCESS_GET_SIGNAL:
case ACCESS_SET_PAUSE_STATE:
case STREAM_GET_SIGNAL:
case STREAM_SET_PAUSE_STATE:
return access_vaControl(sys->access, query, args);
default:
......@@ -265,13 +265,13 @@ static int Open(vlc_object_t *obj)
memcpy(e->mrl, mrl, mlen + 1);
if (sys->can_seek)
access_Control(a, ACCESS_CAN_SEEK, &sys->can_seek);
access_Control(a, STREAM_CAN_SEEK, &sys->can_seek);
if (sys->can_seek_fast)
access_Control(a, ACCESS_CAN_FASTSEEK, &sys->can_seek_fast);
access_Control(a, STREAM_CAN_FASTSEEK, &sys->can_seek_fast);
if (sys->can_pause)
access_Control(a, ACCESS_CAN_PAUSE, &sys->can_pause);
access_Control(a, STREAM_CAN_PAUSE, &sys->can_pause);
if (sys->can_control_pace)
access_Control(a, ACCESS_CAN_CONTROL_PACE, &sys->can_control_pace);
access_Control(a, STREAM_CAN_CONTROL_PACE, &sys->can_control_pace);
if (sys->size != UINT64_MAX)
{
uint64_t size;
......@@ -283,7 +283,7 @@ static int Open(vlc_object_t *obj)
}
int64_t caching;
access_Control(a, ACCESS_GET_PTS_DELAY, &caching);
access_Control(a, STREAM_GET_PTS_DELAY, &caching);
if (caching > sys->caching)
sys->caching = caching;
......
......@@ -1901,21 +1901,21 @@ static int AccessControl( access_t *p_access, int i_query, va_list args )
switch( i_query )
{
case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
case STREAM_CAN_SEEK:
case STREAM_CAN_FASTSEEK:
case STREAM_CAN_PAUSE:
case STREAM_CAN_CONTROL_PACE:
pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = false;
break;
case ACCESS_GET_PTS_DELAY:
case STREAM_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 =
INT64_C(1000) * var_InheritInteger( p_access, "live-caching" );
break;
case ACCESS_GET_CONTENT_TYPE:
case STREAM_GET_CONTENT_TYPE:
{
dshow_stream_t *p_stream = p_access->p_sys->pp_streams[0];
char **type = va_arg( args, char ** );
......
......@@ -477,29 +477,29 @@ static int Control( access_t *p_access, int i_query, va_list args )
{
switch( i_query )
{
case ACCESS_CAN_SEEK:
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
case STREAM_CAN_SEEK:
case STREAM_CAN_PAUSE:
case STREAM_CAN_CONTROL_PACE:
*va_arg( args, bool* ) = true;
break;
case ACCESS_CAN_FASTSEEK:
case STREAM_CAN_FASTSEEK:
*va_arg( args, bool* ) = false;
break;
case ACCESS_GET_SIZE:
case STREAM_GET_SIZE:
{
smb_stat st = smb_stat_fd( p_access->p_sys->p_session,
p_access->p_sys->i_fd );
*va_arg( args, uint64_t * ) = smb_stat_get( st, SMB_STAT_SIZE );
break;
}
case ACCESS_GET_PTS_DELAY:
case STREAM_GET_PTS_DELAY:
*va_arg( args, int64_t * ) = INT64_C(1000)
* var_InheritInteger( p_access, "network-caching" );
break;
case ACCESS_SET_PAUSE_STATE:
case STREAM_SET_PAUSE_STATE:
/* Nothing to do */
break;
......@@ -617,7 +617,7 @@ static int DirControl( access_t *p_access, int i_query, va_list args )
{
switch( i_query )
{
case ACCESS_IS_DIRECTORY:
case STREAM_IS_DIRECTORY:
*va_arg( args, bool * ) = p_access->pf_readdir == BrowseDirectory;
/* might loop */
break;
......
......@@ -529,25 +529,25 @@ static int Control (access_t *access, int query, va_list args)
switch (query)
{
case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
case STREAM_CAN_SEEK:
case STREAM_CAN_FASTSEEK:
case STREAM_CAN_PAUSE:
case STREAM_CAN_CONTROL_PACE:
*va_arg (args, bool *) = false;
break;
case ACCESS_GET_PTS_DELAY:
case STREAM_GET_PTS_DELAY:
{
int64_t *v = va_arg (args, int64_t *);
*v = var_InheritInteger (access, "live-caching") * INT64_C(1000);
break;
}
case ACCESS_GET_CONTENT_TYPE:
case STREAM_GET_CONTENT_TYPE:
*va_arg (args, char **) = strdup ("video/MP2T");
break;
case ACCESS_GET_SIGNAL:
case STREAM_GET_SIGNAL:
/* Fetch the signal levels only every so often to avoid stressing
* the device bus. */
if ((sys->signal_poll++))
......@@ -557,7 +557,7 @@ static int Control (access_t *access, int query, va_list args)
*va_arg (args, double *) = dvb_get_signal_strength (dev);
return VLC_SUCCESS;
case ACCESS_SET_PRIVATE_ID_STATE:
case STREAM_SET_PRIVATE_ID_STATE:
{
unsigned pid = va_arg (args, int);
bool add = va_arg (args, int);
......@@ -574,7 +574,7 @@ static int Control (access_t *access, int query, va_list args)
break;
}
case ACCESS_SET_PRIVATE_ID_CA:
case STREAM_SET_PRIVATE_ID_CA:
{
en50221_capmt_info_t *pmt = va_arg (args, en50221_capmt_info_t *);
......@@ -583,7 +583,7 @@ static int Control (access_t *access, int query, va_list args)
break;
}
case ACCESS_GET_PRIVATE_ID_STATE:
case STREAM_GET_PRIVATE_ID_STATE:
{
unsigned pid = va_arg (args, int);
bool *on = va_arg (args, bool *);
......
......@@ -270,23 +270,23 @@ static int Control( access_t *p_access, int i_query, va_list args )
switch( i_query )
{
/* */
case ACCESS_CAN_PAUSE:
case STREAM_CAN_PAUSE:
*va_arg( args, bool* ) = true;
break;
case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_CONTROL_PACE:
case STREAM_CAN_SEEK:
case STREAM_CAN_FASTSEEK:
case STREAM_CAN_CONTROL_PACE:
*va_arg( args, bool* ) = false;
break;
case ACCESS_GET_PTS_DELAY:
case STREAM_GET_PTS_DELAY:
*va_arg( args, int64_t * ) =
INT64_C(1000) * var_InheritInteger( p_access, "live-caching" );
break;
/* */
case ACCESS_SET_PAUSE_STATE:
case STREAM_SET_PAUSE_STATE:
AVCPause( p_access, p_access->p_sys->i_node );
break;
......
......@@ -388,24 +388,24 @@ static int Control( access_t *p_access, int i_query, va_list args )
switch( i_query )
{
case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
case STREAM_CAN_SEEK:
case STREAM_CAN_FASTSEEK:
case STREAM_CAN_PAUSE:
case STREAM_CAN_CONTROL_PACE:
pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = false;
break;
case ACCESS_GET_CONTENT_TYPE:
case STREAM_GET_CONTENT_TYPE:
*va_arg( args, char** ) = strdup("application/vnd.apple.mpegurl"); // m3u8
return VLC_SUCCESS;
case ACCESS_GET_PTS_DELAY:
case STREAM_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = DEFAULT_PTS_DELAY;
break;
case ACCESS_GET_SIGNAL:
case STREAM_GET_SIGNAL:
pf1 = (double*)va_arg( args, double * );
pf2 = (double*)va_arg( args, double * );
......
......@@ -280,20 +280,20 @@ static int Control(access_t *p_access, int i_query, va_list args)
access_sys_t *p_sys = (access_sys_t *) p_access->p_sys;
switch(i_query) {
case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK:
case STREAM_CAN_SEEK:
case STREAM_CAN_FASTSEEK:
pb_bool = (bool*)va_arg(args, bool*);
*pb_bool = false;
break;
case ACCESS_CAN_PAUSE:
case STREAM_CAN_PAUSE:
pb_bool = (bool*)va_arg(args, bool*);
*pb_bool = false;
break;
case ACCESS_CAN_CONTROL_PACE:
case STREAM_CAN_CONTROL_PACE:
pb_bool = (bool*)va_arg(args, bool*);
*pb_bool = false;
break;
case ACCESS_GET_PTS_DELAY:
case STREAM_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg(args, int64_t *);
*pi_64 =
INT64_C(1000) * var_InheritInteger(p_access, "live-caching");
......
......@@ -325,19 +325,19 @@ static int FileControl( access_t *p_access, int i_query, va_list args )
switch( i_query )
{
case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK:
case STREAM_CAN_SEEK:
case STREAM_CAN_FASTSEEK:
pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = (p_access->pf_seek != NoSeek);
break;
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
case STREAM_CAN_PAUSE:
case STREAM_CAN_CONTROL_PACE:
pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = p_sys->b_pace_control;
break;
case ACCESS_GET_SIZE:
case STREAM_GET_SIZE:
{
struct stat st;
......@@ -347,7 +347,7 @@ static int FileControl( access_t *p_access, int i_query, va_list args )
break;
}
case ACCESS_GET_PTS_DELAY:
case STREAM_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
if (IsRemote (p_sys->fd, p_access->psz_filepath))
*pi_64 = var_InheritInteger (p_access, "network-caching");
......@@ -356,7 +356,7 @@ static int FileControl( access_t *p_access, int i_query, va_list args )
*pi_64 *= 1000;
break;
case ACCESS_SET_PAUSE_STATE:
case STREAM_SET_PAUSE_STATE:
/* Nothing to do */
break;
......
......@@ -916,7 +916,7 @@ static int DirControl( access_t *p_access, int i_query, va_list args )
{
switch( i_query )
{
case ACCESS_IS_DIRECTORY:
case STREAM_IS_DIRECTORY:
*va_arg( args, bool * ) = true; /* might loop */
break;
default:
......@@ -966,35 +966,35 @@ static int Control( access_t *p_access, int i_query, va_list args )
switch( i_query )
{
case ACCESS_CAN_SEEK:
case STREAM_CAN_SEEK:
pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = true;
break;
case ACCESS_CAN_FASTSEEK:
case STREAM_CAN_FASTSEEK:
pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = false;
break;
case ACCESS_CAN_PAUSE:
case STREAM_CAN_PAUSE:
pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = true; /* FIXME */
break;
case ACCESS_CAN_CONTROL_PACE:
case STREAM_CAN_CONTROL_PACE:
pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = true; /* FIXME */
break;
case ACCESS_GET_SIZE:
case STREAM_GET_SIZE:
if( p_access->p_sys->size == UINT64_MAX )
return VLC_EGENERIC;
*va_arg( args, uint64_t * ) = p_access->p_sys->size;
break;
case ACCESS_GET_PTS_DELAY:
case STREAM_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = INT64_C(1000)
* var_InheritInteger( p_access, "network-caching" );
break;
case ACCESS_SET_PAUSE_STATE:
case STREAM_SET_PAUSE_STATE:
pb_bool = (bool*)va_arg( args, bool* );
if ( !pb_bool )
return Seek( p_access, p_access->p_sys->offset );
......
......@@ -678,28 +678,28 @@ static int Control( access_t *p_access, int i_query, va_list args )
switch( i_query )
{
/* */
case ACCESS_CAN_SEEK:
case STREAM_CAN_SEEK:
pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = p_sys->b_seekable;
break;
case ACCESS_CAN_FASTSEEK:
case STREAM_CAN_FASTSEEK:
pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = false;
break;
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
case STREAM_CAN_PAUSE:
case STREAM_CAN_CONTROL_PACE:
pb_bool = (bool*)va_arg( args, bool* );
*pb_bool = true;
break;
/* */
case ACCESS_GET_PTS_DELAY:
case STREAM_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = INT64_C(1000)
* var_InheritInteger( p_access, "network-caching" );
break;
case ACCESS_GET_SIZE:
case STREAM_GET_SIZE:
if( !p_sys->b_has_size )
return VLC_EGENERIC;
pi_64 = (int64_t*)va_arg( args, int64_t * );
......@@ -707,10 +707,10 @@ static int Control( access_t *p_access, int i_query, va_list args )
break;
/* */
case ACCESS_SET_PAUSE_STATE:
case STREAM_SET_PAUSE_STATE:
break;
case ACCESS_GET_CONTENT_TYPE:
case STREAM_GET_CONTENT_TYPE:
{
char **type = va_arg( args, char ** );
......
......@@ -68,20 +68,20 @@ static int FileControl(access_t *access, int query, va_list args)
switch (query)
{
case ACCESS_CAN_SEEK:
case STREAM_CAN_SEEK:
*va_arg(args, bool *) = vlc_http_file_can_seek(sys->resource);
break;
case ACCESS_CAN_FASTSEEK:
case STREAM_CAN_FASTSEEK:
*va_arg(args, bool *) = false;
break;
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
case STREAM_CAN_PAUSE:
case STREAM_CAN_CONTROL_PACE:
*va_arg(args, bool *) = true;
break;
case ACCESS_GET_SIZE:
case STREAM_GET_SIZE:
{
uintmax_t val = vlc_http_file_get_size(sys->resource);
if (val >= UINT64_MAX)
......@@ -91,16 +91,16 @@ static int FileControl(access_t *access, int query, va_list args)
break;
}
case ACCESS_GET_PTS_DELAY:
case STREAM_GET_PTS_DELAY:
*va_arg(args, int64_t *) = INT64_C(1000) *
var_InheritInteger(access, "network-caching");
break;
case ACCESS_GET_CONTENT_TYPE:
case STREAM_GET_CONTENT_TYPE:
*va_arg(args, char **) = vlc_http_file_get_type(sys->resource);
break;
case ACCESS_SET_PAUSE_STATE:
case STREAM_SET_PAUSE_STATE:
break;
default:
......@@ -132,19 +132,19 @@ static int LiveControl(access_t *access, int query, va_list args)
switch (query)
{
case ACCESS_CAN_SEEK:
case ACCESS_CAN_FASTSEEK:
case ACCESS_CAN_PAUSE:
case ACCESS_CAN_CONTROL_PACE:
case STREAM_CAN_SEEK:
case STREAM_CAN_FASTSEEK:
case STREAM_CAN_PAUSE:
case STREAM_CAN_CONTROL_PACE:
*va_arg(args, bool *) = false;
break;
case ACCESS_GET_PTS_DELAY:
case STREAM_GET_PTS_DELAY:
*va_arg(args, int64_t *) = INT64_C(1000) *
var_InheritInteger(access, "network-caching");
break;
case ACCESS_GET_CONTENT_TYPE:
case STREAM_GET_CONTENT_TYPE:
*va_arg(args, char **) = vlc_http_live_get_type(sys->resource);
break;
......
......@@ -68,30 +68,30 @@ static int Control(access_t *access, int query, va_list args)
switch (query)
{
case ACCESS_CAN_SEEK:
case STREAM_CAN_SEEK: