VLC 4.0.0-dev
|
Functions | |
static void | vlc_frame_ChainAppend (vlc_frame_t **pp_list, vlc_frame_t *frame) |
Appends a vlc_frame_t to the chain. | |
static void | vlc_frame_ChainLastAppend (vlc_frame_t ***ppp_last, vlc_frame_t *frame) |
Appends a vlc_frame_t to the last frame pointer and update it. | |
static void | vlc_frame_ChainRelease (vlc_frame_t *frame) |
Releases a chain of blocks. | |
static size_t | vlc_frame_ChainExtract (vlc_frame_t *p_list, void *p_data, size_t i_max) |
Extracts data from a chain of frames. | |
static void | vlc_frame_ChainProperties (const vlc_frame_t *p_list, int *pi_count, size_t *pi_size, vlc_tick_t *pi_length) |
Retrieves chain properties. | |
static vlc_frame_t * | vlc_frame_ChainGather (vlc_frame_t *p_list) |
Gathers a chain into a single vlc_frame_t. | |
|
inlinestatic |
Appends a vlc_frame_t to the chain.
The given frame is appended to the last frame of the given chain.
pp_list | Pointer to the vlc_frame_t chain |
frame | The vlc_frame_t to append (can be NULL) |
Example:
References p, and vlc_frame_t::p_next.
|
static |
Extracts data from a chain of frames.
Copies the specified amount of data from the chain into the given buffer. If the data in the chain is less than the maximum amount given, the remainder of the buffer is not modified.
p_list | Pointer to the first vlc_frame_t of the chain to copy from | |
[out] | p_data | Destination buffer to copy the data to |
i_max | Number of bytes to copy |
References vlc_frame_t::i_buffer, p, vlc_frame_t::p_buffer, and vlc_frame_t::p_next.
Referenced by vlc_frame_ChainGather().
|
inlinestatic |
Gathers a chain into a single vlc_frame_t.
All frames in the chain are gathered into a single vlc_frame_t and the original chain is released.
p_list | Pointer to the first vlc_frame_t of the chain to gather |
References vlc_frame_t::i_buffer, vlc_frame_t::i_dts, vlc_frame_t::i_flags, vlc_frame_t::i_length, vlc_frame_t::i_pts, vlc_frame_t::p_buffer, vlc_frame_t::p_next, vlc_frame_Alloc(), vlc_frame_ChainExtract(), vlc_frame_ChainProperties(), and vlc_frame_ChainRelease().
|
inlinestatic |
Appends a vlc_frame_t to the last frame pointer and update it.
Uses a pointer over a pointer to p_next of the last frame of the frame chain to append a frame at the end of the chain and updates the pointer to the new last frame's p_next
. If the appended frame is itself a chain, it is iterated till the end to correctly update ppp_last
.
[in,out] | ppp_last | Pointer to pointer to the end of the chain (The vlc_frame_t::p_next of the last vlc_frame_t in the chain) |
frame | The vlc_frame_t to append |
Example:
References vlc_frame_t::p_next.
|
inlinestatic |
Retrieves chain properties.
Can be used to retrieve count of frames, number of bytes and the duration of the chain.
p_list | Pointer to the first vlc_frame_t of the chain | |
[out] | pi_count | Pointer to count of frames in the chain (may be NULL) |
[out] | pi_size | Pointer to number of bytes in the chain (may be NULL) |
[out] | pi_length | Pointer to length (duration) of the chain (may be NULL) |
References vlc_frame_t::i_buffer, vlc_frame_t::i_length, and vlc_frame_t::p_next.
Referenced by vlc_frame_ChainGather().
|
inlinestatic |
Releases a chain of blocks.
The frame pointed to by frame and all following frames in the chain are released.
frame | Pointer to first vlc_frame_t of the chain to release |
References vlc_frame_t::p_next, and vlc_frame_Release().
Referenced by vlc_fifo_Empty(), and vlc_frame_ChainGather().