|
VLC 4.0.0-dev
|
In-memory anonymous pipe. More...
Typedefs | |
| typedef struct vlc_stream_fifo | vlc_stream_fifo_t |
Functions | |
| vlc_stream_fifo_t * | vlc_stream_fifo_New (vlc_object_t *parent, stream_t **reader) |
| Creates a FIFO stream. More... | |
| int | vlc_stream_fifo_Queue (vlc_stream_fifo_t *s, block_t *block) |
| Writes a block to a FIFO stream. More... | |
| ssize_t | vlc_stream_fifo_Write (vlc_stream_fifo_t *s, const void *buf, size_t len) |
| Writes data to a FIFO stream. More... | |
| void | vlc_stream_fifo_Close (vlc_stream_fifo_t *s) |
| Terminates a FIFO stream. More... | |
In-memory anonymous pipe.
| typedef struct vlc_stream_fifo vlc_stream_fifo_t |
| void vlc_stream_fifo_Close | ( | vlc_stream_fifo_t * | s | ) |
Terminates a FIFO stream.
Marks the end of the FIFO stream and releases any underlying resources.
| s | FIFO stream created by vlc_stream_fifo_New() |
References vlc_stream_fifo::eof, vlc_stream_fifo::queue, vlc_queue_Lock(), vlc_queue_Signal(), vlc_queue_Unlock(), and vlc_stream_fifo_private::writer.
Referenced by vlc_demux_chained_Delete(), and vlc_demux_chained_New().
| vlc_stream_fifo_t * vlc_stream_fifo_New | ( | vlc_object_t * | parent, |
| stream_t ** | reader | ||
| ) |
Creates a FIFO stream.
Creates a non-seekable byte stream object whose byte stream is generated by another thread in the process. This is the LibVLC equivalent of an anonymous pipe/FIFO.
On the reader side, the normal stream functions are used, e.g. vlc_stream_Read() and vlc_stream_Delete().
The created stream object is automatically destroyed when both the reader and the writer sides have been closed, with vlc_stream_Delete() and vlc_stream_fifo_Close() respectively.
| parent | parent VLC object for the stream |
| reader | location to store read side stream pointer [OUT] |
References vlc_stream_fifo::eof, stream_t::pf_block, stream_t::pf_control, stream_t::pf_seek, vlc_stream_fifo::queue, unlikely, vlc_queue_Init(), vlc_stream_CustomNew(), vlc_stream_fifo_Block(), vlc_stream_fifo_Control(), vlc_stream_fifo_Destroy(), vlc_stream_Private(), and vlc_stream_fifo_private::writer.
Referenced by vlc_demux_chained_New().
| int vlc_stream_fifo_Queue | ( | vlc_stream_fifo_t * | s, |
| block_t * | block | ||
| ) |
Writes a block to a FIFO stream.
| s | FIFO stream created by vlc_stream_fifo_New() |
| block | data block to write to the stream |
References block_Release, vlc_stream_fifo::eof, likely, vlc_stream_fifo::queue, unlikely, vlc_queue_EnqueueUnlocked(), vlc_queue_Lock(), vlc_queue_Unlock(), and vlc_stream_fifo_private::writer.
Referenced by vlc_demux_chained_Send(), and vlc_stream_fifo_Write().
| ssize_t vlc_stream_fifo_Write | ( | vlc_stream_fifo_t * | s, |
| const void * | buf, | ||
| size_t | len | ||
| ) |
Writes data to a FIFO stream.
This is a convenience helper for vlc_stream_fifo_Queue().
| s | FIFO stream created by vlc_stream_fifo_New() |
| buf | start address of data to write |
| len | length of data to write in bytes |
References block_Alloc, vlc_frame_t::p_buffer, unlikely, vlc_stream_fifo_Queue(), and vlc_stream_fifo_private::writer.