Skip to content
Snippets Groups Projects
Commit edb2985f authored by Steve Lhomme's avatar Steve Lhomme
Browse files

filter: add a type to handle picture chains

Each implementation uses the same double pointer.

Eventually it may be replaced by a vlc_list but that implies adding an extra
pointer in the picture_t structure.
parent dc236ae1
No related branches found
No related tags found
No related merge requests found
......@@ -171,6 +171,32 @@ static inline vlc_video_context* picture_GetVideoContext(picture_t *pic)
* picture chaining helpers
*/
typedef struct vlc_pic_chain {
picture_t *front;
picture_t *tail;
} vlc_picture_chain_t;
/**
* Initializes or reset a picture chain
*
* \warning do not call this if the chain still holds pictures, it will leak them.
*/
static inline void vlc_picture_chain_Init(vlc_picture_chain_t *chain)
{
chain->front = NULL;
// chain->tail = NULL not needed
}
/**
* Check whether a picture chain holds pictures or not.
*
* \return true if it is empty.
*/
static inline bool vlc_picture_chain_IsEmpty(const vlc_picture_chain_t *chain)
{
return chain->front == NULL;
}
/**
* Pop the front of a picture chain.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment