|
VLC
2.1.0-git
|
This will allow you to easily handle read/seek in demuxer modules. More...
Data Structures | |
| struct | stream_t |
| stream_t definition More... | |
Macros | |
| #define | stream_MemoryNew(a, b, c, d) stream_MemoryNew( VLC_OBJECT(a), b, c, d ) |
| #define | stream_UrlNew(a, b) stream_UrlNew( VLC_OBJECT(a), b ) |
Typedefs | |
| typedef struct stream_text_t | stream_text_t |
Enumerations | |
| enum | stream_query_e { STREAM_CAN_SEEK, STREAM_CAN_FASTSEEK, STREAM_SET_POSITION, STREAM_GET_POSITION, STREAM_GET_SIZE, STREAM_CONTROL_ACCESS, STREAM_UPDATE_SIZE, STREAM_GET_CONTENT_TYPE, STREAM_SET_RECORD_STATE } |
| Possible commands to send to stream_Control() and stream_vaControl() More... | |
Functions | |
| int | stream_Read (stream_t *s, void *p_read, int i_read) |
| Try to read "i_read" bytes into a buffer pointed by "p_read". | |
| int | stream_Peek (stream_t *s, const uint8_t **pp_peek, int i_peek) |
| Store in pp_peek a pointer to the next "i_peek" bytes in the stream. | |
| int | stream_vaControl (stream_t *s, int i_query, va_list args) |
| Use to control the "stream_t *". | |
| void | stream_Delete (stream_t *s) |
| Destroy a stream. | |
| int | stream_Control (stream_t *s, int i_query,...) |
| block_t * | stream_Block (stream_t *s, int i_size) |
| Read "i_size" bytes and store them in a block_t. | |
| block_t * | stream_BlockRemaining (stream_t *s, int i_max_size) |
| Read the remaining of the data if there is less than i_max_size bytes, otherwise return NULL. | |
| char * | stream_ReadLine (stream_t *) |
| static int64_t | stream_Tell (stream_t *s) |
| Get the current position in a stream. | |
| static int64_t | stream_Size (stream_t *s) |
| Get the size of the stream. | |
| static int | stream_Seek (stream_t *s, uint64_t i_pos) |
| static char * | stream_ContentType (stream_t *s) |
| Get the Content-Type of a stream, or NULL if unknown. | |
| stream_t * | stream_DemuxNew (demux_t *p_demux, const char *psz_demux, es_out_t *out) |
| Create a special stream and a demuxer, this allows chaining demuxers You must delete it using stream_Delete. | |
| void | stream_DemuxSend (stream_t *s, block_t *p_block) |
| Send data to a stream handle created by stream_DemuxNew(). | |
| int | stream_DemuxControlVa (stream_t *s, int, va_list) |
| Perform a demux (i.e. | |
| static int | stream_DemuxControl (stream_t *s, int query,...) |
| stream_t * | stream_MemoryNew (vlc_object_t *p_obj, uint8_t *p_buffer, uint64_t i_size, bool b_preserve_memory) |
| Create a stream_t reading from memory. | |
| stream_t * | stream_UrlNew (vlc_object_t *p_this, const char *psz_url) |
| Create a stream_t reading from a URL. | |
| stream_t * | stream_FilterNew (stream_t *p_source, const char *psz_stream_filter) |
| Try to add a stream filter to an open stream. | |
This will allow you to easily handle read/seek in demuxer modules.
| #define stream_MemoryNew | ( | a, | |
| b, | |||
| c, | |||
| d | |||
| ) | stream_MemoryNew( VLC_OBJECT(a), b, c, d ) |
| #define stream_UrlNew | ( | a, | |
| b | |||
| ) | stream_UrlNew( VLC_OBJECT(a), b ) |
Referenced by DownloadArt(), and ImageReadUrl().
| typedef struct stream_text_t stream_text_t |
| enum stream_query_e |
Possible commands to send to stream_Control() and stream_vaControl()
Read "i_size" bytes and store them in a block_t.
It always read i_size bytes unless you are at the end of the stream where it return what is available.
References block_Alloc(), block_Release(), block_t::i_buffer, block_t::p_buffer, and stream_Read().
Read the remaining of the data if there is less than i_max_size bytes, otherwise return NULL.
The stream position is unknown after the call.
References block_Alloc(), block_Realloc(), block_t::i_buffer, msg_Err, block_t::p_buffer, stream_Read(), stream_Size(), and stream_Tell().
|
inlinestatic |
Get the Content-Type of a stream, or NULL if unknown.
Result must be free()'d.
References stream_Control(), and STREAM_GET_CONTENT_TYPE.
| int stream_Control | ( | stream_t * | s, |
| int | i_query, | ||
| ... | |||
| ) |
< Unspecified error
References stream_t::pf_control, and VLC_EGENERIC.
Referenced by Control(), ImageReadUrl(), stream_ContentType(), stream_Seek(), stream_Size(), stream_Tell(), and UpdateTitleSeekpointFromAccess().
| void stream_Delete | ( | stream_t * | s | ) |
Destroy a stream.
References stream_t::pf_destroy.
Referenced by DownloadArt(), ImageReadUrl(), InputSourceClean(), InputSourceInit(), and StreamDelete().
|
inlinestatic |
References stream_DemuxControlVa().
| int stream_DemuxControlVa | ( | stream_t * | s, |
| int | , | ||
| va_list | |||
| ) |
Perform a demux (i.e.
DEMUX_...) control request on a stream handle created by stream_DemuxNew().
< Unspecified error
< No error
References DEMUX_GET_LENGTH, DEMUX_GET_POSITION, DEMUX_GET_TIME, stream_sys_t::length, stream_sys_t::lock, stream_t::p_sys, stream_sys_t::position, stream_sys_t::stats, stream_sys_t::time, VLC_EGENERIC, vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_SUCCESS.
Referenced by stream_DemuxControl().
Create a special stream and a demuxer, this allows chaining demuxers You must delete it using stream_Delete.
References block_FifoNew(), block_FifoRelease(), DStreamControl(), DStreamDelete(), DStreamPeek(), DStreamRead(), DStreamThread(), stream_sys_t::i_pos, stream_sys_t::length, stream_sys_t::lock, stream_sys_t::out, stream_sys_t::p_block, stream_sys_t::p_fifo, demux_t::p_input, stream_t::p_input, stream_t::p_sys, stream_t::pf_control, stream_t::pf_destroy, stream_t::pf_peek, stream_t::pf_read, stream_sys_t::position, stream_sys_t::psz_name, stream_t::psz_path, stream_sys_t::stats, strdup(), stream_CommonDelete(), stream_CommonNew(), stream_sys_t::thread, stream_sys_t::time, vlc_clone(), vlc_mutex_destroy(), vlc_mutex_init(), VLC_OBJECT, and VLC_THREAD_PRIORITY_INPUT.
Send data to a stream handle created by stream_DemuxNew().
References block_FifoPut(), stream_sys_t::p_fifo, and stream_t::p_sys.
Try to add a stream filter to an open stream.
Try to add a stream filter to an open stream.
You must release it using stream_Delete unless it is used as a source to another filter.
References module_need, stream_t::p_input, stream_t::p_module, stream_t::p_source, stream_t::pf_destroy, stream_t::psz_access, stream_t::psz_path, strdup(), stream_CommonDelete(), stream_CommonNew(), StreamDelete(), and VLC_OBJECT.
| stream_t* stream_MemoryNew | ( | vlc_object_t * | p_obj, |
| uint8_t * | p_buffer, | ||
| uint64_t | i_size, | ||
| bool | b_preserve_memory | ||
| ) |
Create a stream_t reading from memory.
You must delete it using stream_Delete.
| int stream_Peek | ( | stream_t * | s, |
| const uint8_t ** | pp_peek, | ||
| int | i_peek | ||
| ) |
Store in pp_peek a pointer to the next "i_peek" bytes in the stream.
References stream_t::pf_peek.
Referenced by SkipAPETag(), SkipID3Tag(), and stream_ReadLine().
| int stream_Read | ( | stream_t * | s, |
| void * | p_read, | ||
| int | i_read | ||
| ) |
Try to read "i_read" bytes into a buffer pointed by "p_read".
If "p_read" is NULL then data are skipped instead of read.
References stream_t::pf_read.
Referenced by DownloadArt(), ImageReadUrl(), SkipAPETag(), SkipID3Tag(), stream_Block(), stream_BlockRemaining(), and stream_ReadLine().
| char* stream_ReadLine | ( | stream_t * | ) |
References stream_text_t::b_little_endian, stream_text_t::conv, stream_text_t::i_char_width, msg_Dbg, msg_Err, msg_Warn, stream_t::p_text, realloc_or_free(), STREAM_LINE_MAX, stream_Peek(), STREAM_PROBE_LINE, stream_Read(), stream_Tell(), U16_AT(), vlc_iconv(), vlc_iconv_close(), and vlc_iconv_open().
|
inlinestatic |
References stream_Control(), and STREAM_SET_POSITION.
Referenced by demux_vaControlHelper().
|
inlinestatic |
Get the size of the stream.
References stream_Control(), and STREAM_GET_SIZE.
Referenced by Control(), demux_vaControlHelper(), ImageReadUrl(), and stream_BlockRemaining().
|
inlinestatic |
Get the current position in a stream.
References stream_Control(), and STREAM_GET_POSITION.
Referenced by demux_vaControlHelper(), MainLoopInterface(), stream_BlockRemaining(), and stream_ReadLine().
| stream_t* stream_UrlNew | ( | vlc_object_t * | p_this, |
| const char * | psz_url | ||
| ) |
Create a stream_t reading from a URL.
You must delete it using stream_Delete.
| int stream_vaControl | ( | stream_t * | s, |
| int | i_query, | ||
| va_list | args | ||
| ) |
Use to control the "stream_t *".
Look at stream_query_e for possible "i_query" value and format arguments. Return VLC_SUCCESS if ... succeed ;) and VLC_EGENERIC if failed or unimplemented
References stream_t::pf_control.
1.8.1.2