MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / hb_fifo_init

Function hb_fifo_init

libhb/fifo.c:1194–1210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1192}
1193
1194hb_fifo_t * hb_fifo_init( int capacity, int thresh )
1195{
1196 hb_fifo_t * f;
1197 f = calloc( sizeof( hb_fifo_t ), 1 );
1198 f->lock = hb_lock_init();
1199 f->cond_full = hb_cond_init();
1200 f->cond_empty = hb_cond_init();
1201 f->capacity = capacity;
1202 f->thresh = thresh;
1203 f->buffer_size = 0;
1204
1205#if defined(HB_FIFO_DEBUG)
1206 // Add the fifo to the global fifo list
1207 fifo_list_add( f );
1208#endif
1209 return f;
1210}
1211
1212void hb_fifo_register_full_cond( hb_fifo_t * f, hb_cond_t * c )
1213{

Callers 6

hb_get_previewFunction · 0.85
do_jobFunction · 0.85
hb_vfr_initFunction · 0.85
hb_buffer_pool_initFunction · 0.85
LookForAudioFunction · 0.85
update_filtersFunction · 0.85

Calls 3

hb_lock_initFunction · 0.85
hb_cond_initFunction · 0.85
fifo_list_addFunction · 0.85

Tested by

no test coverage detected