diff options
author | John Stebbins <[email protected]> | 2015-08-25 09:49:36 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2015-09-24 13:01:44 -0700 |
commit | 2f912311718e522b2fb5e2a06446fe84a4247025 (patch) | |
tree | 3edc8e0bf2940bf455e42c0d697c60b5995995e2 /libhb/common.h | |
parent | f122f66319ba45d607cfa89ba8f5fcfa5fc44840 (diff) |
libhb: add hb_buffer_list
This brings together several independent implementations of a simple
buffer list manager.
Diffstat (limited to 'libhb/common.h')
-rw-r--r-- | libhb/common.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libhb/common.h b/libhb/common.h index a928eb484..b540de9de 100644 --- a/libhb/common.h +++ b/libhb/common.h @@ -75,6 +75,7 @@ typedef struct hb_handle_s hb_handle_t; typedef struct hb_hwd_s hb_hwd_t; typedef struct hb_list_s hb_list_t; +typedef struct hb_buffer_list_s hb_buffer_list_t; typedef struct hb_rate_s hb_rate_t; typedef struct hb_dither_s hb_dither_t; typedef struct hb_mixdown_s hb_mixdown_t; @@ -130,6 +131,24 @@ typedef enum #include "libavcodec/qsv.h" #endif +struct hb_buffer_list_s +{ + hb_buffer_t *head; + hb_buffer_t *tail; + int count; +}; + +void hb_buffer_list_append(hb_buffer_list_t *list, hb_buffer_t *buf); +void hb_buffer_list_prepend(hb_buffer_list_t *list, hb_buffer_t *buf); +hb_buffer_t* hb_buffer_list_head(hb_buffer_list_t *list); +hb_buffer_t* hb_buffer_list_rem_head(hb_buffer_list_t *list); +hb_buffer_t* hb_buffer_list_tail(hb_buffer_list_t *list); +hb_buffer_t* hb_buffer_list_rem_tail(hb_buffer_list_t *list); +hb_buffer_t* hb_buffer_list_clear(hb_buffer_list_t *list); +hb_buffer_t* hb_buffer_list_set(hb_buffer_list_t *list, hb_buffer_t *buf); +void hb_buffer_list_close(hb_buffer_list_t *list); +int hb_buffer_list_count(hb_buffer_list_t *list); + hb_list_t * hb_list_init(); int hb_list_count( const hb_list_t * ); void hb_list_add( hb_list_t *, void * ); |