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

Function hb_fifo_get

libhb/fifo.c:1299–1321  ·  view source on GitHub ↗

Pulls a packet out of this FIFO, or returns NULL if no packet is available.

Source from the content-addressed store, hash-verified

1297
1298// Pulls a packet out of this FIFO, or returns NULL if no packet is available.
1299hb_buffer_t * hb_fifo_get( hb_fifo_t * f )
1300{
1301 hb_buffer_t * b;
1302
1303 hb_lock( f->lock );
1304 if( f->size < 1 )
1305 {
1306 hb_unlock( f->lock );
1307 return NULL;
1308 }
1309 b = f->first;
1310 f->first = b->next;
1311 b->next = NULL;
1312 f->size -= 1;
1313 if( f->wait_full && f->size == f->capacity - f->thresh )
1314 {
1315 f->wait_full = 0;
1316 hb_cond_signal( f->cond_full );
1317 }
1318 hb_unlock( f->lock );
1319
1320 return b;
1321}
1322
1323hb_buffer_t * hb_fifo_see_wait( hb_fifo_t * f )
1324{

Callers 12

hb_get_previewFunction · 0.85
vobsub_workFunction · 0.85
ssa_workFunction · 0.85
textsub_workFunction · 0.85
pgssub_workFunction · 0.85
hb_vfr_workFunction · 0.85
hb_buffer_pool_freeFunction · 0.85
hb_buffer_init_internalFunction · 0.85
hb_fifo_closeFunction · 0.85
hb_fifo_flushFunction · 0.85
LookForAudioFunction · 0.85
filter_bufFunction · 0.85

Calls 3

hb_lockFunction · 0.85
hb_unlockFunction · 0.85
hb_cond_signalFunction · 0.85

Tested by

no test coverage detected