分类: C/C++
2014-05-27 22:05:20
流程图:
代码:
//入口函数,初始化SDL 库,注册SDL 消息事件,启动文件解析线程,进入消息循环。 int main(int argc, char **argv) { int flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER; av_register_all(); input_filename = "C:\\Users\\vanny\\Desktop\\temp\\ffmpegtutorial\\ffplay_simple\\clocktxt_320.avi"; // input_filename = "d:/yuv/clocktxt.avi"; if (SDL_Init(flags)) exit(1); SDL_EventState(SDL_ACTIVEEVENT, SDL_IGNORE); SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE); SDL_EventState(SDL_SYSWMEVENT, SDL_IGNORE); SDL_EventState(SDL_USEREVENT, SDL_IGNORE); cur_stream = stream_open(input_filename, file_iformat); event_loop(); return 0; }
解释:
其他:
下次从线程说起