VLC 4.0.0-dev
|
Files | |
file | stream_extractor.c |
Data Structures | |
struct | stream_extractor_private |
Functions | |
int | stream_extractor_AttachParsed (stream_t **stream, const struct mrl_info *) |
Attach Stream Extractors according to specified data. | |
static char * | StreamExtractorCreateMRL (char const *base, char const *subentry, char const **volumes, size_t volumes_count) |
Create an MRL for a specific sub-entry. | |
static void | se_Release (struct stream_extractor_private *priv) |
Release the private data associated with a stream-extractor. | |
static int | se_AttachWrapper (struct stream_extractor_private *priv, stream_t *source) |
Create the public stream_t that wraps a stream-extractor. | |
static int | StreamExtractorAttach (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) |
int | vlc_stream_extractor_Attach (stream_t **source, char const *identifier, char const *module_name, const char **volumes, size_t volumes_count) |
char * | vlc_stream_extractor_CreateMRL (stream_directory_t *directory, char const *subentry, char const **volumes, size_t volumes_count) |
Create a relative MRL for the associated entity. | |
Callbacks to forward work to the underlying stream-extractor | |
static void | se_StreamDelete (stream_t *stream) |
static ssize_t | se_StreamRead (stream_t *stream, void *buf, size_t len) |
static block_t * | se_StreamBlock (stream_t *stream, bool *restrict eof) |
static int | se_StreamSeek (stream_t *stream, uint64_t offset) |
static int | se_ReadDir (stream_t *stream, input_item_node_t *node) |
static int | se_StreamControl (stream_t *stream, int req, va_list args) |
static int | se_DirControl (stream_t *stream, int req, va_list args) |
stream-extractor resource handlers | |
static int | se_InitStream (struct stream_extractor_private *priv, stream_t *s) |
static void | se_CleanStreamExtractor (struct stream_extractor_private *priv) |
static void | se_CleanStreamDirectory (struct stream_extractor_private *priv) |
static int | se_InitDirectory (struct stream_extractor_private *priv, stream_t *s) |
|
static |
Create the public stream_t that wraps a stream-extractor.
This initializes the relevant data-members of the public stream_t which is used to read from the underlying stream-extractor.
priv | the private section of the stream_extractor_t |
source | the source stream which the stream_extractor_t should will read from |
References stream_t::p_input_item, stream_t::p_sys, stream_extractor_private::pf_init, se_StreamDelete(), stream_extractor_private::source, stream_CommonDelete(), stream_FilterChainNew(), unlikely, VLC_EGENERIC, VLC_ENOMEM, vlc_object_parent, vlc_stream_CommonNew(), VLC_SUCCESS, and stream_extractor_private::wrapper.
Referenced by StreamExtractorAttach().
|
static |
References stream_extractor_private::directory, stream_directory_t::volumes, and stream_directory_t::volumes_count.
Referenced by StreamExtractorAttach().
|
static |
References stream_extractor_private::extractor, stream_extractor_t::identifier, stream_extractor_t::volumes, and stream_extractor_t::volumes_count.
Referenced by StreamExtractorAttach().
|
static |
References VLC_EGENERIC.
Referenced by se_InitDirectory().
|
static |
References stream_extractor_private::directory, stream_t::pf_control, stream_t::pf_readdir, stream_t::psz_url, se_DirControl(), se_ReadDir(), stream_directory_t::source, strdup(), unlikely, VLC_EGENERIC, and VLC_SUCCESS.
Referenced by StreamExtractorAttach().
|
static |
References stream_extractor_private::extractor, stream_extractor_t::identifier, stream_t::pf_block, stream_t::pf_control, stream_t::pf_read, stream_extractor_t::pf_read, stream_t::pf_seek, stream_t::psz_url, se_StreamBlock(), se_StreamControl(), se_StreamRead(), se_StreamSeek(), stream_extractor_t::source, StreamExtractorCreateMRL(), unlikely, VLC_ENOMEM, VLC_SUCCESS, stream_extractor_t::volumes, and stream_extractor_t::volumes_count.
Referenced by StreamExtractorAttach().
|
static |
References stream_extractor_private::directory, stream_t::p_sys, and stream_directory_t::pf_readdir.
Referenced by se_InitDirectory().
|
static |
Release the private data associated with a stream-extractor.
priv | pointer to the private section |
References module_unneed, stream_extractor_private::object, stream_extractor_private::pf_clean, stream_extractor_private::source, vlc_object_delete, and vlc_stream_Delete().
Referenced by se_StreamDelete(), and StreamExtractorAttach().
References stream_extractor_private::extractor, stream_t::p_sys, and stream_extractor_t::pf_block.
Referenced by se_InitStream().
|
static |
References stream_extractor_private::extractor, stream_t::p_sys, and stream_extractor_t::pf_control.
Referenced by se_InitStream().
|
static |
References se_Release(), and vlc_memstream::stream.
Referenced by se_AttachWrapper().
|
static |
References stream_extractor_private::extractor, stream_t::p_sys, and stream_extractor_t::pf_read.
Referenced by se_InitStream().
|
static |
References stream_extractor_private::extractor, stream_t::p_sys, and stream_extractor_t::pf_seek.
Referenced by se_InitStream().
Attach Stream Extractors according to specified data.
This function will parse the passed data, and try to attach a Stream Extractor for each specified entity as per the fragment specification associated with a Media Resource Locator (MRL),
*stream
can be modified even if this function only locates some of the entities specified in psz_data
. It is up to the caller to free the resource referred to by *stream
, no matter what this function returns.psz_data
, something which is not guaranteed.[out] | stream | a pointer-to-pointer to stream where the attached stream-extractor will be applied. *stream will refer to the last successful attachment. |
data | the fragment data string to parse. | |
[out] | out_extra | *out_extra will point to any additional data in psz_data that does not specify an entity (if any). |
References count, vlc_array_t::i_count, mrl_info::identifiers, vlc_array_t::pp_elems, stream_extractor_private::source, vlc_array_count(), vlc_array_item_at_index, VLC_EGENERIC, vlc_stream_extractor_Attach(), VLC_SUCCESS, and mrl_info::volumes.
Referenced by InputStreamHandleAnchor(), and vlc_stream_NewMRL().
|
static |
References stream_extractor_private::directory, stream_extractor_private::extractor, stream_extractor_t::identifier, module_need, stream_extractor_private::object, stream_extractor_private::pf_clean, stream_extractor_private::pf_init, se_AttachWrapper(), se_CleanStreamDirectory(), se_CleanStreamExtractor(), se_InitDirectory(), se_InitStream(), se_Release(), stream_extractor_t::source, stream_directory_t::source, stream_extractor_private::source, strdup(), unlikely, vlc_custom_create, VLC_EGENERIC, VLC_ENOMEM, VLC_OBJECT, vlc_object_parent, VLC_SUCCESS, stream_extractor_t::volumes, stream_directory_t::volumes, stream_extractor_t::volumes_count, stream_directory_t::volumes_count, and stream_extractor_private::wrapper.
Referenced by vlc_stream_directory_Attach(), and vlc_stream_extractor_Attach().
|
static |
Create an MRL for a specific sub-entry.
This internal function is used to create an MRL that refers to subentry
within base
, see MRL helpers for further information.
References mrl_EscapeFragmentIdentifier(), vlc_memstream::ptr, vlc_memstream_close(), vlc_memstream_open(), vlc_memstream_putc(), and vlc_memstream_puts().
Referenced by se_InitStream(), and vlc_stream_extractor_CreateMRL().
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().