VLC
4.0.0-dev
include
vlc_access.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* vlc_access.h: Access descriptor, queries and methods
3
*****************************************************************************
4
* Copyright (C) 1999-2006 VLC authors and VideoLAN
5
*
6
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
7
*
8
* This program is free software; you can redistribute it and/or modify it
9
* under the terms of the GNU Lesser General Public License as published by
10
* the Free Software Foundation; either version 2.1 of the License, or
11
* (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU Lesser General Public License for more details.
17
*
18
* You should have received a copy of the GNU Lesser General Public License
19
* along with this program; if not, write to the Free Software Foundation,
20
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21
*****************************************************************************/
22
23
#ifndef VLC_ACCESS_H
24
#define VLC_ACCESS_H 1
25
26
#include <
vlc_stream.h
>
27
28
/**
29
* \defgroup access Access
30
* \ingroup stream
31
* Raw input byte streams
32
* @{
33
* \file
34
* Input byte stream modules interface
35
*/
36
37
/**
38
* Special redirection error code.
39
*
40
* In case of redirection, the access open function should clean up (as in
41
* normal failure case), store the heap-allocated redirection URL in
42
* stream_t.psz_url, and return this value.
43
*/
44
#define VLC_ACCESS_REDIRECT VLC_ETIMEOUT
45
46
/**
47
* Opens a new read-only byte stream.
48
*
49
* This function might block.
50
* The initial offset is of course always zero.
51
*
52
* \param obj parent VLC object
53
* \param mrl media resource location to read
54
* \return a new access object on success, NULL on failure
55
*/
56
VLC_API
stream_t
*
vlc_access_NewMRL
(
vlc_object_t
*obj,
const
char
*mrl);
57
58
/**
59
* \defgroup access_helper Access Helpers
60
* @{
61
*/
62
63
/**
64
* Default pf_control callback for directory accesses.
65
*/
66
VLC_API
int
access_vaDirectoryControlHelper
(
stream_t
*p_access,
int
i_query, va_list args );
67
68
#define ACCESS_SET_CALLBACKS( read, block, control, seek ) \
69
do { \
70
p_access->pf_read = (read); \
71
p_access->pf_block = (block); \
72
p_access->pf_control = (control); \
73
p_access->pf_seek = (seek); \
74
} while(0)
75
76
/**
77
* @} @}
78
*/
79
80
#endif
VLC_API
#define VLC_API
Definition:
fourcc_gen.c:31
vlc_common.h
access_vaDirectoryControlHelper
VLC_EXPORT int access_vaDirectoryControlHelper(stream_t *p_access, int i_query, va_list args)
Default pf_control callback for directory accesses.
Definition:
access.c:196
vlc_access_NewMRL
VLC_EXPORT stream_t * vlc_access_NewMRL(vlc_object_t *obj, const char *mrl)
Opens a new read-only byte stream.
Definition:
access.c:188
stream_t
stream_t definition
Definition:
vlc_stream.h:46
vlc_object_t
VLC object common members.
Definition:
vlc_objects.h:43
vlc_stream.h
Generated by
1.8.17