VLC 4.0.0-dev
Loading...
Searching...
No Matches
vlc_picture.h
Go to the documentation of this file.
1/*****************************************************************************
2 * vlc_picture.h: picture definitions
3 *****************************************************************************
4 * Copyright (C) 1999 - 2009 VLC authors and VideoLAN
5 *
6 * Authors: Vincent Seguin <seguin@via.ecp.fr>
7 * Samuel Hocevar <sam@via.ecp.fr>
8 * Olivier Aubert <oaubert 47 videolan d07 org>
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU Lesser General Public License as published by
12 * the Free Software Foundation; either version 2.1 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this program; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
24
25#ifndef VLC_PICTURE_H
26#define VLC_PICTURE_H 1
27
28#include <assert.h>
29#include <vlc_atomic.h>
30#include <vlc_es.h>
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36struct vlc_ancillary;
37typedef uint32_t vlc_ancillary_id;
39/**
40 * \defgroup picture Generic picture API
41 * \ingroup output
42 * @{
43 * \file
44 * This file defines picture structures and functions in vlc
45 */
46
47/** Description of a planar graphic field */
48typedef struct plane_t
50 uint8_t *p_pixels; /**< Start of the plane's data */
52 /* Variables used for fast memcpy operations */
53 int i_lines; /**< Number of lines, including margins */
54 int i_pitch; /**< Number of bytes in a line, including margins */
56 /** Size of a macropixel, defaults to 1 */
57 int i_pixel_pitch;
59 /* Variables used for pictures with margins */
60 int i_visible_lines; /**< How many visible lines are there? */
61 int i_visible_pitch; /**< How many bytes for visible pixels are there? */
63} plane_t;
65/**
66 * Maximum number of plane for a picture
67 */
68#define PICTURE_PLANE_MAX (VOUT_MAX_PLANES)
70typedef struct picture_context_t
72 void (*destroy)(struct picture_context_t *);
73 struct picture_context_t *(*copy)(struct picture_context_t *);
74 struct vlc_video_context *vctx;
77typedef struct picture_buffer_t
79 int fd;
80 void *base;
81 size_t size;
82 off_t offset;
90 void (*destroy)(void *priv);
91};
92
93/** Decoder device type */
96 VLC_VIDEO_CONTEXT_VAAPI = 1, //!< private: vaapi_vctx* or empty
97 VLC_VIDEO_CONTEXT_VDPAU, //!< private: chroma type (YUV) or empty (RGB)
98 VLC_VIDEO_CONTEXT_DXVA2, //!< private: d3d9_video_context_t*
99 VLC_VIDEO_CONTEXT_D3D11VA, //!< private: d3d11_video_context_t*
100 VLC_VIDEO_CONTEXT_AWINDOW, //!< private: android_video_context_t*
102 VLC_VIDEO_CONTEXT_CVPX, //!< private: cvpx_video_context*
106
108 enum vlc_video_context_type private_type,
109 size_t private_size,
110 const struct vlc_video_context_operations *);
112
116
117/**
118 * Get the decoder device used by the device context.
119 *
120 * This will increment the refcount of the decoder device.
121 */
123
124
125/**
126 * Video picture
127 */
128struct picture_t
130 /**
131 * The properties of the picture
132 */
135 plane_t p[PICTURE_PLANE_MAX]; /**< description of the planes */
136 int i_planes; /**< number of allocated planes */
138 /** \name Picture management properties
139 * These properties can be modified using the video output thread API,
140 * but should never be written directly */
141 /**@{*/
142 vlc_tick_t date; /**< display date */
145 /**@}*/
146
147 /** \name Picture dynamic properties
148 * Those properties can be changed by the decoder
149 * @{
150 */
151 bool b_progressive; /**< is it a progressive frame? */
152 bool b_top_field_first; /**< which field is first */
153 bool b_multiview_left_eye; /**< left eye or right eye in multiview */
154 unsigned int i_nb_fields; /**< number of displayed fields */
155 picture_context_t *context; /**< video format-specific data pointer */
156 /**@}*/
157
158 /** Private data - the video output plugin might want to put stuff here to
159 * keep track of the picture */
160 void *p_sys;
162 /** Next picture in a FIFO a pictures */
163 struct picture_t *p_next;
167
170 return pic->context ? pic->context->vctx : NULL;
171}
172
173/**
174 * Check whether a picture has other pictures linked
175 */
176static inline bool picture_HasChainedPics(const picture_t *pic)
178 return pic->p_next != NULL;
179}
180
181/**
182 * picture chaining helpers
183 */
184
185typedef struct vlc_pic_chain {
190/**
191 * Initializes or reset a picture chain
192 *
193 * \warning do not call this if the chain still holds pictures, it will leak them.
194 */
195static inline void vlc_picture_chain_Init(vlc_picture_chain_t *chain)
197 chain->front = NULL;
198 // chain->tail = NULL not needed
199}
200
201/**
202 * Check whether a picture chain holds pictures or not.
203 *
204 * \return true if it is empty.
205 */
206static inline bool vlc_picture_chain_IsEmpty(const vlc_picture_chain_t *chain)
208 return chain->front == NULL;
209}
210
211/**
212 * Check whether a picture chain has more than one picture.
213 */
214static inline bool vlc_picture_chain_HasNext(const vlc_picture_chain_t *chain)
216 return !vlc_picture_chain_IsEmpty(chain) && chain->front != chain->tail;
217}
218
219/**
220 * Pop the front of a picture chain.
221 *
222 * The next picture in the chain becomes the front of the picture chain.
223 *
224 * \return the front of the picture chain (the picture itself)
225 */
228 picture_t *front = chain->front;
229 if (front)
230 {
231 chain->front = front->p_next;
232 // unlink the front picture from the rest of the chain
233 front->p_next = NULL;
234 }
235 return front;
236}
237
238/**
239 * Peek the front of a picture chain.
240 *
241 * The picture chain is unchanged.
242 *
243 * \return the front of the picture chain (the picture itself)
244 */
247 return chain->front;
248}
249
250/**
251 * Append a picture to a picture chain.
252 *
253 * \param chain the picture chain pointer
254 * \param pic the picture to append to the chain
255 */
256static inline void vlc_picture_chain_Append(vlc_picture_chain_t *chain,
258{
259 if (chain->front == NULL)
260 chain->front = pic;
261 else
262 chain->tail->p_next = pic;
263 // make sure the picture doesn't have chained pics
265 pic->p_next = NULL; // we're appending a picture, not a chain
266 chain->tail = pic;
267}
268
269/**
270 * Append a picture chain to a picture chain.
271 */
272static inline void vlc_picture_chain_AppendChain(picture_t *chain, picture_t *tail)
274 chain->p_next = tail;
275}
276
277/**
278 * Copy the picture chain in another picture chain and clear the original
279 * picture chain.
280 *
281 * \param in picture chain to copy and clear
282 * \param out picture chain to copy into
283 */
286{
287 *out = *in;
289}
290
291/**
292 * Reset a picture chain.
293 *
294 * \return the picture chain that was contained in the picture
295 */
298 vlc_picture_chain_t chain = { pic->p_next, pic->p_next };
299 while ( chain.tail && chain.tail->p_next ) // find the proper tail
300 chain.tail = chain.tail->p_next;
301 pic->p_next = NULL;
302 return chain;
303}
304
305
306/**
307 * This function will create a new picture.
308 * The picture created will implement a default release management compatible
309 * with picture_Hold and picture_Release. This default management will release
310 * p_sys, gc.p_sys fields if non NULL.
311 */
312VLC_API picture_t * picture_New( vlc_fourcc_t i_chroma, int i_width, int i_height, int i_sar_num, int i_sar_den ) VLC_USED;
313
314/**
315 * This function will create a new picture using the given format.
316 *
317 * When possible, it is preferred to use this function over picture_New
318 * as more information about the format is kept.
319 */
322/**
323 * Resource for a picture.
324 */
325typedef struct
327 void *p_sys;
328 void (*pf_destroy)(picture_t *);
330 /* Plane resources
331 * XXX all fields MUST be set to the right value.
332 */
333 struct
334 {
335 uint8_t *p_pixels; /**< Start of the plane's data */
336 int i_lines; /**< Number of lines, including margins */
337 int i_pitch; /**< Number of bytes in a line, including margins */
341
342/**
343 * This function will create a new picture using the provided resource.
344 */
346
347/**
348 * Destroys a picture without references.
349 *
350 * This function destroys a picture with zero references left.
351 * Never call this function directly. Use picture_Release() instead.
352 */
353VLC_API void picture_Destroy(picture_t *picture);
354
355/**
356 * Increments the picture reference count.
357 *
358 * \return picture
359 */
360static inline picture_t *picture_Hold(picture_t *picture)
362 vlc_atomic_rc_inc(&picture->refs);
363 return picture;
364}
365
366/**
367 * Decrements the picture reference count.
368 *
369 * If the reference count reaches zero, the picture is destroyed. If it was
370 * allocated from a pool, the underlying picture buffer will be returned to the
371 * pool. Otherwise, the picture buffer will be freed.
372 */
373static inline void picture_Release(picture_t *picture)
375 if (vlc_atomic_rc_dec(&picture->refs))
376 picture_Destroy(picture);
377}
378
379/**
380 * This function will copy all picture dynamic properties.
381 */
382VLC_API void picture_CopyProperties( picture_t *p_dst, const picture_t *p_src );
383
384/**
385 * This function will reset a picture information (properties and quantizers).
386 * It is sometimes useful for reusing pictures (like from a pool).
387 */
389
390/**
391 * This function will copy the picture pixels.
392 * You can safely copy between pictures that do not have the same size,
393 * only the compatible(smaller) part will be copied.
394 */
395VLC_API void picture_CopyPixels( picture_t *p_dst, const picture_t *p_src );
396VLC_API void plane_CopyPixels( plane_t *p_dst, const plane_t *p_src );
397
398/**
399 * This function will copy both picture dynamic properties and pixels.
400 * You have to notice that sometime a simple picture_Hold may do what
401 * you want without the copy overhead.
402 * Provided for convenience.
403 *
404 * \param p_dst pointer to the destination picture.
405 * \param p_src pointer to the source picture.
406 */
407VLC_API void picture_Copy( picture_t *p_dst, const picture_t *p_src );
408
409/**
410 * Perform a shallow picture copy
411 *
412 * This function makes a shallow copy of an existing picture. The same planes
413 * and resources will be used, and the cloned picture reference count will be
414 * incremented.
415 *
416 * \return A clone picture on success, NULL on error.
417 */
419
420/**
421 * Attach an ancillary to the picture
422 *
423 * @warning the ancillary will be released only if the picture is created from
424 * picture_New(), and picture_Clone().
425 *
426 * @note Several ancillaries can be attached to a picture, but if two
427 * ancillaries are identified by the same ID, only the last one take
428 * precedence.
429 *
430 * @param pic the picture to attach an ancillary
431 * @param ancillary ancillary that will be held by the frame, can't be NULL
432 * @return VLC_SUCCESS in case of success, VLC_ENOMEM in case of alloc error
433 */
434VLC_API int
435picture_AttachAncillary(picture_t *pic, struct vlc_ancillary *ancillary);
436
437/**
438 * Allocate a new ancillary and attach it to a picture. Helper equivalent to
439 * malloc + vlc_ancillary_Create + picture_AttachAncillary. The returned memory
440 * is not initialized.
441 *
442 * @param pic picture to attach created ancillary to
443 * @param id id of the ancillary to create
444 * @param size allocation size in bytes
445 * @return The allocated pointer on success, NULL on out-of-memory
446 */
447VLC_API void *
449
450/**
451 * Return the ancillary identified by an ID
452 *
453 * @param pic the picture to get the ancillary from
454 * @param id id of ancillary to request
455 * @return the ancillary or NULL if the ancillary for that particular id is
456 * not present
457 */
458VLC_API struct vlc_ancillary *
460
461/**
462 * This function will export a picture to an encoded bitstream.
463 *
464 * pp_image will contain the encoded bitstream in i_codec codec.
465 *
466 * p_fmt can be NULL otherwise it will be set with the format used for the
467 * picture before encoding.
468 *
469 * i_override_width/height allow to override the width and/or the height of the
470 * picture to be encoded:
471 * - if strictly lower than 0, the original dimension will be used.
472 * - if equal to 0, it will be deduced from the other dimension which must be
473 * different to 0.
474 * - if strictly higher than 0, it will either override the dimension if b_crop
475 * is false, or crop the picture to the provided size if b_crop is true.
476 * If at most one of them is > 0 then the picture aspect ratio will be kept.
477 */
478VLC_API int picture_Export( vlc_object_t *p_obj, block_t **pp_image, video_format_t *p_fmt,
479 picture_t *p_picture, vlc_fourcc_t i_codec, int i_override_width,
480 int i_override_height, bool b_crop );
481
482/**
483 * This function will setup all fields of a picture_t without allocating any
484 * memory.
485 * XXX The memory must already be initialized.
486 * It does not need to be released.
487 *
488 * It will return VLC_EGENERIC if the core does not understand the requested
489 * format.
490 *
491 * It can be useful to get the properties of planes.
492 */
495
496/*****************************************************************************
497 * Shortcuts to access image components
498 *****************************************************************************/
499
500/* Plane indices */
501enum
502{
503 Y_PLANE = 0,
508
509/* Shortcuts */
510#define Y_PIXELS p[Y_PLANE].p_pixels
511#define Y_PITCH p[Y_PLANE].i_pitch
512#define U_PIXELS p[U_PLANE].p_pixels
513#define U_PITCH p[U_PLANE].i_pitch
514#define V_PIXELS p[V_PLANE].p_pixels
515#define V_PITCH p[V_PLANE].i_pitch
516#define A_PIXELS p[A_PLANE].p_pixels
517#define A_PITCH p[A_PLANE].i_pitch
519/**
520 * Swap UV planes of a Tri Planars picture.
521 *
522 * It just swap the planes information without doing any copy.
523 */
524static inline void picture_SwapUV(picture_t *picture)
526 vlc_assert(picture->i_planes == 3);
527
528 plane_t tmp_plane = picture->p[U_PLANE];
529 picture->p[U_PLANE] = picture->p[V_PLANE];
530 picture->p[V_PLANE] = tmp_plane;
531}
532
533/** @} */
534
535#ifdef __cplusplus
536}
537#endif
538
539#endif /* VLC_PICTURE_H */
#define VLC_USED
Definition fourcc_gen.c:32
#define VLC_API
Definition fourcc_gen.c:31
#define p(t)
uint32_t vlc_fourcc_t
Definition fourcc_gen.c:33
uint32_t vlc_ancillary_id
ID of an ancillary.
Definition vlc_ancillary.h:68
#define vlc_assert(pred)
Run-time assertion.
Definition vlc_common.h:290
static picture_t * picture_Hold(picture_t *picture)
Increments the picture reference count.
Definition vlc_picture.h:361
void * picture_AttachNewAncillary(picture_t *pic, vlc_ancillary_id id, size_t size)
Allocate a new ancillary and attach it to a picture.
Definition picture.c:493
vlc_video_context_type
Decoder device type.
Definition vlc_picture.h:96
picture_t * picture_NewFromFormat(const video_format_t *p_fmt)
This function will create a new picture using the given format.
picture_t * picture_Clone(picture_t *pic)
Perform a shallow picture copy.
Definition picture.c:473
void vlc_video_context_Release(vlc_video_context *)
Definition decoder_device.c:144
static void vlc_picture_chain_AppendChain(picture_t *chain, picture_t *tail)
Append a picture chain to a picture chain.
Definition vlc_picture.h:273
void picture_CopyProperties(picture_t *p_dst, const picture_t *p_src)
This function will copy all picture dynamic properties.
Definition picture.c:403
static void picture_Release(picture_t *picture)
Decrements the picture reference count.
Definition vlc_picture.h:374
struct vlc_ancillary * picture_GetAncillary(const picture_t *pic, vlc_ancillary_id id)
Return the ancillary identified by an ID.
Definition picture.c:516
static void picture_SwapUV(picture_t *picture)
Swap UV planes of a Tri Planars picture.
Definition vlc_picture.h:525
void picture_Reset(picture_t *)
This function will reset a picture information (properties and quantizers).
Definition picture.c:94
void plane_CopyPixels(plane_t *p_dst, const plane_t *p_src)
Definition picture.c:367
void picture_CopyPixels(picture_t *p_dst, const picture_t *p_src)
This function will copy the picture pixels.
Definition picture.c:418
int picture_Export(vlc_object_t *p_obj, block_t **pp_image, video_format_t *p_fmt, picture_t *p_picture, vlc_fourcc_t i_codec, int i_override_width, int i_override_height, bool b_crop)
This function will export a picture to an encoded bitstream.
Definition picture.c:525
static vlc_picture_chain_t picture_GetAndResetChain(picture_t *pic)
Reset a picture chain.
Definition vlc_picture.h:297
void * vlc_video_context_GetPrivate(vlc_video_context *, enum vlc_video_context_type)
Definition decoder_device.c:126
picture_t * picture_New(vlc_fourcc_t i_chroma, int i_width, int i_height, int i_sar_num, int i_sar_den)
This function will create a new picture.
Definition picture.c:335
int picture_AttachAncillary(picture_t *pic, struct vlc_ancillary *ancillary)
Attach an ancillary to the picture.
Definition picture.c:486
void picture_Destroy(picture_t *picture)
Destroys a picture without references.
Definition picture.c:350
static void vlc_picture_chain_Append(vlc_picture_chain_t *chain, picture_t *pic)
Append a picture to a picture chain.
Definition vlc_picture.h:257
#define PICTURE_PLANE_MAX
Maximum number of plane for a picture.
Definition vlc_picture.h:69
picture_t * picture_NewFromResource(const video_format_t *, const picture_resource_t *)
This function will create a new picture using the provided resource.
Definition picture.c:237
vlc_video_context * vlc_video_context_Hold(vlc_video_context *)
Definition decoder_device.c:138
void picture_Copy(picture_t *p_dst, const picture_t *p_src)
This function will copy both picture dynamic properties and pixels.
Definition picture.c:429
static void vlc_picture_chain_GetAndClear(vlc_picture_chain_t *in, vlc_picture_chain_t *out)
Copy the picture chain in another picture chain and clear the original picture chain.
Definition vlc_picture.h:285
vlc_decoder_device * vlc_video_context_HoldDevice(vlc_video_context *)
Get the decoder device used by the device context.
Definition decoder_device.c:156
enum vlc_video_context_type vlc_video_context_GetType(const vlc_video_context *)
Definition decoder_device.c:133
struct vlc_pic_chain vlc_picture_chain_t
picture chaining helpers
static vlc_video_context * picture_GetVideoContext(picture_t *pic)
Definition vlc_picture.h:169
static bool vlc_picture_chain_HasNext(const vlc_picture_chain_t *chain)
Check whether a picture chain has more than one picture.
Definition vlc_picture.h:215
vlc_video_context * vlc_video_context_Create(vlc_decoder_device *, enum vlc_video_context_type private_type, size_t private_size, const struct vlc_video_context_operations *)
Definition decoder_device.c:107
static bool picture_HasChainedPics(const picture_t *pic)
Check whether a picture has other pictures linked.
Definition vlc_picture.h:177
static picture_t * vlc_picture_chain_PeekFront(vlc_picture_chain_t *chain)
Peek the front of a picture chain.
Definition vlc_picture.h:246
int picture_Setup(picture_t *, const video_format_t *)
This function will setup all fields of a picture_t without allocating any memory.
static void vlc_picture_chain_Init(vlc_picture_chain_t *chain)
Initializes or reset a picture chain.
Definition vlc_picture.h:196
static bool vlc_picture_chain_IsEmpty(const vlc_picture_chain_t *chain)
Check whether a picture chain holds pictures or not.
Definition vlc_picture.h:207
static picture_t * vlc_picture_chain_PopFront(vlc_picture_chain_t *chain)
Pop the front of a picture chain.
Definition vlc_picture.h:227
@ VLC_VIDEO_CONTEXT_VDPAU
private: chroma type (YUV) or empty (RGB)
Definition vlc_picture.h:98
@ VLC_VIDEO_CONTEXT_VAAPI
private: vaapi_vctx* or empty
Definition vlc_picture.h:97
@ VLC_VIDEO_CONTEXT_GSTDECODE
empty
Definition vlc_picture.h:105
@ VLC_VIDEO_CONTEXT_D3D11VA
private: d3d11_video_context_t*
Definition vlc_picture.h:100
@ VLC_VIDEO_CONTEXT_MMAL
empty
Definition vlc_picture.h:104
@ VLC_VIDEO_CONTEXT_CVPX
private: cvpx_video_context*
Definition vlc_picture.h:103
@ VLC_VIDEO_CONTEXT_NVDEC
empty
Definition vlc_picture.h:102
@ VLC_VIDEO_CONTEXT_DXVA2
private: d3d9_video_context_t*
Definition vlc_picture.h:99
@ VLC_VIDEO_CONTEXT_AWINDOW
private: android_video_context_t*
Definition vlc_picture.h:101
@ Y_PLANE
Definition vlc_picture.h:504
@ A_PLANE
Definition vlc_picture.h:507
@ V_PLANE
Definition vlc_picture.h:506
@ U_PLANE
Definition vlc_picture.h:505
vlc_fourcc_t i_codec
Definition image.c:568
Definition vlc_picture.h:79
off_t offset
Definition vlc_picture.h:83
void * base
Definition vlc_picture.h:81
size_t size
Definition vlc_picture.h:82
int fd
Definition vlc_picture.h:80
Definition vlc_picture.h:72
void(* destroy)(struct picture_context_t *)
Definition vlc_picture.h:73
struct vlc_video_context * vctx
Definition vlc_picture.h:75
Resource for a picture.
Definition vlc_picture.h:327
int i_pitch
Number of bytes in a line, including margins.
Definition vlc_picture.h:338
void * p_sys
Definition vlc_picture.h:328
uint8_t * p_pixels
Start of the plane's data.
Definition vlc_picture.h:336
int i_lines
Number of lines, including margins.
Definition vlc_picture.h:337
Video picture.
Definition vlc_picture.h:130
unsigned int i_nb_fields
number of displayed fields
Definition vlc_picture.h:155
picture_context_t * context
video format-specific data pointer
Definition vlc_picture.h:156
int i_planes
number of allocated planes
Definition vlc_picture.h:137
bool b_top_field_first
which field is first
Definition vlc_picture.h:153
struct picture_t * p_next
Next picture in a FIFO a pictures.
Definition vlc_picture.h:164
vlc_tick_t date
display date
Definition vlc_picture.h:143
bool b_still
Definition vlc_picture.h:145
bool b_progressive
is it a progressive frame?
Definition vlc_picture.h:152
plane_t p[(5)]
description of the planes
Definition vlc_picture.h:136
void * p_sys
Private data - the video output plugin might want to put stuff here to keep track of the picture.
Definition vlc_picture.h:161
bool b_multiview_left_eye
left eye or right eye in multiview
Definition vlc_picture.h:154
video_frame_format_t format
The properties of the picture.
Definition vlc_picture.h:134
vlc_atomic_rc_t refs
Definition vlc_picture.h:166
bool b_force
Definition vlc_picture.h:144
Description of a planar graphic field.
Definition vlc_picture.h:50
int i_lines
Number of lines, including margins.
Definition vlc_picture.h:54
int i_visible_pitch
How many bytes for visible pixels are there?
Definition vlc_picture.h:62
int i_pixel_pitch
Size of a macropixel, defaults to 1.
Definition vlc_picture.h:58
uint8_t * p_pixels
Start of the plane's data.
Definition vlc_picture.h:51
int i_visible_lines
How many visible lines are there?
Definition vlc_picture.h:61
int i_pitch
Number of bytes in a line, including margins.
Definition vlc_picture.h:55
video format description
Definition vlc_es.h:356
Definition ancillary.c:31
Definition vlc_atomic.h:48
Decoder context struct.
Definition vlc_codec.h:606
Definition vlc_frame.h:123
VLC object common members.
Definition vlc_objects.h:53
picture chaining helpers
Definition vlc_picture.h:186
picture_t * tail
Definition vlc_picture.h:188
picture_t * front
Definition vlc_picture.h:187
Definition vlc_picture.h:90
void(* destroy)(void *priv)
Definition vlc_picture.h:91
Definition decoder_device.c:98
Atomic operations do not require locking, but they are not very powerful.
static bool vlc_atomic_rc_dec(vlc_atomic_rc_t *rc)
Decrement the RC and return true if it reaches 0.
Definition vlc_atomic.h:68
static void vlc_atomic_rc_inc(vlc_atomic_rc_t *rc)
Increment the RC.
Definition vlc_atomic.h:59
This file is a collection of common definitions and types.
This file defines the elementary streams format types.
uint32_t vlc_ancillary_id
Definition vlc_picture.h:38
int64_t vlc_tick_t
High precision date or time interval.
Definition vlc_tick.h:48