MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ff_thread_progress_await

Function ff_thread_progress_await

libavcodec/threadprogress.c:64–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void ff_thread_progress_await(const ThreadProgress *pro_c, int n)
65{
66 /* Casting const away here is safe, because we only read from progress
67 * and will leave pro_c in the same state upon leaving the function
68 * as it had at the beginning. */
69 ThreadProgress *pro = (ThreadProgress*)pro_c;
70
71 if (atomic_load_explicit(&pro->progress, memory_order_acquire) >= n)
72 return;
73
74 ff_mutex_lock(&pro->progress_mutex);
75 while (atomic_load_explicit(&pro->progress, memory_order_relaxed) < n)
76 ff_cond_wait(&pro->progress_cond, &pro->progress_mutex);
77 ff_mutex_unlock(&pro->progress_mutex);
78}

Callers 11

decode_sliceFunction · 0.85
rv34_mcFunction · 0.85
rv34_decode_mvFunction · 0.85
ff_progress_frame_awaitFunction · 0.85
mpeg4_decode_mbFunction · 0.85
wavpack_decode_frameFunction · 0.85
guess_mvFunction · 0.85
is_intra_more_likelyFunction · 0.85
ff_er_frame_endFunction · 0.85
hls_decode_entry_wppFunction · 0.85

Calls 3

ff_mutex_lockFunction · 0.85
ff_cond_waitFunction · 0.85
ff_mutex_unlockFunction · 0.85

Tested by

no test coverage detected