/* * scene.h * * Created on: 2025Äê7ÔÂ21ÈÕ * Author: 86189 */ #ifndef SCENE_H_ #define SCENE_H_ #include #include #include #include "hw_adapter.h" #include "IModule.h" #include "frames.h" class proc_field{ public: s32 proc_id; // Ä£¿éID s32 proc_type; //Ä£¿éÀàÐÍ s8 inportstr[8]; //Ä£¿éÊäÈëÂß¼­¶Ë¿Ú ID s8 outportstr[8]; //Ä£¿éÊä³öÂß¼­¶Ë¿Ú ID s8 dsp_index; //Ä£¿éËùÊôDSP,<0ÎÞЧ u8 fixed; //Ä£¿éÊÇ·ñ¿É¸ü»»£¬0-¿É¸ü»»£¬1-²»¿É¸ü»» u8 pad =0; u8 physic_type ;//1:input,2-output. u32 tag; //Ä£¿étag±êÇ©ÓÐÓÃÐÅÏ¢ void * parameters; //Ä£¿é²ÎÊý proc_field(s32 id, s32 type , const s8* inport_str,const s8* outport_str, s8 dsp_index, s8 is_fixed , void* param, u16 tag =0, u8 phy_type = 0){ this->proc_id = id ; this->proc_type = type ; strncpy(inportstr, inport_str, 8); strncpy(outportstr, outport_str, 8); this->dsp_index = dsp_index; this->fixed = is_fixed ; this->parameters = param; this->tag = tag; this->physic_type = phy_type; } }; class Scene { private: protected: std::vector proc_list; std::vector mModuleIndex; #define __MADD(p1,p2,p3,p4,p5,p6,p7,p8,p9) proc_list.push_back(proc_field(p1,p2,p3,p4,p5,p6,p7,p8,p9)) hw_adapter_t* hw_adapter = NULL; public: virtual ~Scene() { proc_list.clear(); delete hw_adapter; } Scene(hw_adapter_t* adapter) { hw_adapter = adapter; } hw_adapter_t* get_base_hw_adapter() { return hw_adapter; } //½âÎöinportstrºÍoutportstr, //×Ö·û´®×ª»»³ÉÂß¼­¶Ë¿ÚºÅ,·µ»ØÊäÈëÊä³ö¶Ë¿ÚÊýÁ¿. s32 str_delim(const s8* str, u16 logic_channel[]) ; virtual uvoid* get_module_param_ptr(s32 mtype, uvoid *param, s32 fixed) =0; //¸ù¾ÝÄ£¿éÀàÐ͸üÐÂÄ£¿éÐÅÏ¢. virtual s32 update_module() =0; //³É¹¦·µ»Ø0£¬Ê§°Ü·µ»Ø-1(ÄÚÈÝ´íÎó¡¢´óС²»Æ¥ÅäµÈ). virtual s32 set_parameters_content(uvoid* param, s32 size) =0; // ·µ»ØÍ¨µÀ²ÎÊý virtual void* get_parameters() = 0; // ·µ»ØÊäÈëÊä³öͨµÀµÄÄ£¿éID virtual s32** get_chin_mid() = 0; virtual s32** get_chout_mid() = 0; virtual s32 get_input_num() = 0; virtual s32 get_output_num() = 0; // virtual u32 get_module_id(u32 mid, s32 mtype ,u32 pid) =0; s32 convert_to_bin(u8* bin); void *get_param(s32 proc_id); }; #endif