1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! A heartbeat before each encoder and muxer call, for an outside stall watcher.
thread_local!
/// Calls `beat` on this thread before every encoder and muxer call a sink
/// makes, until the guard drops.
///
/// Some calls wait forever (`h264_vulkan` waits on fences with `UINT64_MAX`; `write(2)` to a stuck
/// hard-mounted share retries forever) and cannot be interrupted, so the driving thread reports
/// where it is and its owner decides when a call is stuck. The audio encoder's thread is covered by
/// the call that waits on it.
/// Ends a [`watch_encode_calls`] watch, restoring the one before it.
/// Tells this thread's [`watch_encode_calls`] watch, if any, that an encoder or muxer call
/// starts.