MCPcopy Index your code
hub / github.com/diffgram/diffgram / FrameCompletionControl

Class FrameCompletionControl

walrus/methods/video/video.py:29–47  ·  view source on GitHub ↗

Small Data structure for controlling the pending vs processed frames in a more granular way.

Source from the content-addressed store, hash-verified

27# Design doc
28
29class FrameCompletionControl:
30 """
31 Small Data structure for controlling the pending vs processed frames
32 in a more granular way.
33 """
34
35 def __init__(self):
36 self.frames_completed_data = {}
37 self.completed_frames = 0
38
39 def mark_frame_complete(self, frame_num):
40 self.frames_completed_data[frame_num] = True
41 self.completed_frames += 1
42
43 def add_pending_frame(self, frame_num):
44 self.frames_completed_data[frame_num] = False
45
46 def get_total_frames(self):
47 return len(self.frames_completed_data.keys())
48
49
50class New_video():

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected