1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 5 #include "py/builtin.h" 6 #include "py/obj.h" 7 #include "py/runtime.h" 8 9 extern const mp_obj_type_t video_player_type; 10 extern const mp_obj_type_t video_recorder_type; 11 extern const mp_obj_type_t video_camera_type; 12 13 STATIC const mp_rom_map_elem_t video_locals_dict_table[] = { 14 { MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_video) }, 15 { MP_OBJ_NEW_QSTR(MP_QSTR_Player), MP_ROM_PTR(&video_player_type) }, 16 { MP_OBJ_NEW_QSTR(MP_QSTR_Recorder), MP_ROM_PTR(&video_recorder_type) }, 17 { MP_OBJ_NEW_QSTR(MP_QSTR_camera), MP_ROM_PTR(&video_camera_type) }, 18 }; 19 20 STATIC MP_DEFINE_CONST_DICT(video_locals_dict, video_locals_dict_table); 21 22 const mp_obj_module_t video_module = { 23 .base = { &mp_type_module }, 24 .globals = (mp_obj_dict_t *)&video_locals_dict, 25 }; 26