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

Function hb_set_state

libhb/hb.c:2385–2399  ·  view source on GitHub ↗

* Sets the current state. * @param h Handle to hb_handle_t * @param s Handle to new hb_state_t */

Source from the content-addressed store, hash-verified

2383 * @param s Handle to new hb_state_t
2384 */
2385void hb_set_state( hb_handle_t * h, hb_state_t * s )
2386{
2387 hb_lock( h->pause_lock );
2388 hb_lock( h->state_lock );
2389 memcpy( &h->state, s, sizeof( hb_state_t ) );
2390 if( h->state.state == HB_STATE_WORKING ||
2391 h->state.state == HB_STATE_SEARCHING )
2392 {
2393 // Set which job is being worked on
2394 if (h->current_job)
2395 h->state.sequence_id = h->current_job->sequence_id;
2396 }
2397 hb_unlock( h->state_lock );
2398 hb_unlock( h->pause_lock );
2399}
2400
2401void hb_set_work_error( hb_handle_t * h, hb_error_code err )
2402{

Callers 10

muxCloseFunction · 0.85
UpdateStateFunction · 0.85
UpdateSearchStateFunction · 0.85
InitWorkStateFunction · 0.85
SetWorkStateInfoFunction · 0.85
UpdateStateFunction · 0.85
hb_scan_initFunction · 0.85
UpdateState1Function · 0.85
UpdateState2Function · 0.85
UpdateState3Function · 0.85

Calls 2

hb_lockFunction · 0.85
hb_unlockFunction · 0.85

Tested by

no test coverage detected