openHevc学习笔记:工程代码基本结构

来源:互联网 发布:淘宝名不虚传 生意参谋 编辑:程序博客网 时间:2024/06/10 10:30

刚开始阅读代码有些困难,现采用广度遍历模式记录代码结构。并且添加部分注释,本文只记录主要函数执行顺序,具体代码分析和结构分析待更新。


1          Init_main()

1.1         c=getopt();//------------------------------------------------------ get the first option

1.2         while(c!=-1){switch case//-------------------------------------read options in a row

default:print_usage;

c=getopt

2          Video_decode_example(input_flie)

2.1         If(filename=NULL)         printf(“…”) ;exit;//----------------判断输入是否存在

2.2         libOpenHevcInit();//--------------------------------------------init Hevc

2.3         libOpenHevc SetCheck MD5();//--------------------------set check md5 mode

2.4         register_all();//--------------------------------------------------registerall components

2.5         av_format_alloc_context();//--------------------------------allocate memory

2.6         av_format_open_input();//----------------------------------open input file

2.7         video_stream=av_find_best_streams();//--------------find video stream in input file

2.8         extra_size_alloc=a||b?c:0;//-------------------------------是否有额外数据

lib_OpenHevc_Copy_Extra_Data();

2.9         libOpenHevcSetDebugMode();//------------------------set log level

2.10      libOpenHevcStartDecoder();//-----------------------------open decoders

2.11      InitFrameRateSDL();&&SetFrameRateSDL();

2.12      libOpenHevc SetTempleLayerid();

      libOpenHevc SetActive Decoder();

      libOpenHevc SetViewLayer():

2.13      while(!stop){

//************main loop****************

}

2.14      fclose();

2.15      free(openHevcFrameCpy.pvYY/U/V)

2.16      av_format_close_input();

2.17      lib_HevcClose();


0 0
原创粉丝点击