VLC 4.0.0-dev
|
If a stream can be viewed as a directory, such as when opening a compressed archive, a stream-extractor is used to get access to the entities inside said stream. More...
Modules | |
Stream Extractor Internals | |
Data Structures | |
struct | stream_extractor_t |
struct | stream_directory_t |
Macros | |
#define | vlc_stream_NewMRL(a, b) vlc_stream_NewMRL(VLC_OBJECT(a), b) |
Typedefs | |
typedef struct stream_extractor_t | stream_extractor_t |
typedef struct stream_directory_t | stream_directory_t |
Functions | |
stream_t * | vlc_stream_NewMRL (vlc_object_t *obj, const char *mrl) |
Create a stream for the data referred to by a Media Resource Locator (MRL). | |
char * | vlc_stream_extractor_CreateMRL (stream_directory_t *extractor, char const *subentry, char const **volumes, size_t volumes_count) |
Create a relative MRL for the associated entity. | |
Attach a stream-extractor to the passed stream | ||||||||||||||||
These functions are used to attach a stream extractor to an already existing stream. As hinted by their names, vlc_stream_extractor_Attach will attach an entity-extractor, whereas vlc_stream_directory_Attach will attach a stream-directory.
| ||||||||||||||||
int | vlc_stream_extractor_Attach (stream_t **source, char const *identifier, char const *module_name, const char **volumes, size_t volumes_count) | |||||||||||||||
int | vlc_stream_directory_Attach (stream_t **source, char const *module_name, const char **volumes, size_t volumes_count) | |||||||||||||||
If a stream can be viewed as a directory, such as when opening a compressed archive, a stream-extractor is used to get access to the entities inside said stream.
A stream-extractor can do one of two things;
#define vlc_stream_NewMRL | ( | a, | |
b | |||
) | vlc_stream_NewMRL(VLC_OBJECT(a), b) |
typedef struct stream_directory_t stream_directory_t |
typedef struct stream_extractor_t stream_extractor_t |
int vlc_stream_directory_Attach | ( | stream_t ** | source, |
char const * | module_name, | ||
const char ** | volumes, | ||
size_t | volumes_count | ||
) |
References stream_extractor_private::source, and StreamExtractorAttach().
Referenced by InputStreamHandleAnchor().
int vlc_stream_extractor_Attach | ( | stream_t ** | source, |
char const * | identifier, | ||
char const * | module_name, | ||
const char ** | volumes, | ||
size_t | volumes_count | ||
) |
References stream_extractor_private::source, and StreamExtractorAttach().
Referenced by stream_extractor_AttachParsed().
char * vlc_stream_extractor_CreateMRL | ( | stream_directory_t * | extractor, |
char const * | subentry, | ||
char const ** | volumes, | ||
size_t | volumes_count | ||
) |
Create a relative MRL for the associated entity.
This function shall be used by stream_directory_t's in order to generate an MRL that refers to an entity within the stream. Normally this function will only be invoked within pf_readdir
in order to get the virtual path of the listed items.
extractor | the stream_directory_t for which the entity belongs |
subentry | the name of the entity in question |
volumes | media additional volumes MRLs |
volumes_count | number of additional volumes |
References stream_extractor_private::directory, stream_t::psz_url, stream_directory_t::source, and StreamExtractorCreateMRL().
stream_t * vlc_stream_NewMRL | ( | vlc_object_t * | obj, |
const char * | mrl | ||
) |
Create a stream for the data referred to by a Media Resource Locator (MRL).
This function will create a Stream that reads from the specified Media Resource Locator (MRL), potentially making use of Stream Extractors to access named entities within the data read from the original source.
obj | the owner of the requested stream |
mrl | the mrl for which the stream_t should be created |
NULL
on error, a pointer to stream_t on success. References mrl_info::extra, mrl_FragmentSplit(), mrl_info_Clean(), mrl_info_Init(), msg_Err, msg_Warn, stream_extractor_AttachParsed(), vlc_stream_Delete(), and vlc_stream_NewURL.