VLC 4.0.0-dev
Loading...
Searching...
No Matches
vlc_block.h
Go to the documentation of this file.
1/*****************************************************************************
2 * vlc_block.h: Data blocks management functions
3 *****************************************************************************
4 * Copyright (C) 2003 VLC authors and VideoLAN
5 *
6 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation; either version 2.1 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
22
23#ifndef VLC_BLOCK_H
24#define VLC_BLOCK_H 1
25
26#include <vlc_frame.h>
27
28/**
29 * \defgroup block Blocks
30 * \ingroup input
31 *
32 * Blocks of binary data.
33 *
34 * @ref block_t is a generic structure to represent a binary blob within VLC.
35 * The primary goal of the structure is to avoid memory copying as data is
36 * passed around.
37 *
38 * It is notably used in:
39 * - access_t
40 * - stream_t
41 * - demux_t (read block_t but send vlc_frame_t from es_out_Send)A
42 *
43 * TODO: remove the vlc_frame_t typedef and create a block_t struct like the
44 * following:
45 * @verbatim
46 * struct block_t
47 * {
48 * struct block_t *p_next;
49 * uint8_t *p_buffer;
50 * size_t i_buffer;
51 * uint8_t *p_start;
52 * size_t i_size;
53 * const struct block_callbacks *cbs;
54 * } @endverbatim
55 */
56
57#define BLOCK_FLAG_DISCONTINUITY VLC_FRAME_FLAG_DISCONTINUITY
59#define BLOCK_FLAG_TYPE_I VLC_FRAME_FLAG_TYPE_I
60#define BLOCK_FLAG_TYPE_P VLC_FRAME_FLAG_TYPE_P
61#define BLOCK_FLAG_TYPE_B VLC_FRAME_FLAG_TYPE_B
62#define BLOCK_FLAG_TYPE_PB VLC_FRAME_FLAG_TYPE_PB
63#define BLOCK_FLAG_HEADER VLC_FRAME_FLAG_HEADER
64#define BLOCK_FLAG_END_OF_SEQUENCE VLC_FRAME_FLAG_END_OF_SEQUENCE
65#define BLOCK_FLAG_SCRAMBLED VLC_FRAME_FLAG_SCRAMBLED
66#define BLOCK_FLAG_PREROLL VLC_FRAME_FLAG_PREROLL
67#define BLOCK_FLAG_CORRUPTED VLC_FRAME_FLAG_CORRUPTED
68#define BLOCK_FLAG_AU_END VLC_FRAME_FLAG_AU_END
69#define BLOCK_FLAG_TOP_FIELD_FIRST VLC_FRAME_FLAG_TOP_FIELD_FIRST
70#define BLOCK_FLAG_BOTTOM_FIELD_FIRST VLC_FRAME_FLAG_BOTTOM_FIELD_FIRST
71#define BLOCK_FLAG_SINGLE_FIELD VLC_FRAME_FLAG_SINGLE_FIELD
72#define BLOCK_FLAG_INTERLACED_MASK VLC_FRAME_FLAG_INTERLACED_MASK
73#define BLOCK_FLAG_TYPE_MASK VLC_FRAME_FLAG_TYPE_MASK
74#define BLOCK_FLAG_CORE_PRIVATE_MASK VLC_FRAME_FLAG_CORE_PRIVATE_MASK
75#define BLOCK_FLAG_CORE_PRIVATE_SHIFT VLC_FRAME_FLAG_CORE_PRIVATE_SHIFT
76#define BLOCK_FLAG_PRIVATE_MASK VLC_FRAME_FLAG_PRIVATE_MASK
77#define BLOCK_FLAG_PRIVATE_SHIFT VLC_FRAME_FLAG_PRIVATE_SHIFT
79#define vlc_block_callbacks vlc_frame_callbacks
81#define block_Init vlc_frame_Init
82#define block_New vlc_frame_New
83#define block_Alloc vlc_frame_Alloc
84#define block_TryRealloc vlc_frame_TryRealloc
85#define block_Realloc vlc_frame_Realloc
86#define block_Release vlc_frame_Release
87#define block_CopyProperties vlc_frame_CopyProperties
88#define block_Duplicate vlc_frame_Duplicate
89#define block_heap_Alloc vlc_frame_heap_Alloc
90#define block_mmap_Alloc vlc_frame_mmap_Alloc
91#define block_shm_Alloc vlc_frame_shm_Alloc
92#define block_File vlc_frame_File
93#define block_FilePath vlc_frame_FilePath
94#define block_Cleanup vlc_frame_Cleanup
95#define block_cleanup_push vlc_frame_cleanup_push
96#define block_ChainAppend vlc_frame_ChainAppend
97#define block_ChainLastAppend vlc_frame_ChainLastAppend
98#define block_ChainRelease vlc_frame_ChainRelease
99#define block_ChainExtract vlc_frame_ChainExtract
100#define block_ChainProperties vlc_frame_ChainProperties
101#define block_ChainGather vlc_frame_ChainGather
103#define block_FifoPut vlc_fifo_Put
104#define block_FifoNew vlc_fifo_New
105#define block_FifoRelease vlc_fifo_Delete
106#define block_FifoSize vlc_fifo_Size
107#define block_FifoGet vlc_fifo_Get
108#define block_FifoCount vlc_fifo_Count
109#define block_FifoEmpty vlc_fifo_Empty
110#define block_FifoShow vlc_fifo_Show
112#endif /* VLC_BLOCK_H */
This file is a collection of common definitions and types.
Frames definition and functions.