forked from homuler/MediaPipeUnityPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIDemoGraph.cs
More file actions
35 lines (29 loc) · 1.11 KB
/
Copy pathIDemoGraph.cs
File metadata and controls
35 lines (29 loc) · 1.11 KB
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
using Mediapipe;
public interface IDemoGraph<T> {
/// <summary>
/// This method must be called (only) once before calling StartRun.
/// CalculatorGraph should be initialized here.
/// </summary>
void Initialize();
/// <summary>
/// Initialize the graph with GPU enabled.
/// </summary>
void Initialize(GpuResources gpuResources, GlCalculatorHelper gpuHelper);
/// <summary>
/// This method must be called (only) once before starting to process images.
/// At least, `CalculatorGraph#StartRun` must be called here.
/// It is also necessary to initialize OutputStreamPollers.
/// </summary>
Status StartRun();
Status PushInput(T input);
/// <summary>
/// Fetch output packets and render the result.
/// </summary>
/// <param name="screenController">Controller of the screen where the result is rendered</param>
/// <param name="input">
/// Input data that is already sent to an input stream.
/// Its timestamp should correspond to that of the next output packet (if exists).
/// </param>
void RenderOutput(WebCamScreenController screen, T input);
void Stop();
}