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

本文是关于openHevc的学习笔记,通过广度遍历方式记录了代码结构,包括Init_main()和Video_decode_example()函数的执行顺序。从获取命令行选项开始,检查输入文件,初始化Hevc,设置校验MD5模式,注册组件,打开输入文件,寻找视频流,处理额外数据,设置日志级别,启动解码器,并进入主解码循环。最后关闭文件并释放资源。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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


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();


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值