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

Method init_video_input

shared/annotation.py:850–896  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

848 return False
849
850 def init_video_input(self):
851
852 # TODO, we aren't actually 'raising" this error very well here.
853
854 if not self.video_data:
855 return
856
857 # TODO, we don't actually require video file id here anymore
858 # Since we now can pass as parent file ...
859
860 # If video data is provided it must be complete
861 spec_list = [
862 {'video_mode': {
863 'kind': bool,
864 'required': True
865 }
866 },
867 # TODO update to video_file_id
868 {'video_file_id': {
869 'kind': int,
870 'required': True
871 }
872 },
873 {'current_frame': {
874 'kind': int,
875 'required': True
876 }
877 },
878 {'set_parent_instance_list': {
879 'kind': bool,
880 'required': False
881 }
882 }
883 ]
884
885 self.log, input = regular_input.input_check_many(
886 spec_list = spec_list,
887 log = self.log,
888 untrusted_input = self.video_data)
889
890 if len(self.log["error"].keys()) >= 1:
891 return False
892
893 self.set_parent_instance_list = input['set_parent_instance_list']
894 self.video_mode = input['video_mode']
895 self.video_parent_file_id = input['video_file_id']
896 self.frame_number = input['current_frame']
897
898 def update_file_hash(self):
899

Callers 1

__post_init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected