VLC 4.0.0-dev
Loading...
Searching...
No Matches
vlc_frame.h File Reference

Frames definition and functions. More...

Include dependency graph for vlc_frame.h:

Go to the source code of this file.

Data Structures

struct  vlc_frame_callbacks
 
struct  vlc_frame_t
 

Macros

#define VLC_FRAME_FLAG_DISCONTINUITY   0x0001
 The content doesn't follow the last frame, possible some frames in between have been lost.
 
#define VLC_FRAME_FLAG_TYPE_I   0x0002
 Intra frame.
 
#define VLC_FRAME_FLAG_TYPE_P   0x0004
 Inter frame with backward reference only.
 
#define VLC_FRAME_FLAG_TYPE_B   0x0008
 Inter frame with backward and forward reference.
 
#define VLC_FRAME_FLAG_TYPE_PB   0x0010
 For inter frame when you don't know the real type.
 
#define VLC_FRAME_FLAG_HEADER   0x0020
 Warn that this frame is a header one.
 
#define VLC_FRAME_FLAG_END_OF_SEQUENCE   0x0040
 This frame contains the last part of a sequence

 
#define VLC_FRAME_FLAG_SCRAMBLED   0x0100
 This frame is scrambled.
 
#define VLC_FRAME_FLAG_PREROLL   0x0200
 This frame has to be decoded but not be displayed.
 
#define VLC_FRAME_FLAG_CORRUPTED   0x0400
 This frame is corrupted and/or there is data loss

 
#define VLC_FRAME_FLAG_AU_END   0x0800
 This frame is last of its access unit.
 
#define VLC_FRAME_FLAG_TOP_FIELD_FIRST   0x1000
 This frame contains an interlaced picture with top field stored first.
 
#define VLC_FRAME_FLAG_BOTTOM_FIELD_FIRST   0x2000
 This frame contains an interlaced picture with bottom field stored first.
 
#define VLC_FRAME_FLAG_SINGLE_FIELD   0x4000
 This frame contains a single field from interlaced picture.
 
#define VLC_FRAME_FLAG_INTERLACED_MASK    (VLC_FRAME_FLAG_TOP_FIELD_FIRST|VLC_FRAME_FLAG_BOTTOM_FIELD_FIRST|VLC_FRAME_FLAG_SINGLE_FIELD)
 This frame contains an interlaced picture.
 
#define VLC_FRAME_FLAG_TYPE_MASK    (VLC_FRAME_FLAG_TYPE_I|VLC_FRAME_FLAG_TYPE_P|VLC_FRAME_FLAG_TYPE_B|VLC_FRAME_FLAG_TYPE_PB)
 
#define VLC_FRAME_FLAG_CORE_PRIVATE_MASK   0x00ff0000
 
#define VLC_FRAME_FLAG_CORE_PRIVATE_SHIFT   16
 
#define VLC_FRAME_FLAG_PRIVATE_MASK   0xff000000
 
#define VLC_FRAME_FLAG_PRIVATE_SHIFT   24
 
#define vlc_frame_cleanup_push(frame)   vlc_cleanup_push (vlc_frame_Cleanup, frame)
 
#define vlc_fifo_Assert(fifo)   assert(vlc_fifo_Held(fifo))
 Asserts that a vlc_fifo_t is locked by the calling thread.
 
#define vlc_fifo_CleanupPush(fifo)   vlc_cleanup_push(vlc_fifo_Cleanup, fifo)
 

Typedefs

typedef uint32_t vlc_ancillary_id
 
typedef struct vlc_frame_t vlc_frame_t
 

Functions

vlc_frame_tvlc_frame_Init (vlc_frame_t *frame, const struct vlc_frame_callbacks *cbs, void *base, size_t length)
 Initializes a custom frame.
 
vlc_frame_tvlc_frame_New (const struct vlc_frame_callbacks *cbs, void *base, size_t length)
 Creates a custom frame.
 
vlc_frame_tvlc_frame_Alloc (size_t size)
 Allocates a frame.
 
vlc_frame_tvlc_frame_TryRealloc (vlc_frame_t *, ssize_t pre, size_t body)
 
vlc_frame_tvlc_frame_Realloc (vlc_frame_t *frame, ssize_t pre, size_t body)
 Reallocates a frame.
 
void vlc_frame_Release (vlc_frame_t *frame)
 Releases a frame.
 
int vlc_frame_AttachAncillary (vlc_frame_t *frame, struct vlc_ancillary *ancillary)
 Attach an ancillary to the frame.
 
struct vlc_ancillaryvlc_frame_GetAncillary (vlc_frame_t *frame, vlc_ancillary_id id)
 Return the ancillary identified by an ID.
 
void vlc_frame_CopyProperties (vlc_frame_t *dst, const vlc_frame_t *src)
 Copy frame properties from src to dst.
 
static vlc_frame_tvlc_frame_Duplicate (const vlc_frame_t *frame)
 Duplicates a frame.
 
vlc_frame_tvlc_frame_heap_Alloc (void *addr, size_t length)
 Wraps heap in a frame.
 
vlc_frame_tvlc_frame_mmap_Alloc (void *addr, size_t length)
 Wraps a memory mapping in a frame.
 
vlc_frame_tvlc_frame_shm_Alloc (void *addr, size_t length)
 Wraps a System V memory segment in a frame.
 
vlc_frame_tvlc_frame_File (int fd, bool write)
 Maps a file handle in memory.
 
vlc_frame_tvlc_frame_FilePath (const char *path, bool write)
 Maps a file in memory.
 
static void vlc_frame_Cleanup (void *frame)
 
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_tvlc_frame_ChainGather (vlc_frame_t *p_list)
 Gathers a chain into a single vlc_frame_t.
 
vlc_fifo_tvlc_fifo_New (void)
 Creates a thread-safe FIFO queue of blocks.
 
void vlc_fifo_Delete (vlc_fifo_t *)
 Delete a FIFO created by vlc_fifo_New().
 
vlc_frame_tvlc_fifo_Get (vlc_fifo_t *)
 Dequeue the first block from the FIFO.
 
vlc_frame_tvlc_fifo_Show (vlc_fifo_t *)
 Peeks the first block in the FIFO.
 
static vlc_queue_tvlc_fifo_queue (const vlc_fifo_t *fifo)
 
static void vlc_fifo_Lock (vlc_fifo_t *fifo)
 Locks a block FIFO.
 
static void vlc_fifo_Unlock (vlc_fifo_t *fifo)
 Unlocks a block FIFO.
 
static void vlc_fifo_Signal (vlc_fifo_t *fifo)
 Wakes up one thread waiting on the FIFO, if any.
 
static void vlc_fifo_Wait (vlc_fifo_t *fifo)
 Waits on the FIFO.
 
static void vlc_fifo_WaitCond (vlc_fifo_t *fifo, vlc_cond_t *condvar)
 
void vlc_fifo_QueueUnlocked (vlc_fifo_t *fifo, vlc_frame_t *block)
 Queues a linked-list of blocks into a locked FIFO.
 
vlc_frame_tvlc_fifo_DequeueUnlocked (vlc_fifo_t *)
 Dequeues the first block from a locked FIFO, if any.
 
vlc_frame_tvlc_fifo_DequeueAllUnlocked (vlc_fifo_t *)
 Dequeues the all blocks from a locked FIFO.
 
size_t vlc_fifo_GetCount (const vlc_fifo_t *)
 Counts blocks in a FIFO.
 
size_t vlc_fifo_GetBytes (const vlc_fifo_t *)
 Counts bytes in a FIFO.
 
bool vlc_fifo_Held (const vlc_fifo_t *fifo)
 Checks whether the vlc_fifo_t object is being locked.
 
static bool vlc_fifo_IsEmpty (const vlc_fifo_t *fifo)
 
static void vlc_fifo_Cleanup (void *fifo)
 
static void vlc_fifo_Empty (vlc_fifo_t *fifo)
 Clears all blocks in a FIFO.
 
static void vlc_fifo_Put (vlc_fifo_t *fifo, vlc_frame_t *block)
 Immediately queue one block at the end of a FIFO.
 
static size_t vlc_fifo_Size (vlc_fifo_t *fifo)
 
static size_t vlc_fifo_Count (vlc_fifo_t *fifo)
 

Detailed Description

Frames definition and functions.

Typedef Documentation

◆ vlc_ancillary_id

typedef uint32_t vlc_ancillary_id