Remove access_t

This commit is contained in:
Rémi Denis-Courmont 2017-07-23 08:43:16 +03:00
parent f5261f8eb9
commit e4ba64d291
49 changed files with 431 additions and 432 deletions

View File

@ -8,9 +8,9 @@ match a specific expected behavior:
=== pf_readdir prototype
int (*pf_readdir)( access_t *p_access, input_item_node_t *p_node );
int (*pf_readdir)( stream_t *p_access, input_item_node_t *p_node );
* p_access: This is a pointer to the access_t object that you are
* p_access: This is a pointer to the stream_t object that you are
calling pf_readdir on. It CANNOT be NULL.
* p_node: A pointer on an input_item_node_t that you must provide and be
responsible for. In particular, you have the responsibility to free it

View File

@ -40,7 +40,7 @@
*
* In case of redirection, the access open function should clean up (as in
* normal failure case), store the heap-allocated redirection URL in
* access_t.psz_url, and return this value.
* stream_t.psz_url, and return this value.
*/
#define VLC_ACCESS_REDIRECT VLC_ETIMEOUT
@ -54,7 +54,7 @@
* \param mrl media resource location to read
* \return a new access object on success, NULL on failure
*/
VLC_API access_t *vlc_access_NewMRL(vlc_object_t *obj, const char *mrl);
VLC_API stream_t *vlc_access_NewMRL(vlc_object_t *obj, const char *mrl);
/**
* \defgroup access_helper Access Helpers
@ -64,7 +64,7 @@ VLC_API access_t *vlc_access_NewMRL(vlc_object_t *obj, const char *mrl);
/**
* Default pf_control callback for directory accesses.
*/
VLC_API int access_vaDirectoryControlHelper( access_t *p_access, int i_query, va_list args );
VLC_API int access_vaDirectoryControlHelper( stream_t *p_access, int i_query, va_list args );
#define ACCESS_SET_CALLBACKS( read, block, control, seek ) \
do { \
@ -97,7 +97,7 @@ struct access_fsdir
* \param p_node node that will be used to add items
*/
VLC_API void access_fsdir_init(struct access_fsdir *p_fsdir,
access_t *p_access, input_item_node_t *p_node);
stream_t *p_access, input_item_node_t *p_node);
/**
* Finish adding items to the node

View File

@ -212,7 +212,6 @@ typedef struct config_category_t config_category_t;
typedef struct input_thread_t input_thread_t;
typedef struct input_item_t input_item_t;
typedef struct input_item_node_t input_item_node_t;
typedef struct stream_t access_t;
typedef struct access_sys_t access_sys_t;
typedef struct stream_t stream_t;
typedef struct stream_sys_t stream_sys_t;

View File

@ -54,9 +54,9 @@ vlc_module_end()
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static ssize_t Read(access_t *, void *, size_t);
static int Seek(access_t *, uint64_t);
static int Control(access_t *, int, va_list);
static ssize_t Read(stream_t *, void *, size_t);
static int Seek(stream_t *, uint64_t);
static int Control(stream_t *, int, va_list);
struct access_sys_t
{
@ -67,7 +67,7 @@ struct access_sys_t
/* */
static int Open(vlc_object_t *object)
{
access_t *access = (access_t *)object;
stream_t *access = (stream_t *)object;
input_thread_t *input = access->p_input;
if (!input)
@ -101,14 +101,14 @@ static int Open(vlc_object_t *object)
/* */
static void Close(vlc_object_t *object)
{
access_t *access = (access_t *)object;
stream_t *access = (stream_t *)object;
access_sys_t *sys = access->p_sys;
vlc_input_attachment_Delete(sys->attachment);
}
/* */
static ssize_t Read(access_t *access, void *buffer, size_t size)
static ssize_t Read(stream_t *access, void *buffer, size_t size)
{
access_sys_t *sys = access->p_sys;
input_attachment_t *a = sys->attachment;
@ -123,7 +123,7 @@ static ssize_t Read(access_t *access, void *buffer, size_t size)
}
/* */
static int Seek(access_t *access, uint64_t position)
static int Seek(stream_t *access, uint64_t position)
{
access_sys_t *sys = access->p_sys;
input_attachment_t *a = sys->attachment;
@ -136,7 +136,7 @@ static int Seek(access_t *access, uint64_t position)
}
/* */
static int Control(access_t *access, int query, va_list args)
static int Control(stream_t *access, int query, va_list args)
{
access_sys_t *sys = access->p_sys;

View File

@ -48,9 +48,9 @@ vlc_module_end()
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static ssize_t Read (access_t *, void *, size_t);
static int Seek (access_t *, uint64_t);
static int Control(access_t *, int, va_list);
static ssize_t Read (stream_t *, void *, size_t);
static int Seek (stream_t *, uint64_t);
static int Control(stream_t *, int, va_list);
static ssize_t Write(sout_access_out_t *, block_t *);
static int OutControl(sout_access_out_t *, int, va_list);
static int OutSeek (sout_access_out_t *, off_t);
@ -82,7 +82,7 @@ struct sout_access_out_sys_t {
int OpenAvio(vlc_object_t *object)
{
access_t *access = (access_t*)object;
stream_t *access = (stream_t*)object;
access_sys_t *sys = vlc_malloc(object, sizeof(*sys));
if (!sys)
return VLC_ENOMEM;
@ -197,7 +197,7 @@ int OutOpenAvio(vlc_object_t *object)
void CloseAvio(vlc_object_t *object)
{
access_t *access = (access_t*)object;
stream_t *access = (stream_t*)object;
access_sys_t *sys = access->p_sys;
avio_close(sys->context);
@ -211,7 +211,7 @@ void OutCloseAvio(vlc_object_t *object)
avio_close(sys->context);
}
static ssize_t Read(access_t *access, void *data, size_t size)
static ssize_t Read(stream_t *access, void *data, size_t size)
{
access_sys_t *sys = access->p_sys;
@ -255,7 +255,7 @@ error:
return i_write;
}
static int Seek(access_t *access, uint64_t position)
static int Seek(stream_t *access, uint64_t position)
{
access_sys_t *sys = access->p_sys;
int ret;
@ -305,7 +305,7 @@ static int OutControl(sout_access_out_t *p_access, int i_query, va_list args)
return VLC_SUCCESS;
}
static int Control(access_t *access, int query, va_list args)
static int Control(stream_t *access, int query, va_list args)
{
access_sys_t *sys = access->p_sys;
bool *b;

View File

@ -401,7 +401,7 @@ error:
}
#endif /* HAVE_LIBCDDB */
static void AccessGetMeta(access_t *access, vlc_meta_t *meta)
static void AccessGetMeta(stream_t *access, vlc_meta_t *meta)
{
access_sys_t *sys = access->p_sys;
const char *str;
@ -466,7 +466,7 @@ static void AccessGetMeta(access_t *access, vlc_meta_t *meta)
#endif
}
static int ReadDir(access_t *access, input_item_node_t *node)
static int ReadDir(stream_t *access, input_item_node_t *node)
{
access_sys_t *sys = access->p_sys;
@ -594,7 +594,7 @@ static int ReadDir(access_t *access, input_item_node_t *node)
return VLC_SUCCESS;
}
static int AccessControl(access_t *access, int query, va_list args)
static int AccessControl(stream_t *access, int query, va_list args)
{
if (query == STREAM_GET_META)
{
@ -606,7 +606,7 @@ static int AccessControl(access_t *access, int query, va_list args)
static int AccessOpen(vlc_object_t *obj)
{
access_t *access = (access_t *)obj;
stream_t *access = (stream_t *)obj;
unsigned track;
vcddev_t *dev = DiscOpen(obj, access->psz_location, access->psz_filepath,
@ -676,7 +676,7 @@ error:
static void AccessClose(vlc_object_t *obj)
{
access_t *access = (access_t *)obj;
stream_t *access = (stream_t *)obj;
access_sys_t *sys = access->p_sys;
for (int i = 0; i < sys->cdtextc; i++)

View File

@ -37,7 +37,7 @@ struct access_entry
struct access_sys_t
{
access_t *access;
stream_t *access;
struct access_entry *next;
struct access_entry *first;
bool can_seek;
@ -48,10 +48,10 @@ struct access_sys_t
int64_t caching;
};
static access_t *GetAccess(access_t *access)
static stream_t *GetAccess(stream_t *access)
{
access_sys_t *sys = access->p_sys;
access_t *a = sys->access;
stream_t *a = sys->access;
if (a != NULL)
{
@ -74,9 +74,9 @@ static access_t *GetAccess(access_t *access)
return a;
}
static ssize_t Read(access_t *access, void *buf, size_t len)
static ssize_t Read(stream_t *access, void *buf, size_t len)
{
access_t *a = GetAccess(access);
stream_t *a = GetAccess(access);
if (a == NULL)
return 0;
@ -89,9 +89,9 @@ static ssize_t Read(access_t *access, void *buf, size_t len)
return vlc_stream_ReadPartial(a, buf, len);
}
static block_t *Block(access_t *access, bool *restrict eof)
static block_t *Block(stream_t *access, bool *restrict eof)
{
access_t *a = GetAccess(access);
stream_t *a = GetAccess(access);
if (a == NULL)
{
*eof = true;
@ -101,7 +101,7 @@ static block_t *Block(access_t *access, bool *restrict eof)
return vlc_stream_ReadBlock(a);
}
static int Seek(access_t *access, uint64_t position)
static int Seek(stream_t *access, uint64_t position)
{
access_sys_t *sys = access->p_sys;
@ -115,7 +115,7 @@ static int Seek(access_t *access, uint64_t position)
for (uint64_t offset = 0;;)
{
access_t *a = GetAccess(access);
stream_t *a = GetAccess(access);
if (a == NULL)
break;
@ -143,7 +143,7 @@ static int Seek(access_t *access, uint64_t position)
return VLC_EGENERIC;
}
static int Control(access_t *access, int query, va_list args)
static int Control(stream_t *access, int query, va_list args)
{
access_sys_t *sys = access->p_sys;
@ -182,7 +182,7 @@ static int Control(access_t *access, int query, va_list args)
static int Open(vlc_object_t *obj)
{
access_t *access = (access_t *)obj;
stream_t *access = (stream_t *)obj;
char *list = var_CreateGetNonEmptyString(access, "concat-list");
if (list == NULL)
@ -218,7 +218,7 @@ static int Open(vlc_object_t *obj)
if (unlikely(e == NULL))
break;
access_t *a = vlc_access_NewMRL(obj, mrl);
stream_t *a = vlc_access_NewMRL(obj, mrl);
if (a == NULL)
{
msg_Err(access, "cannot concatenate location %s", mrl);
@ -285,7 +285,7 @@ static int Open(vlc_object_t *obj)
static void Close(vlc_object_t *obj)
{
access_t *access = (access_t *)obj;
stream_t *access = (stream_t *)obj;
access_sys_t *sys = access->p_sys;
if (sys->access != NULL)

View File

@ -51,7 +51,7 @@ struct access_sys_t
/*****************************************************************************
* DirInit: Init the directory access with a directory stream
*****************************************************************************/
int DirInit (access_t *access, DIR *dir)
int DirInit (stream_t *access, DIR *dir)
{
access_sys_t *sys = vlc_malloc(VLC_OBJECT(access), sizeof (*sys));
if (unlikely(sys == NULL))
@ -85,7 +85,7 @@ error:
*****************************************************************************/
int DirOpen (vlc_object_t *obj)
{
access_t *access = (access_t *)obj;
stream_t *access = (stream_t *)obj;
if (access->psz_filepath == NULL)
return VLC_EGENERIC;
@ -102,14 +102,14 @@ int DirOpen (vlc_object_t *obj)
*****************************************************************************/
void DirClose(vlc_object_t *obj)
{
access_t *access = (access_t *)obj;
stream_t *access = (stream_t *)obj;
access_sys_t *sys = access->p_sys;
free(sys->base_uri);
closedir(sys->dir);
}
int DirRead (access_t *access, input_item_node_t *node)
int DirRead (stream_t *access, input_item_node_t *node)
{
access_sys_t *sys = access->p_sys;
const char *entry;

View File

@ -60,8 +60,8 @@
/*****************************************************************************
* Access: local prototypes
*****************************************************************************/
static block_t *ReadCompressed( access_t *, bool * );
static int AccessControl ( access_t *, int, va_list );
static block_t *ReadCompressed( stream_t *, bool * );
static int AccessControl ( stream_t *, int, va_list );
static int Demux ( demux_t * );
static int DemuxControl( demux_t *, int, va_list );
@ -781,7 +781,7 @@ static int DemuxOpen( vlc_object_t *p_this )
*****************************************************************************/
static int AccessOpen( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
access_sys_t *p_sys;
p_access->p_sys = p_sys = (access_sys_t*)calloc( 1, sizeof( access_sys_t ) );
@ -839,7 +839,7 @@ static void CommonClose( vlc_object_t *p_this, access_sys_t *p_sys )
*****************************************************************************/
static void AccessClose( vlc_object_t *p_this )
{
access_t *p_access = (access_t *)p_this;
stream_t *p_access = (stream_t *)p_this;
access_sys_t *p_sys = (access_sys_t *)p_access->p_sys;
ComContext ctx( COINIT_MULTITHREADED );
@ -1759,7 +1759,7 @@ static size_t EnumDeviceCaps( vlc_object_t *p_this, IBaseFilter *p_filter,
/*****************************************************************************
* ReadCompressed: reads compressed (MPEG/DV) data from the device.
*****************************************************************************/
static block_t *ReadCompressed( access_t *p_access, bool *eof )
static block_t *ReadCompressed( stream_t *p_access, bool *eof )
{
ComContext ctx( COINIT_MULTITHREADED );
@ -1908,7 +1908,7 @@ static int Demux( demux_t *p_demux )
/*****************************************************************************
* AccessControl:
*****************************************************************************/
static int AccessControl( access_t *p_access, int i_query, va_list args )
static int AccessControl( stream_t *p_access, int i_query, va_list args )
{
access_sys_t *sys = (access_sys_t *)p_access->p_sys;
bool *pb_bool;

View File

@ -90,15 +90,15 @@ vlc_module_end ()
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static ssize_t Read( access_t *, void *, size_t );
static int Seek( access_t *, uint64_t );
static int Control( access_t *, int, va_list );
static int BrowserInit( access_t *p_access );
static ssize_t Read( stream_t *, void *, size_t );
static int Seek( stream_t *, uint64_t );
static int Control( stream_t *, int, va_list );
static int BrowserInit( stream_t *p_access );
static int get_address( access_t *p_access );
static int login( access_t *p_access );
static bool get_path( access_t *p_access );
static int add_item( access_t *p_access, struct access_fsdir *p_fsdir,
static int get_address( stream_t *p_access );
static int login( stream_t *p_access );
static bool get_path( stream_t *p_access );
static int add_item( stream_t *p_access, struct access_fsdir *p_fsdir,
const char *psz_name, int i_type );
struct access_sys_t
@ -123,7 +123,7 @@ struct access_sys_t
*****************************************************************************/
static int Open( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
access_sys_t *p_sys;
smb_stat st;
@ -196,7 +196,7 @@ static int Open( vlc_object_t *p_this )
*****************************************************************************/
static void Close( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
access_sys_t *p_sys = p_access->p_sys;
if( p_sys->p_ns )
@ -216,7 +216,7 @@ static void Close( vlc_object_t *p_this )
*****************************************************************************/
/* Returns VLC_EGENERIC if it wasn't able to get an ip address to connect to */
static int get_address( access_t *p_access )
static int get_address( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
@ -267,7 +267,7 @@ static int get_address( access_t *p_access )
return VLC_SUCCESS;
}
static int smb_connect( access_t *p_access, const char *psz_login,
static int smb_connect( stream_t *p_access, const char *psz_login,
const char *psz_password, const char *psz_domain)
{
access_sys_t *p_sys = p_access->p_sys;
@ -295,7 +295,7 @@ static int smb_connect( access_t *p_access, const char *psz_login,
return VLC_EGENERIC;
}
static bool smb_has_invalid_creds( access_t *p_access )
static bool smb_has_invalid_creds( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
uint32_t i_nt_status = smb_session_get_nt_status( p_sys->p_session );
@ -305,7 +305,7 @@ static bool smb_has_invalid_creds( access_t *p_access )
/* Performs login with existing credentials and ask the user for new ones on
failure */
static int login( access_t *p_access )
static int login( stream_t *p_access )
{
int i_ret = VLC_EGENERIC;
access_sys_t *p_sys = p_access->p_sys;
@ -389,7 +389,7 @@ static void backslash_path( char *psz_path )
}
/* Get the share and filepath from uri (also replace all / by \ in url.psz_path) */
static bool get_path( access_t *p_access )
static bool get_path( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
char *iter;
@ -437,7 +437,7 @@ static bool get_path( access_t *p_access )
/*****************************************************************************
* Seek: try to go at the right place
*****************************************************************************/
static int Seek( access_t *p_access, uint64_t i_pos )
static int Seek( stream_t *p_access, uint64_t i_pos )
{
access_sys_t *p_sys = p_access->p_sys;
@ -455,7 +455,7 @@ static int Seek( access_t *p_access, uint64_t i_pos )
/*****************************************************************************
* Read:
*****************************************************************************/
static ssize_t Read( access_t *p_access, void *p_buffer, size_t i_len )
static ssize_t Read( stream_t *p_access, void *p_buffer, size_t i_len )
{
access_sys_t *p_sys = p_access->p_sys;
int i_read;
@ -473,7 +473,7 @@ static ssize_t Read( access_t *p_access, void *p_buffer, size_t i_len )
/*****************************************************************************
* Control:
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
static int Control( stream_t *p_access, int i_query, va_list args )
{
access_sys_t *p_sys = p_access->p_sys;
@ -511,7 +511,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
return VLC_SUCCESS;
}
static int add_item( access_t *p_access, struct access_fsdir *p_fsdir,
static int add_item( stream_t *p_access, struct access_fsdir *p_fsdir,
const char *psz_name, int i_type )
{
char *psz_uri;
@ -532,7 +532,7 @@ static int add_item( access_t *p_access, struct access_fsdir *p_fsdir,
return access_fsdir_additem( p_fsdir, psz_uri, psz_name, i_type, ITEM_NET );
}
static int BrowseShare( access_t *p_access, input_item_node_t *p_node )
static int BrowseShare( stream_t *p_access, input_item_node_t *p_node )
{
access_sys_t *p_sys = p_access->p_sys;
smb_share_list shares;
@ -563,7 +563,7 @@ static int BrowseShare( access_t *p_access, input_item_node_t *p_node )
return i_ret;
}
static int BrowseDirectory( access_t *p_access, input_item_node_t *p_node )
static int BrowseDirectory( stream_t *p_access, input_item_node_t *p_node )
{
access_sys_t *p_sys = p_access->p_sys;
smb_stat_list files;
@ -614,7 +614,7 @@ static int BrowseDirectory( access_t *p_access, input_item_node_t *p_node )
return i_ret;
}
static int BrowserInit( access_t *p_access )
static int BrowserInit( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;

View File

@ -431,8 +431,8 @@ struct access_sys_t
tuner_setup_t pf_setup;
};
static block_t *Read (access_t *, bool *);
static int Control (access_t *, int, va_list);
static block_t *Read (stream_t *, bool *);
static int Control (stream_t *, int, va_list);
static dtv_delivery_t GuessSystem (const char *, dvb_device_t *);
static dtv_delivery_t GetDeliveryByScheme(const char *psz_scheme);
static int Tune (vlc_object_t *, dvb_device_t *, tuner_setup_t, uint64_t);
@ -442,7 +442,7 @@ tuner_setup_t dtv_get_delivery_tuner_setup( dtv_delivery_t d );
static int Open (vlc_object_t *obj)
{
access_t *access = (access_t *)obj;
stream_t *access = (stream_t *)obj;
access_sys_t *sys = malloc (sizeof (*sys));
if (unlikely(sys == NULL))
return VLC_ENOMEM;
@ -492,14 +492,14 @@ error:
static void Close (vlc_object_t *obj)
{
access_t *access = (access_t *)obj;
stream_t *access = (stream_t *)obj;
access_sys_t *sys = access->p_sys;
dvb_close (sys->dev);
free (sys);
}
static block_t *Read (access_t *access, bool *restrict eof)
static block_t *Read (stream_t *access, bool *restrict eof)
{
#define BUFSIZE (20*188)
block_t *block = block_Alloc (BUFSIZE);
@ -522,7 +522,7 @@ static block_t *Read (access_t *access, bool *restrict eof)
return block;
}
static int Control (access_t *access, int query, va_list args)
static int Control (stream_t *access, int query, va_list args)
{
access_sys_t *sys = access->p_sys;
dvb_device_t *dev = sys->dev;

View File

@ -50,8 +50,8 @@
*****************************************************************************/
static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
static block_t *Block( access_t *, bool * );
static int Control( access_t *, int, va_list );
static block_t *Block( stream_t *, bool * );
static int Control( stream_t *, int, va_list );
vlc_module_begin ()
set_description( N_("Digital Video (Firewire/ieee1394) input") )
@ -66,7 +66,7 @@ vlc_module_end ()
typedef struct
{
vlc_thread_t thread;
access_t *p_access;
stream_t *p_access;
vlc_mutex_t lock;
block_t *p_frame;
block_t **pp_last;
@ -80,17 +80,17 @@ Raw1394Handler(raw1394handle_t, unsigned char *,
unsigned char, unsigned char, unsigned int,
unsigned int);
static int Raw1394GetNumPorts( access_t *p_access );
static raw1394handle_t Raw1394Open( access_t *, int );
static int Raw1394GetNumPorts( stream_t *p_access );
static raw1394handle_t Raw1394Open( stream_t *, int );
static void Raw1394Close( raw1394handle_t );
static int DiscoverAVC( access_t *, int *, uint64_t );
static raw1394handle_t AVCOpen( access_t *, int );
static void AVCClose( access_t * );
static int DiscoverAVC( stream_t *, int *, uint64_t );
static raw1394handle_t AVCOpen( stream_t *, int );
static void AVCClose( stream_t * );
static int AVCResetHandler( raw1394handle_t, unsigned int );
static int AVCPlay( access_t *, int );
static int AVCPause( access_t *, int );
static int AVCStop( access_t *, int );
static int AVCPlay( stream_t *, int );
static int AVCPause( stream_t *, int );
static int AVCStop( stream_t *, int );
struct access_sys_t
{
@ -118,7 +118,7 @@ struct access_sys_t
*****************************************************************************/
static int Open( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
access_sys_t *p_sys;
struct raw1394_portinfo port_inf[ 16 ];
@ -227,7 +227,7 @@ static int Open( vlc_object_t *p_this )
*****************************************************************************/
static void Close( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
access_sys_t *p_sys = p_access->p_sys;
if( p_sys->p_ev )
@ -264,7 +264,7 @@ static void Close( vlc_object_t *p_this )
/*****************************************************************************
* Control:
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
static int Control( stream_t *p_access, int i_query, va_list args )
{
access_sys_t *sys = p_access->p_sys;
@ -298,7 +298,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
return VLC_SUCCESS;
}
static block_t *Block( access_t *p_access, bool *restrict eof )
static block_t *Block( stream_t *p_access, bool *restrict eof )
{
access_sys_t *p_sys = p_access->p_sys;
block_t *p_block = NULL;
@ -324,7 +324,7 @@ static void Raw1394EventThreadCleanup( void *obj )
static void* Raw1394EventThread( void *obj )
{
event_thread_t *p_ev = (event_thread_t *)obj;
access_t *p_access = (access_t *) p_ev->p_access;
stream_t *p_access = (stream_t *) p_ev->p_access;
access_sys_t *p_sys = (access_sys_t *) p_access->p_sys;
int result = 0;
int canc = vlc_savecancel();
@ -360,13 +360,13 @@ Raw1394Handler(raw1394handle_t handle, unsigned char *data,
unsigned char tag, unsigned char sy, unsigned int cycle,
unsigned int dropped)
{
access_t *p_access = NULL;
stream_t *p_access = NULL;
access_sys_t *p_sys = NULL;
block_t *p_block = NULL;
VLC_UNUSED(channel); VLC_UNUSED(tag);
VLC_UNUSED(sy); VLC_UNUSED(cycle); VLC_UNUSED(dropped);
p_access = (access_t *) raw1394_get_userdata( handle );
p_access = (stream_t *) raw1394_get_userdata( handle );
if( !p_access ) return 0;
p_sys = p_access->p_sys;
@ -441,7 +441,7 @@ Raw1394Handler(raw1394handle_t handle, unsigned char *data,
* Copyright by Arne Schirmacher <dvgrab@schirmacher.de>
* Dan Dennedy <dan@dennedy.org> and others
*/
static int Raw1394GetNumPorts( access_t *p_access )
static int Raw1394GetNumPorts( stream_t *p_access )
{
int n_ports;
struct raw1394_portinfo pinf[ 16 ];
@ -467,7 +467,7 @@ static int Raw1394GetNumPorts( access_t *p_access )
return n_ports;
}
static raw1394handle_t Raw1394Open( access_t *p_access, int port )
static raw1394handle_t Raw1394Open( stream_t *p_access, int port )
{
int n_ports;
struct raw1394_portinfo pinf[ 16 ];
@ -506,7 +506,7 @@ static void Raw1394Close( raw1394handle_t handle )
raw1394_destroy_handle( handle );
}
static int DiscoverAVC( access_t *p_access, int* port, uint64_t guid )
static int DiscoverAVC( stream_t *p_access, int* port, uint64_t guid )
{
rom1394_directory rom_dir;
raw1394handle_t handle = NULL;
@ -565,7 +565,7 @@ static int DiscoverAVC( access_t *p_access, int* port, uint64_t guid )
/*
* Handle AVC commands
*/
static raw1394handle_t AVCOpen( access_t *p_access, int port )
static raw1394handle_t AVCOpen( stream_t *p_access, int port )
{
access_sys_t *p_sys = p_access->p_sys;
struct raw1394_portinfo pinf[ 16 ];
@ -586,7 +586,7 @@ static raw1394handle_t AVCOpen( access_t *p_access, int port )
return p_sys->p_avc1394;
}
static void AVCClose( access_t *p_access )
static void AVCClose( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
@ -603,7 +603,7 @@ static int AVCResetHandler( raw1394handle_t handle, unsigned int generation )
return 0;
}
static int AVCPlay( access_t *p_access, int phyID )
static int AVCPlay( stream_t *p_access, int phyID )
{
access_sys_t *p_sys = p_access->p_sys;
@ -618,7 +618,7 @@ static int AVCPlay( access_t *p_access, int phyID )
return 0;
}
static int AVCPause( access_t *p_access, int phyID )
static int AVCPause( stream_t *p_access, int phyID )
{
access_sys_t *p_sys = p_access->p_sys;
@ -632,7 +632,7 @@ static int AVCPause( access_t *p_access, int phyID )
}
static int AVCStop( access_t *p_access, int phyID )
static int AVCStop( stream_t *p_access, int phyID )
{
access_sys_t *p_sys = p_access->p_sys;

View File

@ -103,17 +103,17 @@ vlc_module_end ()
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static int Control( access_t *, int, va_list );
static int Control( stream_t *, int, va_list );
static block_t *BlockScan( access_t *, bool * );
static block_t *BlockScan( stream_t *, bool * );
#define DVB_SCAN_MAX_LOCK_TIME (2*CLOCK_FREQ)
static void FilterUnset( access_t *, int i_max );
static void FilterSet( access_t *, int i_pid, int i_type );
static void FilterUnset( stream_t *, int i_max );
static void FilterSet( stream_t *, int i_pid, int i_type );
static void VarInit( access_t * );
static int ParseMRL( access_t * );
static void VarInit( stream_t * );
static int ParseMRL( stream_t * );
static int ScanFrontendTuningHandler( scan_t *, void *, const scan_tuner_config_t * );
static int ScanFilterHandler( scan_t *, void *, uint16_t, bool );
@ -125,7 +125,7 @@ static int ScanReadCallback( scan_t *, void *, unsigned, size_t, uint8_t *, siz
*****************************************************************************/
static int Open( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
access_sys_t *p_sys;
if( p_access->b_preparsing )
@ -204,7 +204,7 @@ static int Open( vlc_object_t *p_this )
*****************************************************************************/
static void Close( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
access_sys_t *p_sys = p_access->p_sys;
FilterUnset( p_access, MAX_DEMUX );
@ -219,7 +219,7 @@ static void Close( vlc_object_t *p_this )
static int ScanFrontendTuningHandler( scan_t *p_scan, void *p_privdata,
const scan_tuner_config_t *p_cfg )
{
access_t *p_access = (access_t *) p_privdata;
stream_t *p_access = (stream_t *) p_privdata;
access_sys_t *sys = p_access->p_sys;
VLC_UNUSED(p_scan);
@ -247,7 +247,7 @@ static int ScanFrontendTuningHandler( scan_t *p_scan, void *p_privdata,
static int ScanStatsCallback( scan_t *p_scan, void *p_privdata, int *pi_snr )
{
access_t *p_access = (access_t *) p_privdata;
stream_t *p_access = (stream_t *) p_privdata;
access_sys_t *sys = p_access->p_sys;
VLC_UNUSED(p_scan);
@ -263,7 +263,7 @@ static int ScanStatsCallback( scan_t *p_scan, void *p_privdata, int *pi_snr )
static int ScanFilterHandler( scan_t *p_scan, void *p_privdata, uint16_t i_pid, bool b_set )
{
access_t *p_access = (access_t *) p_privdata;
stream_t *p_access = (stream_t *) p_privdata;
VLC_UNUSED(p_scan);
if( b_set )
@ -276,7 +276,7 @@ static int ScanReadCallback( scan_t *p_scan, void *p_privdata,
unsigned i_probe_timeout, size_t i_packets_max,
uint8_t *p_packet, size_t *pi_count )
{
access_t *p_access = (access_t *) p_privdata;
stream_t *p_access = (stream_t *) p_privdata;
access_sys_t *p_sys = p_access->p_sys;
*pi_count = 0;
@ -358,7 +358,7 @@ static int ScanReadCallback( scan_t *p_scan, void *p_privdata,
/*****************************************************************************
* BlockScan:
*****************************************************************************/
static block_t *BlockScan( access_t *p_access, bool *restrict eof )
static block_t *BlockScan( stream_t *p_access, bool *restrict eof )
{
access_sys_t *p_sys = p_access->p_sys;
scan_t *p_scan = p_sys->scan;
@ -381,7 +381,7 @@ static block_t *BlockScan( access_t *p_access, bool *restrict eof )
/*****************************************************************************
* Control:
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
static int Control( stream_t *p_access, int i_query, va_list args )
{
access_sys_t *sys = p_access->p_sys;
bool *pb_bool;
@ -430,7 +430,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
/*****************************************************************************
* FilterSet/FilterUnset:
*****************************************************************************/
static void FilterSet( access_t *p_access, int i_pid, int i_type )
static void FilterSet( stream_t *p_access, int i_pid, int i_type )
{
access_sys_t *p_sys = p_access->p_sys;
int i;
@ -461,7 +461,7 @@ static void FilterSet( access_t *p_access, int i_pid, int i_type )
p_sys->p_demux_handles[i].i_pid = i_pid;
}
static void FilterUnset( access_t *p_access, int i_max )
static void FilterUnset( stream_t *p_access, int i_max )
{
access_sys_t *p_sys = p_access->p_sys;
@ -478,7 +478,7 @@ static void FilterUnset( access_t *p_access, int i_max )
/*****************************************************************************
* VarInit/ParseMRL:
*****************************************************************************/
static void VarInit( access_t *p_access )
static void VarInit( stream_t *p_access )
{
var_Create( p_access, "dvb-adapter", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
var_Create( p_access, "dvb-device", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
@ -504,7 +504,7 @@ static void VarInit( access_t *p_access )
}
/* */
static int ParseMRL( access_t *p_access )
static int ParseMRL( stream_t *p_access )
{
char *psz_dup = strdup( p_access->psz_location );
char *psz_parser = psz_dup;

View File

@ -128,17 +128,17 @@ static bool IsRemote (const char *path)
# define posix_fadvise(fd, off, len, adv)
#endif
static ssize_t Read (access_t *, void *, size_t);
static int FileSeek (access_t *, uint64_t);
static int NoSeek (access_t *, uint64_t);
static int FileControl (access_t *, int, va_list);
static ssize_t Read (stream_t *, void *, size_t);
static int FileSeek (stream_t *, uint64_t);
static int NoSeek (stream_t *, uint64_t);
static int FileControl (stream_t *, int, va_list);
/*****************************************************************************
* FileOpen: open the file
*****************************************************************************/
int FileOpen( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
/* Open file */
int fd = -1;
@ -257,7 +257,7 @@ error:
*****************************************************************************/
void FileClose (vlc_object_t * p_this)
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
if (p_access->pf_read == NULL)
{
@ -271,7 +271,7 @@ void FileClose (vlc_object_t * p_this)
}
static ssize_t Read (access_t *p_access, void *p_buffer, size_t i_len)
static ssize_t Read (stream_t *p_access, void *p_buffer, size_t i_len)
{
access_sys_t *p_sys = p_access->p_sys;
int fd = p_sys->fd;
@ -299,7 +299,7 @@ static ssize_t Read (access_t *p_access, void *p_buffer, size_t i_len)
/*****************************************************************************
* Seek: seek to a specific location in a file
*****************************************************************************/
static int FileSeek (access_t *p_access, uint64_t i_pos)
static int FileSeek (stream_t *p_access, uint64_t i_pos)
{
access_sys_t *sys = p_access->p_sys;
@ -308,7 +308,7 @@ static int FileSeek (access_t *p_access, uint64_t i_pos)
return VLC_SUCCESS;
}
static int NoSeek (access_t *p_access, uint64_t i_pos)
static int NoSeek (stream_t *p_access, uint64_t i_pos)
{
/* vlc_assert_unreachable(); ?? */
(void) p_access; (void) i_pos;
@ -318,7 +318,7 @@ static int NoSeek (access_t *p_access, uint64_t i_pos)
/*****************************************************************************
* Control:
*****************************************************************************/
static int FileControl( access_t *p_access, int i_query, va_list args )
static int FileControl( stream_t *p_access, int i_query, va_list args )
{
access_sys_t *p_sys = p_access->p_sys;
bool *pb_bool;

View File

@ -24,7 +24,7 @@ int FileOpen (vlc_object_t *);
void FileClose (vlc_object_t *);
int DirOpen (vlc_object_t *);
int DirInit (access_t *p_access, DIR *handle);
int DirRead (access_t *, input_item_node_t *);
int DirControl (access_t *, int, va_list);
int DirInit (stream_t *p_access, DIR *handle);
int DirRead (stream_t *, input_item_node_t *);
int DirControl (stream_t *, int, va_list);
void DirClose (vlc_object_t *);

View File

@ -109,10 +109,10 @@ vlc_module_end ()
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static ssize_t Read( access_t *, void *, size_t );
static int Seek( access_t *, uint64_t );
static int Control( access_t *, int, va_list );
static int DirRead( access_t *, input_item_node_t * );
static ssize_t Read( stream_t *, void *, size_t );
static int Seek( stream_t *, uint64_t );
static int Control( stream_t *, int, va_list );
static int DirRead( stream_t *, input_item_node_t * );
#ifdef ENABLE_SOUT
static int OutSeek( sout_access_out_t *, off_t );
static ssize_t Write( sout_access_out_t *, block_t * );
@ -437,7 +437,7 @@ static int Login( vlc_object_t *p_access, access_sys_t *p_sys )
vlc_url_t url;
vlc_credential credential;
vlc_UrlParse( &url, ((access_t *)p_access)->psz_url );
vlc_UrlParse( &url, ((stream_t *)p_access)->psz_url );
vlc_credential_init( &credential, &url );
bool b_logged = false;
@ -663,7 +663,7 @@ static int parseURL( vlc_url_t *url, const char *path, enum tls_mode_e mode )
****************************************************************************/
static int InOpen( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
access_sys_t *p_sys;
char *psz_arg;
bool b_directory;
@ -824,7 +824,7 @@ static void Close( vlc_object_t *p_access, access_sys_t *p_sys )
static void InClose( vlc_object_t *p_this )
{
Close( p_this, ((access_t *)p_this)->p_sys);
Close( p_this, ((stream_t *)p_this)->p_sys);
}
#ifdef ENABLE_SOUT
@ -849,7 +849,7 @@ static int _Seek( vlc_object_t *p_access, access_sys_t *p_sys, uint64_t i_pos )
return VLC_SUCCESS;
}
static int Seek( access_t *p_access, uint64_t i_pos )
static int Seek( stream_t *p_access, uint64_t i_pos )
{
access_sys_t *p_sys = p_access->p_sys;
@ -872,7 +872,7 @@ static int OutSeek( sout_access_out_t *p_access, off_t i_pos )
/*****************************************************************************
* Read:
*****************************************************************************/
static ssize_t Read( access_t *p_access, void *p_buffer, size_t i_len )
static ssize_t Read( stream_t *p_access, void *p_buffer, size_t i_len )
{
access_sys_t *p_sys = p_access->p_sys;
@ -894,7 +894,7 @@ static ssize_t Read( access_t *p_access, void *p_buffer, size_t i_len )
/*****************************************************************************
* DirRead:
*****************************************************************************/
static int DirRead (access_t *p_access, input_item_node_t *p_current_node)
static int DirRead (stream_t *p_access, input_item_node_t *p_current_node)
{
access_sys_t *p_sys = p_access->p_sys;
int i_ret = VLC_SUCCESS;
@ -988,7 +988,7 @@ static ssize_t Write( sout_access_out_t *p_access, block_t *p_buffer )
/*****************************************************************************
* Control:
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
static int Control( stream_t *p_access, int i_query, va_list args )
{
access_sys_t *sys = p_access->p_sys;
bool *pb_bool;

View File

@ -134,16 +134,16 @@ struct access_sys_t
};
/* */
static ssize_t Read( access_t *, void *, size_t );
static int Seek( access_t *, uint64_t );
static int Control( access_t *, int, va_list );
static ssize_t Read( stream_t *, void *, size_t );
static int Seek( stream_t *, uint64_t );
static int Control( stream_t *, int, va_list );
/* */
static int Connect( access_t * );
static void Disconnect( access_t * );
static int Connect( stream_t * );
static void Disconnect( stream_t * );
static int AuthCheckReply( access_t *p_access, const char *psz_header,
static int AuthCheckReply( stream_t *p_access, const char *psz_header,
vlc_url_t *p_url, vlc_http_auth_t *p_auth );
/*****************************************************************************
@ -151,7 +151,7 @@ static int AuthCheckReply( access_t *p_access, const char *psz_header,
*****************************************************************************/
static int Open( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
const char *psz_url = p_access->psz_url;
char *psz;
int ret = VLC_EGENERIC;
@ -383,7 +383,7 @@ error:
*****************************************************************************/
static void Close( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
access_sys_t *p_sys = p_access->p_sys;
vlc_UrlClean( &p_sys->url );
@ -408,7 +408,7 @@ static void Close( vlc_object_t *p_this )
}
/* Read data from the socket */
static int ReadData( access_t *p_access, int *pi_read,
static int ReadData( stream_t *p_access, int *pi_read,
void *p_buffer, size_t i_len )
{
access_sys_t *p_sys = p_access->p_sys;
@ -423,8 +423,8 @@ static int ReadData( access_t *p_access, int *pi_read,
* Read: Read up to i_len bytes from the http connection and place in
* p_buffer. Return the actual number of bytes read
*****************************************************************************/
static int ReadICYMeta( access_t *p_access );
static ssize_t Read( access_t *p_access, void *p_buffer, size_t i_len )
static int ReadICYMeta( stream_t *p_access );
static ssize_t Read( stream_t *p_access, void *p_buffer, size_t i_len )
{
access_sys_t *p_sys = p_access->p_sys;
int i_read;
@ -475,7 +475,7 @@ static ssize_t Read( access_t *p_access, void *p_buffer, size_t i_len )
return i_read;
}
static int ReadICYMeta( access_t *p_access )
static int ReadICYMeta( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
@ -554,7 +554,7 @@ static int ReadICYMeta( access_t *p_access )
/*****************************************************************************
* Seek: close and re-open a connection at the right place
*****************************************************************************/
static int Seek( access_t *p_access, uint64_t i_pos )
static int Seek( stream_t *p_access, uint64_t i_pos )
{
(void) p_access; (void) i_pos;
return VLC_EGENERIC;
@ -563,7 +563,7 @@ static int Seek( access_t *p_access, uint64_t i_pos )
/*****************************************************************************
* Control:
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
static int Control( stream_t *p_access, int i_query, va_list args )
{
access_sys_t *p_sys = p_access->p_sys;
bool *pb_bool;
@ -630,7 +630,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
/*****************************************************************************
* Connect:
*****************************************************************************/
static int Connect( access_t *p_access )
static int Connect( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
vlc_url_t srv = p_sys->b_proxy ? p_sys->proxy : p_sys->url;
@ -982,7 +982,7 @@ error:
/*****************************************************************************
* Disconnect:
*****************************************************************************/
static void Disconnect( access_t *p_access )
static void Disconnect( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
@ -995,7 +995,7 @@ static void Disconnect( access_t *p_access )
* HTTP authentication
*****************************************************************************/
static int AuthCheckReply( access_t *p_access, const char *psz_header,
static int AuthCheckReply( stream_t *p_access, const char *psz_header,
vlc_url_t *p_url, vlc_http_auth_t *p_auth )
{
return

View File

@ -44,7 +44,7 @@ struct access_sys_t
struct vlc_http_resource *resource;
};
static block_t *FileRead(access_t *access, bool *restrict eof)
static block_t *FileRead(stream_t *access, bool *restrict eof)
{
access_sys_t *sys = access->p_sys;
@ -54,7 +54,7 @@ static block_t *FileRead(access_t *access, bool *restrict eof)
return b;
}
static int FileSeek(access_t *access, uint64_t pos)
static int FileSeek(stream_t *access, uint64_t pos)
{
access_sys_t *sys = access->p_sys;
@ -63,7 +63,7 @@ static int FileSeek(access_t *access, uint64_t pos)
return VLC_SUCCESS;
}
static int FileControl(access_t *access, int query, va_list args)
static int FileControl(stream_t *access, int query, va_list args)
{
access_sys_t *sys = access->p_sys;
@ -110,7 +110,7 @@ static int FileControl(access_t *access, int query, va_list args)
return VLC_SUCCESS;
}
static block_t *LiveRead(access_t *access, bool *restrict eof)
static block_t *LiveRead(stream_t *access, bool *restrict eof)
{
access_sys_t *sys = access->p_sys;
@ -120,14 +120,14 @@ static block_t *LiveRead(access_t *access, bool *restrict eof)
return b;
}
static int NoSeek(access_t *access, uint64_t pos)
static int NoSeek(stream_t *access, uint64_t pos)
{
(void) access;
(void) pos;
return VLC_EGENERIC;
}
static int LiveControl(access_t *access, int query, va_list args)
static int LiveControl(stream_t *access, int query, va_list args)
{
access_sys_t *sys = access->p_sys;
@ -157,7 +157,7 @@ static int LiveControl(access_t *access, int query, va_list args)
static int Open(vlc_object_t *obj)
{
access_t *access = (access_t *)obj;
stream_t *access = (stream_t *)obj;
access_sys_t *sys = malloc(sizeof (*sys));
int ret = VLC_ENOMEM;
@ -276,7 +276,7 @@ error:
static void Close(vlc_object_t *obj)
{
access_t *access = (access_t *)obj;
stream_t *access = (stream_t *)obj;
access_sys_t *sys = access->p_sys;
vlc_http_res_destroy(sys->resource);

View File

@ -37,7 +37,7 @@ struct access_sys_t
uint64_t size;
};
static ssize_t Read(access_t *access, void *buf, size_t len)
static ssize_t Read(stream_t *access, void *buf, size_t len)
{
access_sys_t *sys = access->p_sys;
@ -51,7 +51,7 @@ static ssize_t Read(access_t *access, void *buf, size_t len)
return val;
}
static int Seek(access_t *access, uint64_t offset)
static int Seek(stream_t *access, uint64_t offset)
{
access_sys_t *sys = access->p_sys;
@ -62,7 +62,7 @@ static int Seek(access_t *access, uint64_t offset)
return VLC_SUCCESS;
}
static int Control(access_t *access, int query, va_list args)
static int Control(stream_t *access, int query, va_list args)
{
access_sys_t *sys = access->p_sys;
@ -110,7 +110,7 @@ static int open_cb_default(void *opaque, void **datap, uint64_t *sizep)
static int Open(vlc_object_t *object)
{
access_t *access = (access_t *)object;
stream_t *access = (stream_t *)object;
access_sys_t *sys = vlc_malloc(object, sizeof (*sys));
if (unlikely(sys == NULL))
@ -148,7 +148,7 @@ static int Open(vlc_object_t *object)
static void Close(vlc_object_t *object)
{
access_t *access = (access_t *)object;
stream_t *access = (stream_t *)object;
access_sys_t *sys = access->p_sys;
if (sys->close_cb != NULL)

View File

@ -200,8 +200,8 @@ typedef void (*imem_release_t)(void *data, const char *cookie, size_t, void *);
*****************************************************************************/
/* */
static block_t *Block(access_t *, bool *);
static int ControlAccess(access_t *, int, va_list);
static block_t *Block(stream_t *, bool *);
static int ControlAccess(stream_t *, int, va_list);
static int Demux(demux_t *);
static int ControlDemux(demux_t *, int, va_list);
@ -291,7 +291,7 @@ static int OpenCommon(vlc_object_t *object, imem_sys_t **sys_ptr, const char *ps
*/
static int OpenAccess(vlc_object_t *object)
{
access_t *access = (access_t *)object;
stream_t *access = (stream_t *)object;
imem_sys_t *sys;
if (OpenCommon(object, &sys, access->psz_location))
@ -317,7 +317,7 @@ static int OpenAccess(vlc_object_t *object)
*/
static void CloseAccess(vlc_object_t *object)
{
access_t *access = (access_t *)object;
stream_t *access = (stream_t *)object;
CloseCommon((imem_sys_t*)access->p_sys);
}
@ -325,7 +325,7 @@ static void CloseAccess(vlc_object_t *object)
/**
* It controls an imem access
*/
static int ControlAccess(access_t *access, int i_query, va_list args)
static int ControlAccess(stream_t *access, int i_query, va_list args)
{
(void) access;
switch (i_query)
@ -364,7 +364,7 @@ static int ControlAccess(access_t *access, int i_query, va_list args)
* It retreives data using the get() callback, copies them,
* and then release them using the release() callback.
*/
static block_t *Block(access_t *access, bool *restrict eof)
static block_t *Block(stream_t *access, bool *restrict eof)
{
imem_sys_t *sys = (imem_sys_t*)access->p_sys;

View File

@ -107,7 +107,7 @@ void var_buffer_addmemory( var_buffer_t *p_buf, void *p_mem, int i_mem )
p_buf->i_data += i_mem;
}
void var_buffer_addUTF16( access_t *p_access, var_buffer_t *p_buf, const char *p_str )
void var_buffer_addUTF16( stream_t *p_access, var_buffer_t *p_buf, const char *p_str )
{
uint16_t *p_out;
size_t i_out;

View File

@ -43,7 +43,7 @@ void var_buffer_add16( var_buffer_t *p_buf, uint16_t i_word );
void var_buffer_add32( var_buffer_t *p_buf, uint32_t i_word );
void var_buffer_add64( var_buffer_t *p_buf, uint64_t i_word );
void var_buffer_addmemory( var_buffer_t *p_buf, void *p_mem, int i_mem );
void var_buffer_addUTF16( access_t *p_access, var_buffer_t *p_buf, const char *p_str );
void var_buffer_addUTF16( stream_t *p_access, var_buffer_t *p_buf, const char *p_str );
void var_buffer_free( var_buffer_t *p_buf );

View File

@ -90,7 +90,7 @@ struct access_sys_t
*****************************************************************************/
static int Open( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
/* use specified method */
if( !strncmp( p_access->psz_name, "mmsu", 4 ) )
@ -112,7 +112,7 @@ static int Open( vlc_object_t *p_this )
*****************************************************************************/
static void Close( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
access_sys_t *p_sys = p_access->p_sys;
if( ( p_sys->i_proto == MMS_PROTO_TCP ) ||

View File

@ -30,12 +30,12 @@
#define MMS_PROTO_HTTP 3
/* mmst and mmsu */
int MMSTUOpen ( access_t * );
void MMSTUClose ( access_t * );
int MMSTUOpen ( stream_t * );
void MMSTUClose ( stream_t * );
/* mmsh */
int MMSHOpen ( access_t * );
void MMSHClose ( access_t * );
int MMSHOpen ( stream_t * );
void MMSHClose ( stream_t * );
#endif

View File

@ -51,22 +51,22 @@
/*****************************************************************************
* Local prototypes
*****************************************************************************/
int MMSHOpen ( access_t * );
void MMSHClose ( access_t * );
int MMSHOpen ( stream_t * );
void MMSHClose ( stream_t * );
static block_t *Block( access_t *p_access, bool * );
static int Seek( access_t *, uint64_t );
static int Control( access_t *, int, va_list );
static block_t *Block( stream_t *p_access, bool * );
static int Seek( stream_t *, uint64_t );
static int Control( stream_t *, int, va_list );
static int Describe( access_t *, char **ppsz_location );
static int Start( access_t *, uint64_t );
static void Stop( access_t * );
static int Describe( stream_t *, char **ppsz_location );
static int Start( stream_t *, uint64_t );
static void Stop( stream_t * );
static int GetPacket( access_t *, chunk_t * );
static void GetHeader( access_t *p_access, int i_content_length );
static int GetPacket( stream_t *, chunk_t * );
static void GetHeader( stream_t *p_access, int i_content_length );
static int Restart( access_t * );
static int Reset( access_t * );
static int Restart( stream_t * );
static int Reset( stream_t * );
//#define MMSH_USER_AGENT "NSPlayer/4.1.0.3856"
#define MMSH_USER_AGENT "NSPlayer/7.10.0.3059"
@ -74,7 +74,7 @@ static int Reset( access_t * );
/****************************************************************************
* Open: connect to ftp server and ask for file
****************************************************************************/
int MMSHOpen( access_t *p_access )
int MMSHOpen( stream_t *p_access )
{
access_sys_t *p_sys = calloc( 1, sizeof( *p_sys ) );
char *psz_location = NULL;
@ -161,7 +161,7 @@ error:
/*****************************************************************************
* Close: free unused data structures
*****************************************************************************/
void MMSHClose ( access_t *p_access )
void MMSHClose ( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
@ -178,7 +178,7 @@ void MMSHClose ( access_t *p_access )
/*****************************************************************************
* Control:
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
static int Control( stream_t *p_access, int i_query, va_list args )
{
access_sys_t *p_sys = p_access->p_sys;
bool *pb_bool;
@ -282,7 +282,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
/*****************************************************************************
* Seek: try to go at the right place
*****************************************************************************/
static int Seek( access_t *p_access, uint64_t i_pos )
static int Seek( stream_t *p_access, uint64_t i_pos )
{
access_sys_t *p_sys = p_access->p_sys;
chunk_t ck;
@ -318,7 +318,7 @@ static int Seek( access_t *p_access, uint64_t i_pos )
/*****************************************************************************
* Block:
*****************************************************************************/
static block_t *Block( access_t *p_access, bool *restrict eof )
static block_t *Block( stream_t *p_access, bool *restrict eof )
{
access_sys_t *p_sys = p_access->p_sys;
const unsigned i_packet_min = p_sys->asfh.i_min_data_packet_size;
@ -389,7 +389,7 @@ static block_t *Block( access_t *p_access, bool *restrict eof )
}
/* */
static int Restart( access_t *p_access )
static int Restart( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
char *psz_location = NULL;
@ -418,7 +418,7 @@ static int Restart( access_t *p_access )
}
return VLC_SUCCESS;
}
static int Reset( access_t *p_access )
static int Reset( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
asf_header_t old_asfh = p_sys->asfh;
@ -516,7 +516,7 @@ static void WriteRequestLine( const access_sys_t *sys,
vlc_memstream_printf( stream, "User-Agent: %s\r\n", MMSH_USER_AGENT );
}
static int OpenConnection( access_t *p_access,
static int OpenConnection( stream_t *p_access,
struct vlc_memstream *restrict stream )
{
access_sys_t *p_sys = p_access->p_sys;
@ -555,7 +555,7 @@ static int OpenConnection( access_t *p_access,
/*****************************************************************************
* Describe:
*****************************************************************************/
static int Describe( access_t *p_access, char **ppsz_location )
static int Describe( stream_t *p_access, char **ppsz_location )
{
access_sys_t *p_sys = p_access->p_sys;
char *psz_location = NULL;
@ -739,7 +739,7 @@ error:
return VLC_EGENERIC;
}
static void GetHeader( access_t *p_access, int i_content_length )
static void GetHeader( stream_t *p_access, int i_content_length )
{
access_sys_t *p_sys = p_access->p_sys;
int i_read_content = 0;
@ -771,7 +771,7 @@ static void GetHeader( access_t *p_access, int i_content_length )
/*****************************************************************************
* Start stream
****************************************************************************/
static int Start( access_t *p_access, uint64_t i_pos )
static int Start( stream_t *p_access, uint64_t i_pos )
{
access_sys_t *p_sys = p_access->p_sys;
int i_streams = 0;
@ -871,7 +871,7 @@ static int Start( access_t *p_access, uint64_t i_pos )
/*****************************************************************************
* closing stream
*****************************************************************************/
static void Stop( access_t *p_access )
static void Stop( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
@ -886,7 +886,7 @@ static void Stop( access_t *p_access )
/*****************************************************************************
* get packet
*****************************************************************************/
static int GetPacket( access_t * p_access, chunk_t *p_ck )
static int GetPacket( stream_t * p_access, chunk_t *p_ck )
{
access_sys_t *p_sys = p_access->p_sys;
int restsize;

View File

@ -62,31 +62,31 @@
/*****************************************************************************
* Local prototypes
*****************************************************************************/
int MMSTUOpen ( access_t * );
void MMSTUClose ( access_t * );
int MMSTUOpen ( stream_t * );
void MMSTUClose ( stream_t * );
static block_t *Block( access_t *, bool * );
static int Seek( access_t *, uint64_t );
static int Control( access_t *, int, va_list );
static block_t *Block( stream_t *, bool * );
static int Seek( stream_t *, uint64_t );
static int Control( stream_t *, int, va_list );
static int MMSOpen ( access_t *, vlc_url_t *, int );
static int MMSStart( access_t *, uint32_t );
static int MMSStop ( access_t * );
static void MMSClose( access_t * );
static int MMSOpen ( stream_t *, vlc_url_t *, int );
static int MMSStart( stream_t *, uint32_t );
static int MMSStop ( stream_t * );
static void MMSClose( stream_t * );
static int mms_CommandRead( access_t *p_access, int i_command1, int i_command2 );
static int mms_CommandSend( access_t *, int, uint32_t, uint32_t, uint8_t *, int );
static int mms_CommandRead( stream_t *p_access, int i_command1, int i_command2 );
static int mms_CommandSend( stream_t *, int, uint32_t, uint32_t, uint8_t *, int );
static int mms_HeaderMediaRead( access_t *, int );
static int mms_HeaderMediaRead( stream_t *, int );
static int mms_ReceivePacket( access_t * );
static int mms_ReceivePacket( stream_t * );
static void KeepAliveStart( access_t * );
static void KeepAliveStop( access_t * );
static void KeepAliveStart( stream_t * );
static void KeepAliveStop( stream_t * );
int MMSTUOpen( access_t *p_access )
int MMSTUOpen( stream_t *p_access )
{
access_sys_t *p_sys;
int i_proto;
@ -191,7 +191,7 @@ int MMSTUOpen( access_t *p_access )
/*****************************************************************************
* Close: free unused data structures
*****************************************************************************/
void MMSTUClose( access_t *p_access )
void MMSTUClose( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
@ -209,7 +209,7 @@ void MMSTUClose( access_t *p_access )
/*****************************************************************************
* Control:
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
static int Control( stream_t *p_access, int i_query, va_list args )
{
access_sys_t *p_sys = p_access->p_sys;
bool *pb_bool;
@ -325,7 +325,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
/*****************************************************************************
* Seek: try to go at the right place
*****************************************************************************/
static int Seek( access_t * p_access, uint64_t i_pos )
static int Seek( stream_t * p_access, uint64_t i_pos )
{
access_sys_t *p_sys = p_access->p_sys;
uint32_t i_packet;
@ -424,7 +424,7 @@ static int Seek( access_t * p_access, uint64_t i_pos )
/*****************************************************************************
* Block:
*****************************************************************************/
static block_t *Block( access_t *p_access, bool *restrict eof )
static block_t *Block( stream_t *p_access, bool *restrict eof )
{
access_sys_t *p_sys = p_access->p_sys;
@ -477,7 +477,7 @@ static block_t *Block( access_t *p_access, bool *restrict eof )
/****************************************************************************
* MMSOpen : Open a connection with the server over mmst or mmsu
****************************************************************************/
static int MMSOpen( access_t *p_access, vlc_url_t *p_url, int i_proto )
static int MMSOpen( stream_t *p_access, vlc_url_t *p_url, int i_proto )
{
access_sys_t *p_sys = p_access->p_sys;
int b_udp = ( i_proto == MMS_PROTO_UDP ) ? 1 : 0;
@ -915,7 +915,7 @@ static int MMSOpen( access_t *p_access, vlc_url_t *p_url, int i_proto )
/****************************************************************************
* MMSStart : Start streaming
****************************************************************************/
static int MMSStart( access_t *p_access, uint32_t i_packet )
static int MMSStart( stream_t *p_access, uint32_t i_packet )
{
access_sys_t *p_sys = p_access->p_sys;
var_buffer_t buffer;
@ -958,7 +958,7 @@ static int MMSStart( access_t *p_access, uint32_t i_packet )
/****************************************************************************
* MMSStop : Stop streaming
****************************************************************************/
static int MMSStop( access_t *p_access )
static int MMSStop( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
@ -974,7 +974,7 @@ static int MMSStop( access_t *p_access )
/****************************************************************************
* MMSClose : Close streaming and connection
****************************************************************************/
static void MMSClose( access_t *p_access )
static void MMSClose( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
@ -1010,7 +1010,7 @@ static void MMSClose( access_t *p_access )
* MMS specific functions
*
****************************************************************************/
static int mms_CommandSend( access_t *p_access, int i_command,
static int mms_CommandSend( stream_t *p_access, int i_command,
uint32_t i_prefix1, uint32_t i_prefix2,
uint8_t *p_data, int i_data_old )
{
@ -1064,7 +1064,7 @@ static int mms_CommandSend( access_t *p_access, int i_command,
return VLC_SUCCESS;
}
static int NetFillBuffer( access_t *p_access )
static int NetFillBuffer( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
int i_ret;
@ -1172,7 +1172,7 @@ static int NetFillBuffer( access_t *p_access )
return i_tcp_read + i_udp_read;
}
static int mms_ParseCommand( access_t *p_access,
static int mms_ParseCommand( stream_t *p_access,
uint8_t *p_data,
size_t i_data,
size_t *pi_used )
@ -1252,7 +1252,7 @@ static int mms_ParseCommand( access_t *p_access,
return MMS_PACKET_CMD;
}
static int mms_ParsePacket( access_t *p_access,
static int mms_ParsePacket( stream_t *p_access,
uint8_t *p_data, size_t i_data,
size_t *pi_used )
{
@ -1351,7 +1351,7 @@ static int mms_ParsePacket( access_t *p_access,
}
}
static int mms_ReceivePacket( access_t *p_access )
static int mms_ReceivePacket( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
int i_packet_tcp_type;
@ -1449,7 +1449,7 @@ static int mms_ReceivePacket( access_t *p_access )
}
}
static int mms_ReceiveCommand( access_t *p_access )
static int mms_ReceiveCommand( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
@ -1499,7 +1499,7 @@ static int mms_ReceiveCommand( access_t *p_access )
#define MMS_RETRY_MAX 10
static int mms_CommandRead( access_t *p_access, int i_command1,
static int mms_CommandRead( stream_t *p_access, int i_command1,
int i_command2 )
{
access_sys_t *p_sys = p_access->p_sys;
@ -1546,7 +1546,7 @@ static int mms_CommandRead( access_t *p_access, int i_command1,
}
static int mms_HeaderMediaRead( access_t *p_access, int i_type )
static int mms_HeaderMediaRead( stream_t *p_access, int i_type )
{
access_sys_t *p_sys = p_access->p_sys;
int i_count;
@ -1600,7 +1600,7 @@ static int mms_HeaderMediaRead( access_t *p_access, int i_type )
noreturn static void *KeepAliveThread( void *p_data )
{
access_t *p_access = p_data;
stream_t *p_access = p_data;
for( ;; )
{
@ -1616,7 +1616,7 @@ noreturn static void *KeepAliveThread( void *p_data )
vlc_assert_unreachable();
}
static void KeepAliveStart( access_t *p_access )
static void KeepAliveStart( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
if( p_sys->b_keep_alive )
@ -1627,7 +1627,7 @@ static void KeepAliveStart( access_t *p_access )
VLC_THREAD_PRIORITY_LOW );
}
static void KeepAliveStop( access_t *p_access )
static void KeepAliveStop( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
if( !p_sys->b_keep_alive )

View File

@ -67,16 +67,16 @@ vlc_module_end()
* Exported prototypes
*****************************************************************************/
static int Seek( access_t *, uint64_t );
static ssize_t Read( access_t *, void *, size_t );
static int Control( access_t *, int, va_list );
static int Seek( stream_t *, uint64_t );
static ssize_t Read( stream_t *, void *, size_t );
static int Control( stream_t *, int, va_list );
/*****************************************************************************
* Open: open the file
*****************************************************************************/
static int Open( vlc_object_t *p_this )
{
access_t *p_access = ( access_t* )p_this;
stream_t *p_access = ( stream_t* )p_this;
uint32_t i_bus;
uint8_t i_dev;
uint16_t i_product_id;
@ -140,7 +140,7 @@ static int Open( vlc_object_t *p_this )
*****************************************************************************/
static void Close( vlc_object_t * p_this )
{
access_t *p_access = ( access_t* )p_this;
stream_t *p_access = ( stream_t* )p_this;
int fd = (intptr_t)p_access->p_sys;
vlc_close ( fd );
@ -149,7 +149,7 @@ static void Close( vlc_object_t * p_this )
/*****************************************************************************
* Read: standard read on a file descriptor.
*****************************************************************************/
static ssize_t Read( access_t *p_access, void *p_buffer, size_t i_len )
static ssize_t Read( stream_t *p_access, void *p_buffer, size_t i_len )
{
int fd = (intptr_t)p_access->p_sys;
ssize_t i_ret = read( fd, p_buffer, i_len );
@ -178,7 +178,7 @@ static ssize_t Read( access_t *p_access, void *p_buffer, size_t i_len )
/*****************************************************************************
* Seek: seek to a specific location in a file
*****************************************************************************/
static int Seek( access_t *p_access, uint64_t i_pos )
static int Seek( stream_t *p_access, uint64_t i_pos )
{
int fd = (intptr_t)p_access->p_sys;
@ -190,7 +190,7 @@ static int Seek( access_t *p_access, uint64_t i_pos )
/*****************************************************************************
* Control:
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
static int Control( stream_t *p_access, int i_query, va_list args )
{
int fd = (intptr_t)p_access->p_sys;
bool *pb_bool;

View File

@ -98,7 +98,7 @@ struct access_sys_t
};
static bool
nfs_check_status(access_t *p_access, int i_status, const char *psz_error,
nfs_check_status(stream_t *p_access, int i_status, const char *psz_error,
const char *psz_func)
{
access_sys_t *sys = p_access->p_sys;
@ -126,8 +126,8 @@ nfs_check_status(access_t *p_access, int i_status, const char *psz_error,
nfs_check_status(p_access, i_status, (const char *)p_data, __func__)
static int
vlc_rpc_mainloop(access_t *p_access, struct rpc_context *p_rpc_ctx,
bool (*pf_until_cb)(access_t *))
vlc_rpc_mainloop(stream_t *p_access, struct rpc_context *p_rpc_ctx,
bool (*pf_until_cb)(stream_t *))
{
access_sys_t *p_sys = p_access->p_sys;
@ -157,7 +157,7 @@ vlc_rpc_mainloop(access_t *p_access, struct rpc_context *p_rpc_ctx,
}
static int
vlc_nfs_mainloop(access_t *p_access, bool (*pf_until_cb)(access_t *))
vlc_nfs_mainloop(stream_t *p_access, bool (*pf_until_cb)(stream_t *))
{
access_sys_t *p_sys = p_access->p_sys;
assert(p_sys->p_nfs != NULL);
@ -166,7 +166,7 @@ vlc_nfs_mainloop(access_t *p_access, bool (*pf_until_cb)(access_t *))
}
static int
vlc_mount_mainloop(access_t *p_access, bool (*pf_until_cb)(access_t *))
vlc_mount_mainloop(stream_t *p_access, bool (*pf_until_cb)(stream_t *))
{
access_sys_t *p_sys = p_access->p_sys;
assert(p_sys->p_mount != NULL);
@ -178,7 +178,7 @@ nfs_read_cb(int i_status, struct nfs_context *p_nfs, void *p_data,
void *p_private_data)
{
VLC_UNUSED(p_nfs);
access_t *p_access = p_private_data;
stream_t *p_access = p_private_data;
access_sys_t *p_sys = p_access->p_sys;
assert(p_sys->p_nfs == p_nfs);
if (NFS_CHECK_STATUS(p_access, i_status, p_data))
@ -194,14 +194,14 @@ nfs_read_cb(int i_status, struct nfs_context *p_nfs, void *p_data,
}
static bool
nfs_read_finished_cb(access_t *p_access)
nfs_read_finished_cb(stream_t *p_access)
{
access_sys_t *p_sys = p_access->p_sys;
return p_sys->res.read.i_len > 0 || p_sys->b_eof;
}
static ssize_t
FileRead(access_t *p_access, void *p_buf, size_t i_len)
FileRead(stream_t *p_access, void *p_buf, size_t i_len)
{
access_sys_t *p_sys = p_access->p_sys;
@ -228,7 +228,7 @@ nfs_seek_cb(int i_status, struct nfs_context *p_nfs, void *p_data,
void *p_private_data)
{
VLC_UNUSED(p_nfs);
access_t *p_access = p_private_data;
stream_t *p_access = p_private_data;
access_sys_t *p_sys = p_access->p_sys;
assert(p_sys->p_nfs == p_nfs);
(void) p_data;
@ -239,14 +239,14 @@ nfs_seek_cb(int i_status, struct nfs_context *p_nfs, void *p_data,
}
static bool
nfs_seek_finished_cb(access_t *p_access)
nfs_seek_finished_cb(stream_t *p_access)
{
access_sys_t *p_sys = p_access->p_sys;
return p_sys->res.seek.b_done;
}
static int
FileSeek(access_t *p_access, uint64_t i_pos)
FileSeek(stream_t *p_access, uint64_t i_pos)
{
access_sys_t *p_sys = p_access->p_sys;
@ -265,7 +265,7 @@ FileSeek(access_t *p_access, uint64_t i_pos)
}
static int
FileControl(access_t *p_access, int i_query, va_list args)
FileControl(stream_t *p_access, int i_query, va_list args)
{
access_sys_t *p_sys = p_access->p_sys;
@ -322,7 +322,7 @@ NfsGetUrl(vlc_url_t *p_url, const char *psz_file)
}
static int
DirRead(access_t *p_access, input_item_node_t *p_node)
DirRead(stream_t *p_access, input_item_node_t *p_node)
{
access_sys_t *p_sys = p_access->p_sys;
struct nfsdirent *p_nfsdirent;
@ -372,7 +372,7 @@ DirRead(access_t *p_access, input_item_node_t *p_node)
}
static int
MountRead(access_t *p_access, input_item_node_t *p_node)
MountRead(stream_t *p_access, input_item_node_t *p_node)
{
access_sys_t *p_sys = p_access->p_sys;
assert(p_sys->p_mount != NULL && p_sys->res.exports.i_count >= 0);
@ -406,7 +406,7 @@ nfs_opendir_cb(int i_status, struct nfs_context *p_nfs, void *p_data,
void *p_private_data)
{
VLC_UNUSED(p_nfs);
access_t *p_access = p_private_data;
stream_t *p_access = p_private_data;
access_sys_t *p_sys = p_access->p_sys;
assert(p_sys->p_nfs == p_nfs);
if (NFS_CHECK_STATUS(p_access, i_status, p_data))
@ -420,7 +420,7 @@ nfs_open_cb(int i_status, struct nfs_context *p_nfs, void *p_data,
void *p_private_data)
{
VLC_UNUSED(p_nfs);
access_t *p_access = p_private_data;
stream_t *p_access = p_private_data;
access_sys_t *p_sys = p_access->p_sys;
assert(p_sys->p_nfs == p_nfs);
if (NFS_CHECK_STATUS(p_access, i_status, p_data))
@ -434,7 +434,7 @@ nfs_stat64_cb(int i_status, struct nfs_context *p_nfs, void *p_data,
void *p_private_data)
{
VLC_UNUSED(p_nfs);
access_t *p_access = p_private_data;
stream_t *p_access = p_private_data;
access_sys_t *p_sys = p_access->p_sys;
assert(p_sys->p_nfs == p_nfs);
if (NFS_CHECK_STATUS(p_access, i_status, p_data))
@ -481,7 +481,7 @@ nfs_mount_cb(int i_status, struct nfs_context *p_nfs, void *p_data,
void *p_private_data)
{
VLC_UNUSED(p_nfs);
access_t *p_access = p_private_data;
stream_t *p_access = p_private_data;
access_sys_t *p_sys = p_access->p_sys;
assert(p_sys->p_nfs == p_nfs);
(void) p_data;
@ -524,7 +524,7 @@ nfs_mount_cb(int i_status, struct nfs_context *p_nfs, void *p_data,
}
static bool
nfs_mount_open_finished_cb(access_t *p_access)
nfs_mount_open_finished_cb(stream_t *p_access)
{
access_sys_t *p_sys = p_access->p_sys;
return p_sys->p_nfsfh != NULL || p_sys->p_nfsdir != NULL
@ -532,7 +532,7 @@ nfs_mount_open_finished_cb(access_t *p_access)
}
static bool
nfs_mount_open_slash_finished_cb(access_t *p_access)
nfs_mount_open_slash_finished_cb(stream_t *p_access)
{
access_sys_t *p_sys = p_access->p_sys;
return p_sys->p_nfsfh != NULL || p_sys->p_nfsdir != NULL;
@ -543,7 +543,7 @@ mount_export_cb(struct rpc_context *p_ctx, int i_status, void *p_data,
void *p_private_data)
{
VLC_UNUSED(p_ctx);
access_t *p_access = p_private_data;
stream_t *p_access = p_private_data;
access_sys_t *p_sys = p_access->p_sys;
assert(p_sys->p_mount == p_ctx);
if (NFS_CHECK_STATUS(p_access, i_status, p_data))
@ -590,14 +590,14 @@ mount_export_cb(struct rpc_context *p_ctx, int i_status, void *p_data,
}
static bool
mount_getexports_finished_cb(access_t *p_access)
mount_getexports_finished_cb(stream_t *p_access)
{
access_sys_t *p_sys = p_access->p_sys;
return p_sys->res.exports.i_count != -1;
}
static int
NfsInit(access_t *p_access, const char *psz_url_decoded)
NfsInit(stream_t *p_access, const char *psz_url_decoded)
{
access_sys_t *p_sys = p_access->p_sys;
p_sys->p_nfs = nfs_init_context();
@ -620,7 +620,7 @@ NfsInit(access_t *p_access, const char *psz_url_decoded)
static int
Open(vlc_object_t *p_obj)
{
access_t *p_access = (access_t *)p_obj;
stream_t *p_access = (stream_t *)p_obj;
access_sys_t *p_sys = vlc_calloc(p_obj, 1, sizeof (*p_sys));
if (unlikely(p_sys == NULL))
@ -743,7 +743,7 @@ error:
static void
Close(vlc_object_t *p_obj)
{
access_t *p_access = (access_t *)p_obj;
stream_t *p_access = (stream_t *)p_obj;
access_sys_t *p_sys = p_access->p_sys;
if (p_sys->p_nfsfh != NULL)

View File

@ -58,9 +58,9 @@ vlc_module_end ()
/*****************************************************************************
* Exported prototypes
*****************************************************************************/
static block_t *BlockRead( access_t *, bool * );
static int Seek( access_t *, uint64_t );
static int Control( access_t *, int, va_list );
static block_t *BlockRead( stream_t *, bool * );
static int Seek( stream_t *, uint64_t );
static int Control( stream_t *, int, va_list );
struct access_sys_t
{
@ -76,7 +76,7 @@ struct access_sys_t
*****************************************************************************/
static int RtspConnect( void *p_userdata, char *psz_server, int i_port )
{
access_t *p_access = (access_t *)p_userdata;
stream_t *p_access = (stream_t *)p_userdata;
access_sys_t *p_sys = p_access->p_sys;
/* Open connection */
@ -94,7 +94,7 @@ static int RtspConnect( void *p_userdata, char *psz_server, int i_port )
static int RtspDisconnect( void *p_userdata )
{
access_t *p_access = (access_t *)p_userdata;
stream_t *p_access = (stream_t *)p_userdata;
access_sys_t *p_sys = p_access->p_sys;
net_Close( p_sys->fd );
@ -103,7 +103,7 @@ static int RtspDisconnect( void *p_userdata )
static int RtspRead( void *p_userdata, uint8_t *p_buffer, int i_buffer )
{
access_t *p_access = (access_t *)p_userdata;
stream_t *p_access = (stream_t *)p_userdata;
access_sys_t *p_sys = p_access->p_sys;
return net_Read( p_access, p_sys->fd, p_buffer, i_buffer );
@ -111,7 +111,7 @@ static int RtspRead( void *p_userdata, uint8_t *p_buffer, int i_buffer )
static int RtspReadLine( void *p_userdata, uint8_t *p_buffer, int i_buffer )
{
access_t *p_access = (access_t *)p_userdata;
stream_t *p_access = (stream_t *)p_userdata;
access_sys_t *p_sys = p_access->p_sys;
char *psz = net_Gets( p_access, p_sys->fd );
@ -128,7 +128,7 @@ static int RtspReadLine( void *p_userdata, uint8_t *p_buffer, int i_buffer )
static int RtspWrite( void *p_userdata, uint8_t *p_buffer, int i_buffer )
{
VLC_UNUSED(i_buffer);
access_t *p_access = (access_t *)p_userdata;
stream_t *p_access = (stream_t *)p_userdata;
access_sys_t *p_sys = p_access->p_sys;
//fprintf(stderr, "Write: %s", p_buffer);
@ -143,7 +143,7 @@ static int RtspWrite( void *p_userdata, uint8_t *p_buffer, int i_buffer )
*****************************************************************************/
static int Open( vlc_object_t *p_this )
{
access_t *p_access = (access_t *)p_this;
stream_t *p_access = (stream_t *)p_this;
access_sys_t *p_sys;
char* psz_server = NULL;
int i_result;
@ -252,7 +252,7 @@ static int Open( vlc_object_t *p_this )
*****************************************************************************/
static void Close( vlc_object_t * p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
access_sys_t *p_sys = p_access->p_sys;
if( p_sys->p_rtsp ) rtsp_close( p_sys->p_rtsp );
@ -263,7 +263,7 @@ static void Close( vlc_object_t * p_this )
/*****************************************************************************
* Read: standard read on a file descriptor.
*****************************************************************************/
static block_t *BlockRead( access_t *p_access, bool *restrict eof )
static block_t *BlockRead( stream_t *p_access, bool *restrict eof )
{
access_sys_t *p_sys = p_access->p_sys;
block_t *p_block;
@ -291,7 +291,7 @@ static block_t *BlockRead( access_t *p_access, bool *restrict eof )
/*****************************************************************************
* Seek: seek to a specific location in a file
*****************************************************************************/
static int Seek( access_t *p_access, uint64_t i_pos )
static int Seek( stream_t *p_access, uint64_t i_pos )
{
VLC_UNUSED(p_access);
VLC_UNUSED(i_pos);
@ -301,7 +301,7 @@ static int Seek( access_t *p_access, uint64_t i_pos )
/*****************************************************************************
* Control:
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
static int Control( stream_t *p_access, int i_query, va_list args )
{
switch( i_query )
{

View File

@ -52,7 +52,7 @@ static const unsigned char xor_table[] = {
#define LE_32C(x,y) do {uint32_t in=y; *(uint32_t *)(x)=GetDWLE(&in);} while(0)
#define MAX(x,y) ((x>y) ? x : y)
static void hash(access_t *p_access, char *field, char *param)
static void hash(stream_t *p_access, char *field, char *param)
{
uint32_t a, b, c, d;
@ -209,7 +209,7 @@ static void hash(access_t *p_access, char *field, char *param)
LE_32C(field+12, d);
}
static void call_hash (access_t * p_access, char *key, char *challenge, unsigned int len) {
static void call_hash (stream_t * p_access, char *key, char *challenge, unsigned int len) {
uint8_t *ptr1, *ptr2;
uint32_t a, b, c, d, tmp;
@ -250,7 +250,7 @@ static void call_hash (access_t * p_access, char *key, char *challenge, unsigned
memcpy(key+b+24, challenge+c, len-c);
}
static void calc_response (access_t *p_access, char *result, char *field) {
static void calc_response (stream_t *p_access, char *result, char *field) {
char buf1[128];
char buf2[128];
int i;
@ -275,7 +275,7 @@ static void calc_response (access_t *p_access, char *result, char *field) {
memcpy (result, field, 16);
}
static void calc_response_string (access_t *p_access, char *result, char *challenge) {
static void calc_response_string (stream_t *p_access, char *result, char *challenge) {
char field[128] = {
0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
@ -302,7 +302,7 @@ static void calc_response_string (access_t *p_access, char *result, char *challe
}
}
static void real_calc_response_and_checksum (access_t *p_access, char *response, char *chksum, char *challenge) {
static void real_calc_response_and_checksum (stream_t *p_access, char *response, char *chksum, char *challenge) {
int ch_len, resp_len;
int i;
@ -358,7 +358,7 @@ static void real_calc_response_and_checksum (access_t *p_access, char *response,
* takes a MLTI-Chunk and a rule number got from match_asm_rule,
* returns a pointer to selected data and number of bytes in that.
*/
static int select_mlti_data(access_t *p_access, const char *mlti_chunk, int mlti_size, int selection, char **out) {
static int select_mlti_data(stream_t *p_access, const char *mlti_chunk, int mlti_size, int selection, char **out) {
int numrules, codec, size;
@ -415,7 +415,7 @@ static int select_mlti_data(access_t *p_access, const char *mlti_chunk, int mlti
* looking at stream description.
*/
static rmff_header_t *real_parse_sdp(access_t *p_access, char *data, char **stream_rules, uint32_t bandwidth) {
static rmff_header_t *real_parse_sdp(stream_t *p_access, char *data, char **stream_rules, uint32_t bandwidth) {
sdpplin_t *desc = NULL;
rmff_header_t *header = NULL;
@ -534,7 +534,7 @@ error:
int real_get_rdt_chunk_header(rtsp_client_t *rtsp_session, rmff_pheader_t *ph) {
access_t *p_access = (access_t*)rtsp_session->p_userdata;
stream_t *p_access = (stream_t*)rtsp_session->p_userdata;
int n=1;
uint8_t header[8];
int size;
@ -607,7 +607,7 @@ int real_get_rdt_chunk(rtsp_client_t *rtsp_session, rmff_pheader_t *ph,
//! maximum size of the rtsp description, must be < INT_MAX
#define MAX_DESC_BUF (20 * 1024 * 1024)
rmff_header_t *real_setup_and_get_header(rtsp_client_t *rtsp_session, int bandwidth) {
access_t *p_access = (access_t *) rtsp_session->p_userdata;
stream_t *p_access = (stream_t *) rtsp_session->p_userdata;
char *description=NULL;
char *session_id=NULL;

View File

@ -511,7 +511,7 @@ void rmff_print_header(rmff_header_t *h) {
}
}
void rmff_fix_header(access_t *p_access, rmff_header_t *h) {
void rmff_fix_header(stream_t *p_access, rmff_header_t *h) {
unsigned int num_headers=0;
unsigned int header_size=0;

View File

@ -231,7 +231,7 @@ void rmff_print_header(rmff_header_t *h);
/*
* does some checks and fixes header if possible
*/
void rmff_fix_header(access_t *p_access, rmff_header_t *h);
void rmff_fix_header(stream_t *p_access, rmff_header_t *h);
/*
* returns the size of the header (incl. first data-header)

View File

@ -40,7 +40,7 @@ static inline int line_length(char * data) {
return strlen(data);
}
static int filter(access_t *p_access, const char *in, const char *filter, char **out, size_t outlen) {
static int filter(stream_t *p_access, const char *in, const char *filter, char **out, size_t outlen) {
int flen=strlen(filter);
size_t len;
@ -64,7 +64,7 @@ static int filter(access_t *p_access, const char *in, const char *filter, char *
return 0;
}
static sdpplin_stream_t *sdpplin_parse_stream(access_t *p_access, char **data) {
static sdpplin_stream_t *sdpplin_parse_stream(stream_t *p_access, char **data) {
sdpplin_stream_t *desc;
char* buf = NULL;
@ -187,7 +187,7 @@ error:
}
sdpplin_t *sdpplin_parse(access_t *p_access, char *data)
sdpplin_t *sdpplin_parse(stream_t *p_access, char *data)
{
sdpplin_t* desc;
sdpplin_stream_t* stream;

View File

@ -95,7 +95,7 @@ typedef struct {
} sdpplin_t;
sdpplin_t *sdpplin_parse(access_t *p_access, char *data);
sdpplin_t *sdpplin_parse(stream_t *p_access, char *data);
void sdpplin_free(sdpplin_t *description);

View File

@ -214,7 +214,7 @@ static void rtsp_schedule_standard( rtsp_client_t *rtsp )
static int rtsp_get_answers( rtsp_client_t *rtsp )
{
access_t *p_access = (access_t*)rtsp->p_userdata;
stream_t *p_access = (stream_t*)rtsp->p_userdata;
char *answer = NULL;
unsigned int answer_seq;
char **answer_ptr = rtsp->p_private->answers;
@ -649,7 +649,7 @@ char *rtsp_get_mrl( rtsp_client_t *rtsp )
void rtsp_schedule_field( rtsp_client_t *rtsp, const char *data )
{
access_t * p_access = (access_t*)rtsp->p_userdata;
stream_t * p_access = (stream_t*)rtsp->p_userdata;
char **pptr;
int i = 0;

View File

@ -148,7 +148,7 @@ static int parse_port(char *str, uint16_t *port)
return 0;
}
static int parse_transport(access_t *access, char *request_line) {
static int parse_transport(stream_t *access, char *request_line) {
access_sys_t *sys = access->p_sys;
char *state;
char *tok;
@ -262,7 +262,7 @@ error:
}
#define skip_whitespace(x) while(*x == ' ') x++
static enum rtsp_result rtsp_handle(access_t *access, bool *interrupted) {
static enum rtsp_result rtsp_handle(stream_t *access, bool *interrupted) {
access_sys_t *sys = access->p_sys;
uint8_t buffer[512];
int rtsp_result = 0;
@ -336,7 +336,7 @@ static void satip_cleanup_blocks(void *data)
}
#endif
static int check_rtp_seq(access_t *access, block_t *block)
static int check_rtp_seq(stream_t *access, block_t *block)
{
access_sys_t *sys = access->p_sys;
uint16_t seq_nr = block->p_buffer[2] << 8 | block->p_buffer[3];
@ -358,7 +358,7 @@ static int check_rtp_seq(access_t *access, block_t *block)
}
static void satip_teardown(void *data) {
access_t *access = data;
stream_t *access = data;
access_sys_t *sys = access->p_sys;
int ret;
@ -422,7 +422,7 @@ static void satip_teardown(void *data) {
#define RECV_TIMEOUT 2 * 1000 * 1000
static void *satip_thread(void *data) {
access_t *access = data;
stream_t *access = data;
access_sys_t *sys = access->p_sys;
int sock = sys->udp_sock;
mtime_t last_recv = mdate();
@ -535,7 +535,7 @@ static void *satip_thread(void *data) {
return NULL;
}
static block_t* satip_block(access_t *access, bool *restrict eof) {
static block_t* satip_block(stream_t *access, bool *restrict eof) {
access_sys_t *sys = access->p_sys;
block_t *block;
@ -555,7 +555,7 @@ static block_t* satip_block(access_t *access, bool *restrict eof) {
return block;
}
static int satip_control(access_t *access, int i_query, va_list args) {
static int satip_control(stream_t *access, int i_query, va_list args) {
bool *pb_bool;
int64_t *pi_64;
@ -583,7 +583,7 @@ static int satip_control(access_t *access, int i_query, va_list args) {
/* Bind two adjacent free ports, of which the first one is even (for RTP data)
* and the second is odd (RTCP). This is a requirement of the satip
* specification */
static int satip_bind_ports(access_t *access)
static int satip_bind_ports(stream_t *access)
{
access_sys_t *sys = access->p_sys;
uint8_t rnd;
@ -620,7 +620,7 @@ static int satip_bind_ports(access_t *access)
static int satip_open(vlc_object_t *obj)
{
access_t *access = (access_t *)obj;
stream_t *access = (stream_t *)obj;
access_sys_t *sys;
vlc_url_t url;
@ -809,7 +809,7 @@ error:
static void satip_close(vlc_object_t *obj)
{
access_t *access = (access_t *)obj;
stream_t *access = (stream_t *)obj;
access_sys_t *sys = access->p_sys;
vlc_cancel(sys->thread);

View File

@ -39,9 +39,9 @@ vlc_module_begin ()
add_shortcut ("sdp")
vlc_module_end()
static ssize_t Read (access_t *, void *, size_t);
static int Seek (access_t *, uint64_t);
static int Control (access_t *, int, va_list);
static ssize_t Read (stream_t *, void *, size_t);
static int Seek (stream_t *, uint64_t);
static int Control (stream_t *, int, va_list);
struct access_sys_t
{
@ -52,7 +52,7 @@ struct access_sys_t
static int Open (vlc_object_t *obj)
{
access_t *access = (access_t *)obj;
stream_t *access = (stream_t *)obj;
size_t len = strlen (access->psz_location);
access_sys_t *sys = vlc_malloc(obj, sizeof(*sys) + len);
@ -73,7 +73,7 @@ static int Open (vlc_object_t *obj)
return VLC_SUCCESS;
}
static ssize_t Read (access_t *access, void *buf, size_t len)
static ssize_t Read (stream_t *access, void *buf, size_t len)
{
access_sys_t *sys = access->p_sys;
@ -86,7 +86,7 @@ static ssize_t Read (access_t *access, void *buf, size_t len)
return len;
}
static int Seek (access_t *access, uint64_t position)
static int Seek (stream_t *access, uint64_t position)
{
access_sys_t *sys = access->p_sys;
@ -97,7 +97,7 @@ static int Seek (access_t *access, uint64_t position)
return VLC_SUCCESS;
}
static int Control (access_t *access, int query, va_list args)
static int Control (stream_t *access, int query, va_list args)
{
access_sys_t *sys = access->p_sys;

View File

@ -76,11 +76,11 @@ vlc_module_end ()
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static ssize_t Read( access_t *, void *, size_t );
static int Seek( access_t *, uint64_t );
static int Control( access_t *, int, va_list );
static ssize_t Read( stream_t *, void *, size_t );
static int Seek( stream_t *, uint64_t );
static int Control( stream_t *, int, va_list );
static int DirRead( access_t *, input_item_node_t * );
static int DirRead( stream_t *, input_item_node_t * );
struct access_sys_t
{
@ -92,7 +92,7 @@ struct access_sys_t
char *psz_base_url;
};
static int AuthKeyAgent( access_t *p_access, const char *psz_username )
static int AuthKeyAgent( stream_t *p_access, const char *psz_username )
{
access_sys_t* p_sys = p_access->p_sys;
int i_result = VLC_EGENERIC;
@ -144,7 +144,7 @@ bailout:
}
static int AuthPublicKey( access_t *p_access, const char *psz_home, const char *psz_username )
static int AuthPublicKey( stream_t *p_access, const char *psz_home, const char *psz_username )
{
access_sys_t* p_sys = p_access->p_sys;
int i_result = VLC_EGENERIC;
@ -180,7 +180,7 @@ static int AuthPublicKey( access_t *p_access, const char *psz_home, const char *
*/
static int Open( vlc_object_t* p_this )
{
access_t* p_access = (access_t*)p_this;
stream_t* p_access = (stream_t*)p_this;
access_sys_t* p_sys;
vlc_url_t credential_url;
vlc_credential credential;
@ -439,7 +439,7 @@ error:
/* Close: quit the module */
static void Close( vlc_object_t* p_this )
{
access_t* p_access = (access_t*)p_this;
stream_t* p_access = (stream_t*)p_this;
access_sys_t* p_sys = p_access->p_sys;
if( p_sys->file )
@ -455,7 +455,7 @@ static void Close( vlc_object_t* p_this )
}
static ssize_t Read( access_t *p_access, void *buf, size_t len )
static ssize_t Read( stream_t *p_access, void *buf, size_t len )
{
access_sys_t *p_sys = p_access->p_sys;
@ -470,7 +470,7 @@ static ssize_t Read( access_t *p_access, void *buf, size_t len )
}
static int Seek( access_t* p_access, uint64_t i_pos )
static int Seek( stream_t* p_access, uint64_t i_pos )
{
access_sys_t *sys = p_access->p_sys;
@ -479,7 +479,7 @@ static int Seek( access_t* p_access, uint64_t i_pos )
}
static int Control( access_t* p_access, int i_query, va_list args )
static int Control( stream_t* p_access, int i_query, va_list args )
{
access_sys_t *sys = p_access->p_sys;
bool* pb_bool;
@ -530,7 +530,7 @@ static int Control( access_t* p_access, int i_query, va_list args )
* Directory access
*****************************************************************************/
static int DirRead (access_t *p_access, input_item_node_t *p_current_node)
static int DirRead (stream_t *p_access, input_item_node_t *p_current_node)
{
access_sys_t *p_sys = p_access->p_sys;
LIBSSH2_SFTP_ATTRIBUTES attrs;

View File

@ -80,11 +80,11 @@ vlc_module_end ()
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static ssize_t Read( access_t *, void *, size_t );
static int Seek( access_t *, uint64_t );
static int Control( access_t *, int, va_list );
static ssize_t Read( stream_t *, void *, size_t );
static int Seek( stream_t *, uint64_t );
static int Control( stream_t *, int, va_list );
#ifndef _WIN32
static int DirRead( access_t *, input_item_node_t * );
static int DirRead( stream_t *, input_item_node_t * );
#endif
struct access_sys_t
@ -95,7 +95,7 @@ struct access_sys_t
};
#ifdef _WIN32
static void Win32AddConnection( access_t *, const char *, const char *, const char *, const char *, const char * );
static void Win32AddConnection( stream_t *, const char *, const char *, const char *, const char *, const char * );
#else
static void smb_auth( const char *srv, const char *shr, char *wg, int wglen,
char *un, int unlen, char *pw, int pwlen )
@ -114,7 +114,7 @@ static void smb_auth( const char *srv, const char *shr, char *wg, int wglen,
/* Build an SMB URI
* smb://[[[domain;]user[:password@]]server[/share[/path[/file]]]] */
static int smb_get_uri( access_t *p_access, char **ppsz_uri,
static int smb_get_uri( stream_t *p_access, char **ppsz_uri,
const char *psz_domain,
const char *psz_user, const char *psz_pwd,
const char *psz_server, const char *psz_share_path,
@ -148,7 +148,7 @@ static int smb_get_uri( access_t *p_access, char **ppsz_uri,
****************************************************************************/
static int Open( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
access_sys_t *p_sys;
struct stat filestat;
vlc_url_t url;
@ -276,7 +276,7 @@ static int Open( vlc_object_t *p_this )
*****************************************************************************/
static void Close( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
access_sys_t *p_sys = p_access->p_sys;
vlc_UrlClean( &p_sys->url );
@ -292,7 +292,7 @@ static void Close( vlc_object_t *p_this )
/*****************************************************************************
* Seek: try to go at the right place
*****************************************************************************/
static int Seek( access_t *p_access, uint64_t i_pos )
static int Seek( stream_t *p_access, uint64_t i_pos )
{
access_sys_t *p_sys = p_access->p_sys;
int64_t i_ret;
@ -315,7 +315,7 @@ static int Seek( access_t *p_access, uint64_t i_pos )
/*****************************************************************************
* Read:
*****************************************************************************/
static ssize_t Read( access_t *p_access, void *p_buffer, size_t i_len )
static ssize_t Read( stream_t *p_access, void *p_buffer, size_t i_len )
{
access_sys_t *p_sys = p_access->p_sys;
int i_read;
@ -334,7 +334,7 @@ static ssize_t Read( access_t *p_access, void *p_buffer, size_t i_len )
/*****************************************************************************
* DirRead:
*****************************************************************************/
static int DirRead (access_t *p_access, input_item_node_t *p_node )
static int DirRead (stream_t *p_access, input_item_node_t *p_node )
{
access_sys_t *p_sys = p_access->p_sys;
struct smbc_dirent *p_entry;
@ -402,7 +402,7 @@ static int DirRead (access_t *p_access, input_item_node_t *p_node )
/*****************************************************************************
* Control:
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
static int Control( stream_t *p_access, int i_query, va_list args )
{
access_sys_t *sys = p_access->p_sys;
@ -441,7 +441,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
}
#ifdef _WIN32
static void Win32AddConnection( access_t *p_access, const char *psz_server,
static void Win32AddConnection( stream_t *p_access, const char *psz_server,
const char *psz_share, const char *psz_user,
const char *psz_pwd, const char *psz_domain )
{

View File

@ -33,12 +33,12 @@
#include <vlc_url.h>
#include <vlc_tls.h>
static ssize_t Read(access_t *access, void *buf, size_t len)
static ssize_t Read(stream_t *access, void *buf, size_t len)
{
return vlc_tls_Read(access->p_sys, buf, len, false);
}
static int Control( access_t *p_access, int i_query, va_list args )
static int Control( stream_t *p_access, int i_query, va_list args )
{
bool *pb_bool;
int64_t *pi_64;
@ -77,7 +77,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
static int Open(vlc_object_t *obj)
{
access_t *access = (access_t *)obj;
stream_t *access = (stream_t *)obj;
vlc_tls_t *sock;
vlc_url_t url;
@ -104,7 +104,7 @@ static int Open(vlc_object_t *obj)
static void Close( vlc_object_t *p_this )
{
access_t *access = (access_t *)p_this;
stream_t *access = (stream_t *)p_this;
vlc_tls_SessionDelete(access->p_sys);
}

View File

@ -86,15 +86,15 @@ struct access_sys_t
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static block_t *BlockUDP( access_t *, bool * );
static int Control( access_t *, int, va_list );
static block_t *BlockUDP( stream_t *, bool * );
static int Control( stream_t *, int, va_list );
/*****************************************************************************
* Open: open the socket
*****************************************************************************/
static int Open( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
access_sys_t *sys;
if( p_access->b_preparsing )
@ -182,7 +182,7 @@ static int Open( vlc_object_t *p_this )
*****************************************************************************/
static void Close( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
access_sys_t *sys = p_access->p_sys;
net_Close( sys->fd );
@ -191,7 +191,7 @@ static void Close( vlc_object_t *p_this )
/*****************************************************************************
* Control:
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
static int Control( stream_t *p_access, int i_query, va_list args )
{
bool *pb_bool;
int64_t *pi_64;
@ -221,7 +221,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
/*****************************************************************************
* BlockUDP:
*****************************************************************************/
static block_t *BlockUDP(access_t *access, bool *restrict eof)
static block_t *BlockUDP(stream_t *access, bool *restrict eof)
{
access_sys_t *sys = access->p_sys;

View File

@ -50,14 +50,14 @@ struct access_sys_t
vlc_v4l2_ctrl_t *controls;
};
static block_t *MMapBlock (access_t *, bool *);
static block_t *ReadBlock (access_t *, bool *);
static int AccessControl( access_t *, int, va_list );
static int InitVideo(access_t *, int, uint32_t);
static block_t *MMapBlock (stream_t *, bool *);
static block_t *ReadBlock (stream_t *, bool *);
static int AccessControl( stream_t *, int, va_list );
static int InitVideo(stream_t *, int, uint32_t);
int AccessOpen( vlc_object_t *obj )
{
access_t *access = (access_t *)obj;
stream_t *access = (stream_t *)obj;
if( access->b_preparsing )
return VLC_EGENERIC;
@ -95,7 +95,7 @@ error:
return VLC_EGENERIC;
}
int InitVideo (access_t *access, int fd, uint32_t caps)
int InitVideo (stream_t *access, int fd, uint32_t caps)
{
access_sys_t *sys = access->p_sys;
@ -187,7 +187,7 @@ int InitVideo (access_t *access, int fd, uint32_t caps)
void AccessClose( vlc_object_t *obj )
{
access_t *access = (access_t *)obj;
stream_t *access = (stream_t *)obj;
access_sys_t *sys = access->p_sys;
if (sys->bufv != NULL)
@ -198,7 +198,7 @@ void AccessClose( vlc_object_t *obj )
}
/* Wait for data */
static int AccessPoll (access_t *access)
static int AccessPoll (stream_t *access)
{
access_sys_t *sys = access->p_sys;
struct pollfd ufd;
@ -210,7 +210,7 @@ static int AccessPoll (access_t *access)
}
static block_t *MMapBlock (access_t *access, bool *restrict eof)
static block_t *MMapBlock (stream_t *access, bool *restrict eof)
{
access_sys_t *sys = access->p_sys;
@ -227,7 +227,7 @@ static block_t *MMapBlock (access_t *access, bool *restrict eof)
return block;
}
static block_t *ReadBlock (access_t *access, bool *restrict eof)
static block_t *ReadBlock (stream_t *access, bool *restrict eof)
{
access_sys_t *sys = access->p_sys;
@ -251,7 +251,7 @@ static block_t *ReadBlock (access_t *access, bool *restrict eof)
return block;
}
static int AccessControl( access_t *access, int query, va_list args )
static int AccessControl( stream_t *access, int query, va_list args )
{
switch( query )
{

View File

@ -82,17 +82,17 @@ struct access_sys_t
int *p_sectors; /* Track sectors */
};
static block_t *Block( access_t *, bool * );
static int Seek( access_t *, uint64_t );
static int Control( access_t *, int, va_list );
static int EntryPoints( access_t * );
static block_t *Block( stream_t *, bool * );
static int Seek( stream_t *, uint64_t );
static int Control( stream_t *, int, va_list );
static int EntryPoints( stream_t * );
/*****************************************************************************
* VCDOpen: open vcd
*****************************************************************************/
static int Open( vlc_object_t *p_this )
{
access_t *p_access = (access_t *)p_this;
stream_t *p_access = (stream_t *)p_this;
access_sys_t *p_sys;
if( p_access->psz_filepath == NULL )
return VLC_EGENERIC;
@ -215,7 +215,7 @@ error:
*****************************************************************************/
static void Close( vlc_object_t *p_this )
{
access_t *p_access = (access_t *)p_this;
stream_t *p_access = (stream_t *)p_this;
access_sys_t *p_sys = p_access->p_sys;
for( size_t i = 0; i < ARRAY_SIZE(p_sys->titles); i++ )
@ -228,7 +228,7 @@ static void Close( vlc_object_t *p_this )
/*****************************************************************************
* Control:
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
static int Control( stream_t *p_access, int i_query, va_list args )
{
access_sys_t *p_sys = p_access->p_sys;
input_title_t ***ppp_title;
@ -328,7 +328,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
/*****************************************************************************
* Block:
*****************************************************************************/
static block_t *Block( access_t *p_access, bool *restrict eof )
static block_t *Block( stream_t *p_access, bool *restrict eof )
{
access_sys_t *p_sys = p_access->p_sys;
int i_blocks = VCD_BLOCKS_ONCE;
@ -400,7 +400,7 @@ static block_t *Block( access_t *p_access, bool *restrict eof )
/*****************************************************************************
* Seek:
*****************************************************************************/
static int Seek( access_t *p_access, uint64_t i_pos )
static int Seek( stream_t *p_access, uint64_t i_pos )
{
access_sys_t *p_sys = p_access->p_sys;
int i_title = p_sys->i_current_title;
@ -430,7 +430,7 @@ static int Seek( access_t *p_access, uint64_t i_pos )
/*****************************************************************************
* EntryPoints: Reads the information about the entry points on the disc.
*****************************************************************************/
static int EntryPoints( access_t *p_access )
static int EntryPoints( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
uint8_t sector[VCD_DATA_SIZE];

View File

@ -134,20 +134,20 @@ struct access_sys_t
#define FILE_SIZE(pos) ARRAY_VAL(p_sys->file_sizes, pos)
#define FILE_COUNT (unsigned)p_sys->file_sizes.i_size
static int Control( access_t *, int, va_list );
static ssize_t Read( access_t *p_access, void *p_buffer, size_t i_len );
static int Seek( access_t *p_access, uint64_t i_pos);
static void FindSeekpoint( access_t *p_access );
static bool ScanDirectory( access_t *p_access );
static char *GetFilePath( access_t *p_access, unsigned i_file );
static bool ImportNextFile( access_t *p_access );
static bool SwitchFile( access_t *p_access, unsigned i_file );
static int Control( stream_t *, int, va_list );
static ssize_t Read( stream_t *p_access, void *p_buffer, size_t i_len );
static int Seek( stream_t *p_access, uint64_t i_pos);
static void FindSeekpoint( stream_t *p_access );
static bool ScanDirectory( stream_t *p_access );
static char *GetFilePath( stream_t *p_access, unsigned i_file );
static bool ImportNextFile( stream_t *p_access );
static bool SwitchFile( stream_t *p_access, unsigned i_file );
static void OptimizeForRead( int fd );
static void UpdateFileSize( access_t *p_access );
static FILE *OpenRelativeFile( access_t *p_access, const char *psz_file );
static void UpdateFileSize( stream_t *p_access );
static FILE *OpenRelativeFile( stream_t *p_access, const char *psz_file );
static bool ReadLine( char **ppsz_line, size_t *pi_size, FILE *p_file );
static void ImportMeta( access_t *p_access );
static void ImportMarks( access_t *p_access );
static void ImportMeta( stream_t *p_access );
static void ImportMarks( stream_t *p_access );
static bool ReadIndexRecord( FILE *p_file, bool b_ts, int64_t i_frame,
uint64_t *pi_offset, uint16_t *pi_file_num );
static int64_t ParseFrameNumber( const char *psz_line, float fps );
@ -158,7 +158,7 @@ static const char *BaseName( const char *psz_path );
*****************************************************************************/
static int Open( vlc_object_t *p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
if( !p_access->psz_filepath )
return VLC_EGENERIC;
@ -216,7 +216,7 @@ static int Open( vlc_object_t *p_this )
*****************************************************************************/
static void Close( vlc_object_t * p_this )
{
access_t *p_access = (access_t*)p_this;
stream_t *p_access = (stream_t*)p_this;
access_sys_t *p_sys = p_access->p_sys;
if( p_sys->fd != -1 )
@ -234,7 +234,7 @@ static void Close( vlc_object_t * p_this )
/*****************************************************************************
* Determine format and import files
*****************************************************************************/
static bool ScanDirectory( access_t *p_access )
static bool ScanDirectory( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
@ -263,7 +263,7 @@ static bool ScanDirectory( access_t *p_access )
/*****************************************************************************
* Control input stream
*****************************************************************************/
static int Control( access_t *p_access, int i_query, va_list args )
static int Control( stream_t *p_access, int i_query, va_list args )
{
access_sys_t *p_sys = p_access->p_sys;
input_title_t ***ppp_title;
@ -341,7 +341,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
/*****************************************************************************
* Read and concatenate files
*****************************************************************************/
static ssize_t Read( access_t *p_access, void *p_buffer, size_t i_len )
static ssize_t Read( stream_t *p_access, void *p_buffer, size_t i_len )
{
access_sys_t *p_sys = p_access->p_sys;
@ -388,7 +388,7 @@ static ssize_t Read( access_t *p_access, void *p_buffer, size_t i_len )
/*****************************************************************************
* Seek to a specific location in a file
*****************************************************************************/
static int Seek( access_t *p_access, uint64_t i_pos )
static int Seek( stream_t *p_access, uint64_t i_pos )
{
access_sys_t *p_sys = p_access->p_sys;
@ -419,7 +419,7 @@ static int Seek( access_t *p_access, uint64_t i_pos )
/*****************************************************************************
* Change the chapter index to match the current position
*****************************************************************************/
static void FindSeekpoint( access_t *p_access )
static void FindSeekpoint( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
if( !p_sys->p_marks )
@ -445,7 +445,7 @@ static void FindSeekpoint( access_t *p_access )
/*****************************************************************************
* Returns the path of a certain part
*****************************************************************************/
static char *GetFilePath( access_t *p_access, unsigned i_file )
static char *GetFilePath( stream_t *p_access, unsigned i_file )
{
access_sys_t *sys = p_access->p_sys;
char *psz_path;
@ -461,7 +461,7 @@ static char *GetFilePath( access_t *p_access, unsigned i_file )
/*****************************************************************************
* Check if another part exists and import it
*****************************************************************************/
static bool ImportNextFile( access_t *p_access )
static bool ImportNextFile( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
@ -495,7 +495,7 @@ static bool ImportNextFile( access_t *p_access )
/*****************************************************************************
* Close the current file and open another
*****************************************************************************/
static bool SwitchFile( access_t *p_access, unsigned i_file )
static bool SwitchFile( stream_t *p_access, unsigned i_file )
{
access_sys_t *p_sys = p_access->p_sys;
@ -576,7 +576,7 @@ static void OptimizeForRead( int fd )
/*****************************************************************************
* Fix size if the (last) part is still growing
*****************************************************************************/
static void UpdateFileSize( access_t *p_access )
static void UpdateFileSize( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
struct stat st;
@ -598,7 +598,7 @@ static void UpdateFileSize( access_t *p_access )
/*****************************************************************************
* Open file relative to base directory for reading.
*****************************************************************************/
static FILE *OpenRelativeFile( access_t *p_access, const char *psz_file )
static FILE *OpenRelativeFile( stream_t *p_access, const char *psz_file )
{
access_sys_t *sys = p_access->p_sys;
@ -642,7 +642,7 @@ static bool ReadLine( char **ppsz_line, size_t *pi_size, FILE *p_file )
/*****************************************************************************
* Import meta data
*****************************************************************************/
static void ImportMeta( access_t *p_access )
static void ImportMeta( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
@ -785,7 +785,7 @@ static void ImportMeta( access_t *p_access )
/*****************************************************************************
* Import cut marks and convert them to seekpoints (chapters).
*****************************************************************************/
static void ImportMarks( access_t *p_access )
static void ImportMarks( stream_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;

View File

@ -252,7 +252,7 @@ public:
}
private:
access_t* m_stream;
stream_t* m_stream;
int64_t m_previousPos;
};
#endif /* TAGLIB_VERSION_1_11 */

View File

@ -971,7 +971,7 @@ int Upnp_i11e_cb::run( Upnp_EventType eventType, void *p_event, void *p_cookie )
return 0;
}
MediaServer::MediaServer( access_t *p_access, input_item_node_t *node )
MediaServer::MediaServer( stream_t *p_access, input_item_node_t *node )
: m_psz_objectId( NULL )
, m_access( p_access )
, m_node( node )
@ -1250,7 +1250,7 @@ bool MediaServer::fetchContents()
return true;
}
static int ReadDirectory( access_t *p_access, input_item_node_t* p_node )
static int ReadDirectory( stream_t *p_access, input_item_node_t* p_node )
{
MediaServer server( p_access, p_node );
@ -1261,7 +1261,7 @@ static int ReadDirectory( access_t *p_access, input_item_node_t* p_node )
static int Open( vlc_object_t *p_this )
{
access_t* p_access = (access_t*)p_this;
stream_t* p_access = (stream_t*)p_this;
access_sys_t* p_sys = new(std::nothrow) access_sys_t;
if ( unlikely( !p_sys ) )
return VLC_ENOMEM;
@ -1282,7 +1282,7 @@ static int Open( vlc_object_t *p_this )
static void Close( vlc_object_t* p_this )
{
access_t* p_access = (access_t*)p_this;
stream_t* p_access = (stream_t*)p_this;
access_sys_t *sys = (access_sys_t *)p_access->p_sys;
sys->p_upnp->release( false );

View File

@ -139,7 +139,7 @@ private:
class MediaServer
{
public:
MediaServer( access_t* p_access, input_item_node_t* node );
MediaServer( stream_t* p_access, input_item_node_t* node );
~MediaServer();
bool fetchContents();
@ -157,7 +157,7 @@ private:
private:
char* m_psz_root;
char* m_psz_objectId;
access_t* m_access;
stream_t* m_access;
input_item_node_t* m_node;
};

View File

@ -70,7 +70,7 @@ static void vlc_access_Destroy(stream_t *access)
/*****************************************************************************
* access_New:
*****************************************************************************/
static access_t *access_New(vlc_object_t *parent, input_thread_t *input,
static stream_t *access_New(vlc_object_t *parent, input_thread_t *input,
bool preparsing, const char *mrl)
{
char *redirv[MAX_REDIR];
@ -147,7 +147,7 @@ error:
return NULL;
}
access_t *vlc_access_NewMRL(vlc_object_t *parent, const char *mrl)
stream_t *vlc_access_NewMRL(vlc_object_t *parent, const char *mrl)
{
return access_New(parent, NULL, false, mrl);
}
@ -155,7 +155,7 @@ access_t *vlc_access_NewMRL(vlc_object_t *parent, const char *mrl)
/*****************************************************************************
* access_vaDirectoryControlHelper:
*****************************************************************************/
int access_vaDirectoryControlHelper( access_t *p_access, int i_query, va_list args )
int access_vaDirectoryControlHelper( stream_t *p_access, int i_query, va_list args )
{
VLC_UNUSED( p_access );
@ -187,7 +187,7 @@ static int AStreamNoReadDir(stream_t *s, input_item_node_t *p_node)
/* Block access */
static block_t *AStreamReadBlock(stream_t *s, bool *restrict eof)
{
access_t *access = s->p_sys;
stream_t *access = s->p_sys;
input_thread_t *input = s->p_input;
block_t * block;
@ -219,7 +219,7 @@ static block_t *AStreamReadBlock(stream_t *s, bool *restrict eof)
/* Read access */
static ssize_t AStreamReadStream(stream_t *s, void *buf, size_t len)
{
access_t *access = s->p_sys;
stream_t *access = s->p_sys;
input_thread_t *input = s->p_input;
if (vlc_stream_Eof(access))
@ -246,7 +246,7 @@ static ssize_t AStreamReadStream(stream_t *s, void *buf, size_t len)
/* Directory */
static int AStreamReadDir(stream_t *s, input_item_node_t *p_node)
{
access_t *access = s->p_sys;
stream_t *access = s->p_sys;
return access->pf_readdir(access, p_node);
}
@ -254,21 +254,21 @@ static int AStreamReadDir(stream_t *s, input_item_node_t *p_node)
/* Common */
static int AStreamSeek(stream_t *s, uint64_t offset)
{
access_t *access = s->p_sys;
stream_t *access = s->p_sys;
return vlc_stream_Seek(access, offset);
}
static int AStreamControl(stream_t *s, int cmd, va_list args)
{
access_t *access = s->p_sys;
stream_t *access = s->p_sys;
return vlc_stream_vaControl(access, cmd, args);
}
static void AStreamDestroy(stream_t *s)
{
access_t *access = s->p_sys;
stream_t *access = s->p_sys;
vlc_stream_Delete(access);
}
@ -280,7 +280,7 @@ stream_t *stream_AccessNew(vlc_object_t *parent, input_thread_t *input,
if (unlikely(s == NULL))
return NULL;
access_t *access = access_New(VLC_OBJECT(s), input, preparsing, url);
stream_t *access = access_New(VLC_OBJECT(s), input, preparsing, url);
if (access == NULL)
{
stream_CommonDelete(s);
@ -629,7 +629,7 @@ static void fsdir_attach_slaves(struct access_fsdir *p_fsdir)
}
void access_fsdir_init(struct access_fsdir *p_fsdir,
access_t *p_access, input_item_node_t *p_node)
stream_t *p_access, input_item_node_t *p_node)
{
p_fsdir->p_node = p_node;
p_fsdir->b_show_hiddenfiles = var_InheritBool(p_access, "show-hiddenfiles");

View File

@ -32,7 +32,7 @@
void stream_CommonDelete( stream_t *s );
/**
* This function creates a stream_t with an access_t back-end.
* This function creates a raw stream_t from an URL.
*/
stream_t *stream_AccessNew(vlc_object_t *, input_thread_t *, bool, const char *);