*/
#include <vlc_es.h>
+#include <vlc_atomic.h>
/** Description of a planar graphic field */
typedef struct plane_t
*/
#define PICTURE_PLANE_MAX (VOUT_MAX_PLANES)
+
/**
* A private definition to help overloading picture release
*/
-typedef struct picture_release_sys_t picture_release_sys_t;
+typedef struct picture_gc_sys_t picture_gc_sys_t;
/**
* Video picture
*/
video_frame_format_t format;
- void *p_data_orig; /**< pointer before memalign */
plane_t p[PICTURE_PLANE_MAX]; /**< description of the planes */
int i_planes; /**< number of allocated planes */
* These properties can be modified using the video output thread API,
* but should never be written directly */
/**@{*/
- unsigned i_refcount; /**< link reference counter */
mtime_t date; /**< display date */
bool b_force;
/**@}*/
picture_sys_t * p_sys;
/** This way the picture_Release can be overloaded */
- void (*pf_release)( picture_t * );
- picture_release_sys_t *p_release_sys;
+ struct
+ {
+ vlc_atomic_t refcount;
+ void (*pf_destroy)( picture_t * );
+ picture_gc_sys_t *p_sys;
+ } gc;
/** Next picture in a FIFO a pictures */
struct picture_t *p_next;
* This function will create a new picture.
* The picture created will implement a default release management compatible
* with picture_Hold and picture_Release. This default management will release
- * p_sys, p_q, p_data_orig fields if non NULL.
+ * p_sys, p_q, gc.p_sys fields if non NULL.
*/
VLC_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;