Data Structures | |
| struct | stream_t |
| stream_t definition More... | |
Defines | |
| #define | stream_MemoryNew(a, b, c, d) __stream_MemoryNew( VLC_OBJECT(a), b, c, d ) |
| Create a stream_t reading from memory. | |
| #define | stream_UrlNew(a, b) __stream_UrlNew( VLC_OBJECT(a), b ) |
| Create a stream_t reading from an URL. | |
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. | |
| 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, int64_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_t handle created by stream_DemuxNew. | |
| stream_t * | __stream_MemoryNew (vlc_object_t *p_obj, uint8_t *p_buffer, int64_t i_size, bool b_preserve_memory) |
| Create a stream from a memory buffer. | |
| stream_t * | __stream_UrlNew (vlc_object_t *p_this, const char *psz_url) |
| #define stream_MemoryNew | ( | a, | |||
| b, | |||||
| c, | |||||
| d | ) | __stream_MemoryNew( VLC_OBJECT(a), b, c, d ) |
Create a stream_t reading from memory.
You must delete it using stream_Delete.
Referenced by MP4_ReadBox_cmov(), ParseUSFHeader(), RenderHtml(), and matroska_segment_c::Select().
| #define stream_UrlNew | ( | a, | |||
| b | ) | __stream_UrlNew( VLC_OBJECT(a), b ) |
Create a stream_t reading from an URL.
You must delete it using stream_Delete.
Referenced by DownloadArt(), FetchRSS(), Handshake(), ImageReadUrl(), LoadBlock(), SetPlayItem(), vlclua_stream_new(), XMLParser::XMLParser(), and ZipIO_Open().
| typedef struct stream_text_t stream_text_t |
| enum stream_query_e |
Possible commands to send to stream_Control() and stream_vaControl().
| stream_t* __stream_MemoryNew | ( | vlc_object_t * | p_this, | |
| uint8_t * | p_buffer, | |||
| int64_t | i_size, | |||
| bool | i_preserve_memory | |||
| ) |
Create a stream from a memory buffer.
| p_this | the calling vlc_object | |
| p_buffer | the memory buffer for the stream | |
| i_buffer | the size of the buffer | |
| i_preserve_memory | if this is set to false the memory buffer pointed to by p_buffer is freed on stream_Destroy |
References Control(), Delete(), FIND_PARENT, stream_sys_t::i_pos, stream_sys_t::i_preserve_memory, stream_sys_t::i_size, stream_sys_t::p_buffer, stream_t::p_input, stream_t::p_sys, p_sys, Peek(), stream_t::pf_control, stream_t::pf_destroy, stream_t::pf_peek, stream_t::pf_read, stream_t::psz_path, Read(), strdup(), stream_CommonDelete(), stream_CommonNew(), vlc_object_attach, vlc_object_find, VLC_OBJECT_INPUT, and vlc_object_release.
| stream_t* __stream_UrlNew | ( | vlc_object_t * | p_this, | |
| const char * | psz_url | |||
| ) |
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_New, block_Release(), block_t::i_buffer, block_t::p_buffer, and stream_Read().
Referenced by AVI_PacketRead(), Demux(), Demux_Seekable(), DemuxPacket(), LoadBlock(), ps_pkt_read(), and SendBlock().
| static char* stream_ContentType | ( | stream_t * | s | ) | [inline, static] |
Get the Content-Type of a stream, or NULL if unknown.
Result must be free()'d.
| int stream_Control | ( | stream_t * | s, | |
| int | i_query, | |||
| ... | ||||
| ) |
References stream_t::pf_control, and VLC_EGENERIC.
Referenced by AVI_ChunkRead_list(), AVI_ChunkReadRoot(), Control(), ControlSetTime(), Demux(), DemuxInit(), ImageReadUrl(), matroska_segment_c::InformationCreate(), OpenCommon(), matroska_segment_c::ParseSeekHead(), ParseTags(), PATCallBack(), PMTCallBack(), ReaderCanSeek(), SkipFile(), UpdateTitleSeekpointFromAccess(), and ValidateDVBMeta().
| void stream_Delete | ( | stream_t * | s | ) |
Destroy a stream.
References stream_t::pf_destroy.
Referenced by ClosePlayItem(), DownloadArt(), FetchRSS(), Handshake(), ImageReadUrl(), InputSourceClean(), InputSourceInit(), LoadBlock(), MP4_ReadBox_cmov(), ParseUSFHeader(), RenderHtml(), RollOverTcp(), matroska_segment_c::Select(), SetPlayItem(), stream_destroy(), StreamDelete(), vlclua_stream_delete(), ZipIO_Close(), vlc_stream_io_callback::~vlc_stream_io_callback(), and XMLParser::~XMLParser().
Create a special stream and a demuxer, this allows chaining demuxers You must delete it using stream_Delete.
References block_FifoNew(), DStreamControl(), DStreamDelete(), DStreamPeek(), DStreamRead(), DStreamThread(), stream_sys_t::i_pos, stream_sys_t::out, stream_sys_t::p_block, stream_sys_t::p_demux, stream_sys_t::p_fifo, demux_t::p_input, stream_t::p_input, stream_t::p_sys, p_sys, stream_t::pf_control, stream_t::pf_destroy, stream_t::pf_peek, stream_t::pf_read, stream_sys_t::psz_name, stream_t::psz_path, strdup(), stream_CommonDelete(), stream_CommonNew(), VLC_OBJECT, vlc_object_attach, vlc_object_detach, vlc_thread_create, and VLC_THREAD_PRIORITY_INPUT.
Referenced by SessionsSetup(), SetPlayItem(), and stream_init().
Send data to a stream_t handle created by stream_DemuxNew.
References block_FifoPut(), stream_sys_t::p_fifo, stream_t::p_sys, and p_sys.
Referenced by Demux(), Demux_Seekable(), ParseASF(), stream_decode(), and StreamRead().
| 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.
Due to input limitation, it could be less than i_peek without meaning the end of the stream (but only when you have i_peek >= p_input->i_bufsize)
References stream_t::pf_peek.
Referenced by A52Init(), AacProbe(), ASF_ReadObject_advanced_mutual_exclusion(), ASF_ReadObject_codec_list(), ASF_ReadObject_content_description(), ASF_ReadObject_Data(), ASF_ReadObject_extended_content_description(), ASF_ReadObject_extended_stream_properties(), ASF_ReadObject_file_properties(), ASF_ReadObject_Header(), ASF_ReadObject_header_extension(), ASF_ReadObject_Index(), ASF_ReadObject_language_list(), ASF_ReadObject_metadata(), ASF_ReadObject_stream_bitrate_properties(), ASF_ReadObject_stream_prioritization(), ASF_ReadObject_stream_properties(), ASF_ReadObjectCommon(), AVI_ChunkRead_list(), AVI_ChunkReadCommon(), AVI_PacketGetHeader(), CheckFooter(), CheckHeader(), ChunkFind(), CodecParse(), ContainsURL(), Demux(), DemuxOpen(), DemuxPacket(), GenericProbe(), get_chunk_header(), HeaderMDPR(), Import_DVB(), Import_GVP(), Import_IFO(), Import_SGIMB(), MP4_ReadBoxCommon(), MP4_ReadBoxSkip(), MpgaInit(), MpgaProbe(), OpenBzip2(), OpenCommon(), OpenDemux(), OpenGzip(), Peek(), PeekBlock(), probe_stream(), ps_pkt_read(), ps_pkt_resynch(), ReadMeta(), ReadNSVf(), ReSynch(), SkipAPETag(), SkipEnd(), SkipFile(), SkipID3Tag(), stream_ReadLine(), StreamOpen(), Validate(), vlclua_demux_peek(), vlclua_demux_read(), and WavSkipHeader().
| 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. The return value is the real numbers of bytes read/skip. If this value is less than i_read that means that it's the end of the stream.
References stream_t::pf_read.
Referenced by ASF_ReadObject_extended_stream_properties(), ASF_ReadObject_Header(), ASF_ReadObject_header_extension(), AVI_ChunkRead_list(), AVI_PacketNext(), AVI_PacketSearch(), ChunkFind(), ControlSetPosition(), Demux(), DemuxFile(), DemuxPacket(), DownloadArt(), ExtendedHeaderLoad(), FrameHeaderLoad(), get_chunk_header(), HandleMessage(), HandleMeta(), Handshake(), HeaderDATA(), HeaderINDX(), HeaderLoad(), HeaderMDPR(), HeaderPROP(), HeaderRead(), HeaderRMF(), ImageReadUrl(), LoadChapterApple(), MimeDemux(), MP4_ReadBox_meta(), Ogg_ReadPage(), OpenDemux(), parse_master(), Peek(), ps_pkt_resynch(), Read(), vlc_stream_io_callback::read(), ReadBlockHeader(), ReaderCreate(), ReaderRead(), ReadMeta(), ReadNSVf(), ReadNSVs(), ReadVarInt(), ReSynch(), SeekTableLoad(), SkipAPETag(), SkipBlock(), SkipEnd(), SkipID3Tag(), stream_Block(), stream_ReadLine(), StreamRead(), StreamReadString2(), Thread(), ty_stream_seek_time(), vlclua_demux_read(), vlclua_stream_read(), and ZipIO_Read().
| 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_input, stream_t::p_text, STREAM_LINE_MAX, stream_Peek(), STREAM_PROBE_LINE, stream_Read(), stream_Seek(), stream_Tell(), var_Create, var_SetString, vlc_iconv(), vlc_iconv_close(), vlc_iconv_open(), VLC_VAR_DOINHERIT, and VLC_VAR_STRING.
Referenced by Demux(), TextLoad(), vlclua_demux_readline(), and vlclua_stream_readline().
| static int stream_Seek | ( | stream_t * | s, | |
| int64_t | i_pos | |||
| ) | [inline, static] |
Referenced by ASF_NextObject(), AVI_IndexCreate(), AVI_IndexLoad_indx(), AVI_NextChunk(), AVI_StreamChunkFind(), CheckFooter(), CheckHeader(), Control(), ControlGoToIndex(), ControlSetPosition(), ControlSetTime(), Demux(), Demux_Seekable(), demux_vaControlHelper(), DemuxInit(), FindLength(), HandleMessage(), HeaderINDX(), HeaderRead(), LoadChapterApple(), MP4_NextBox(), MP4_ReadBox_dref(), MP4_ReadBox_sample_mp4s(), MP4_ReadBox_sample_soun(), MP4_ReadBox_sample_vide(), MP4_ReadBox_stsd(), MP4_ReadBoxContainer(), OpenDemux(), parse_master(), ParseTags(), ReadBlockHeader(), ReaderSeek(), Seek(), SeekIndex(), SeekTableLoad(), vlc_stream_io_callback::setFilePointer(), stream_ReadLine(), ty_stream_seek_pct(), ty_stream_seek_time(), and ZipIO_Seek().
| static int64_t stream_Size | ( | stream_t * | s | ) | [inline, static] |
Get the size of the stream.
Referenced by AVI_ChunkReadRoot(), AVI_IndexCreate(), CheckFooter(), Control(), ControlGetLength(), ControlGetPosition(), ControlSetTime(), Demux(), demux_vaControlHelper(), DemuxInit(), FindLength(), ImageReadUrl(), LoadBlock(), MP4_BoxGetRoot(), ReaderGetSize(), matroska_segment_c::Seek(), Seek(), vlc_stream_io_callback::setFilePointer(), SetPlayItem(), ZipIO_Seek(), and ZipIO_Tell().
| static int64_t stream_Tell | ( | stream_t * | s | ) | [inline, static] |
Get the current position in a stream.
Referenced by AacProbe(), ASF_ReadObjectCommon(), ASF_ReadObjectRoot(), AVI_ChunkRead_list(), AVI_ChunkReadCommon(), AVI_ChunkReadRoot(), AVI_IndexCreate(), AVI_PacketGetHeader(), Control(), ControlSetPosition(), Demux(), demux_vaControlHelper(), FindLength(), GenericProbe(), vlc_stream_io_callback::getFilePointer(), HandleMessage(), HandleMeta(), HeaderDATA(), HeaderRead(), MainLoopInterface(), MP4_ReadBoxCommon(), MP4_ReadBoxContainerRaw(), MpgaProbe(), parse_master(), ParseTags(), ReadBlockHeader(), ReadDeltaTime(), ReaderTell(), ReadMeta(), SeekTableLoad(), vlc_stream_io_callback::setFilePointer(), SkipFile(), stream_ReadLine(), ty_stream_seek_time(), ZipIO_Seek(), and ZipIO_Tell().
| 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.
Referenced by Control().
1.5.6