📄 main.c.svn-base
字号:
#include <stdio.h>#include <glib.h>#include <stdlib.h>#include "player_pub.h"#include "base_types.h"#include "instance.h"#include "swf_file_pub.h"#include "spliter_pub.h"#include "render_pub.h"#include "movie_clips_ins.h"#include "button_ins.h"#include "xwin_pub.h"#include "xwin_event.h"#include "pipe_cmd_pub.h"#include "pipe_out_pub.h"#include "sound_mixplay_pub.h"#include <assert.h>#include <pthread.h>pthread_t tid1,tid2,tid3,tid4,tid5;int tid1_id,tid2_id,tid3_id,tid4_id,tid5_id;player_t *player_p;void tid1_do(void) { swf_file_t *swf_p = player_p->_level0_p; swf_init_root(swf_p); player_do_tick(player_p);};void tid2_do(void) { xwin_t *xwin_p = player_p->xwin_p; xwin_event_get(xwin_p);};#ifdef WITH_RCvoid tid3_do(void) { pipe_cmd_t *pipe_cmd_p = player_p->pipe_cmd_p; pipe_cmd_run(pipe_cmd_p);};void tid4_do(void) { pipe_out_t *pipe_out_p = player_p->pipe_out_p; pipe_out_run(pipe_out_p);};#endif#ifdef WITH_SOUNDvoid tid5_do(void) { snd_mixplay_do();};#endifvoid my_on_exit(void) { printf("on_exit\n"); xwin_destory(player_p->xwin_p);};int main(int argc, char *argv[]) { swf_file_t *swf_p; spliter_t *spliter_p; render_t *render_p; changed_t *changed_p; xwin_t *xwin_p; player_prn_banner();#ifdef WITH_RC pipe_cmd_t *pipe_cmd_p; pipe_out_t *pipe_out_p;#endif atexit(my_on_exit); player_p = player_new(); player_arg(player_p,argc,argv); render_p = render_new(player_p); player_p->render_p = render_p;#ifdef WITH_RC pipe_cmd_p = pipe_cmd_new(player_p); player_p->pipe_cmd_p = pipe_cmd_p; pipe_out_p = pipe_out_new(player_p); player_p->pipe_out_p = pipe_out_p;#endif swf_p = swf_new(player_p); player_p->_level0_p = swf_p; changed_p = chg_new(swf_p); swf_p->changed_p = changed_p; spliter_p = spliter_new(swf_p); swf_p->spliter_p = spliter_p; spliter_read_head(spliter_p); xwin_p = xwin_new(player_p); player_p->xwin_p = xwin_p; spliter_read_tags(spliter_p); assert(pthread_create(&tid1,NULL,(void*)tid1_do,NULL)==0); assert(pthread_create(&tid2,NULL,(void*)tid2_do,NULL)==0);#ifdef WITH_RC assert(pthread_create(&tid3,NULL,(void*)tid3_do,NULL)==0); assert(pthread_create(&tid4,NULL,(void*)tid4_do,NULL)==0);#endif#ifdef WITH_SOUND assert(pthread_create(&tid5,NULL,(void*)tid5_do,NULL)==0);#endif assert(pthread_join(tid1,NULL)==0); assert(pthread_join(tid2,NULL)==0);#ifdef WITH_RC assert(pthread_join(tid3,NULL)==0); assert(pthread_join(tid4,NULL)==0);#endif#ifdef WITH_SOUND assert(pthread_join(tid5,NULL)==0);#endif return 0;};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -