OBS图形渲染模块
2024-07-05
30
0
OBS图形渲染模块初始化时,其函烽调用关系如下:
- main-QT入口函数
- int run_program(fstream &logFile, int argc, char *argv[])
- OBSBasic::OBSInit()
- int OBSBasic::ResetVideo()
- int AttemptToResetVideo(struct obs_video_info *ovi)
———libobs———- - int obs_reset_video(struct obs_video_info *ovi)
- int obs_init_graphics(ovi);
- int obs_init_video(struct obs_video_info *ovi)
- pthread_create(obs_graphics_thread)
- int AttemptToResetVideo(struct obs_video_info *ovi)
以上函数各模块的功能如下:
主程序关系
类的继承关系如下:
class OBSBasic : public OBSMainWindow
class OBSApp : public QApplication
故OBSApp是应用类,而OBSBasic是主窗口类,所以初始化就和MFC类似了
bool OBSApp::OBSInit()
{
mainWindow = new OBSBasic();
mainWindow->OBSInit();
}