昆明专业建站装修设计公司服务

news/2025/10/3 15:45:37/文章来源:
昆明专业建站,装修设计公司服务,小说短篇做的好的网站,四川建站参考链接 FFmpeg源代码简单分析#xff1a;avcodec_close()_雷霄骅的博客-CSDN博客_avcodec_close avcodec_close() 该函数用于关闭编码器avcodec_close()函数的声明位于libavcodec\avcodec.h#xff0c;如下所示。 ​该函数只有一个参数#xff0c;就是需要关闭的编码器的…参考链接 FFmpeg源代码简单分析avcodec_close()_雷霄骅的博客-CSDN博客_avcodec_close avcodec_close() 该函数用于关闭编码器avcodec_close()函数的声明位于libavcodec\avcodec.h如下所示。 ​该函数只有一个参数就是需要关闭的编码器的AVCodecContext。 /*** Close a given AVCodecContext and free all the data associated with it* (but not the AVCodecContext itself).** Calling this function on an AVCodecContext that hasnt been opened will free* the codec-specific data allocated in avcodec_alloc_context3() with a non-NULL* codec. Subsequent calls will do nothing.** note Do not use this function. Use avcodec_free_context() to destroy a* codec context (either open or closed). Opening and closing a codec context* multiple times is not supported anymore -- use multiple codec contexts* instead.*/ int avcodec_close(AVCodecContext *avctx);av_cold int avcodec_close(AVCodecContext *avctx) {int i;if (!avctx)return 0;if (avcodec_is_open(avctx)) {AVCodecInternal *avci avctx-internal;if (CONFIG_FRAME_THREAD_ENCODER avci-frame_thread_encoder avctx-thread_count 1) {ff_frame_thread_encoder_free(avctx);}if (HAVE_THREADS avci-thread_ctx)ff_thread_free(avctx);if (avci-needs_close ffcodec(avctx-codec)-close)ffcodec(avctx-codec)-close(avctx);avci-byte_buffer_size 0;av_freep(avci-byte_buffer);av_frame_free(avci-buffer_frame);av_packet_free(avci-buffer_pkt);if (avci-pkt_props) {while (av_fifo_can_read(avci-pkt_props)) {av_packet_unref(avci-last_pkt_props);av_fifo_read(avci-pkt_props, avci-last_pkt_props, 1);}av_fifo_freep2(avci-pkt_props);}av_packet_free(avci-last_pkt_props);av_packet_free(avci-in_pkt);av_frame_free(avci-in_frame);av_buffer_unref(avci-pool);if (avctx-hwaccel avctx-hwaccel-uninit)avctx-hwaccel-uninit(avctx);av_freep(avci-hwaccel_priv_data);av_bsf_free(avci-bsf);av_channel_layout_uninit(avci-initial_ch_layout);av_freep(avctx-internal);}for (i 0; i avctx-nb_coded_side_data; i)av_freep(avctx-coded_side_data[i].data);av_freep(avctx-coded_side_data);avctx-nb_coded_side_data 0;av_buffer_unref(avctx-hw_frames_ctx);av_buffer_unref(avctx-hw_device_ctx);if (avctx-priv_data avctx-codec avctx-codec-priv_class)av_opt_free(avctx-priv_data);av_opt_free(avctx);av_freep(avctx-priv_data);if (av_codec_is_encoder(avctx-codec)) {av_freep(avctx-extradata);avctx-extradata_size 0;} else if (av_codec_is_decoder(avctx-codec))av_freep(avctx-subtitle_header);avctx-codec NULL;avctx-active_thread_type 0;return 0; } 从avcodec_close()的定义可以看出该函数释放AVCodecContext中有关的变量并且调用了AVCodec的close()关闭了解码器 AVCodec-close() AVCodec的close()是一个函数指针指向了特定编码器的关闭函数。在这里我们以libx264为例看一下它对应的AVCodec的结构体的定义如下所示。 #if X264_BUILD 153 const #endif FFCodec ff_libx264_encoder {.p.name libx264,.p.long_name NULL_IF_CONFIG_SMALL(libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10),.p.type AVMEDIA_TYPE_VIDEO,.p.id AV_CODEC_ID_H264,.p.capabilities AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |AV_CODEC_CAP_OTHER_THREADS |AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE,.p.priv_class x264_class,.p.wrapper_name libx264,.priv_data_size sizeof(X264Context),.init X264_init,FF_CODEC_ENCODE_CB(X264_frame),.close X264_close,.defaults x264_defaults, #if X264_BUILD 153.init_static_data X264_init_static, #else.p.pix_fmts pix_fmts_all, #endif.caps_internal FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_AUTO_THREADS #if X264_BUILD 158| FF_CODEC_CAP_INIT_THREADSAFE #endif, }; #endif 从ff_libx264_encoder的定义可以看出close()函数对应的是X264_close()函数。继续看一下X264_close()函数的定义如下所示 从X264_close()的定义可以看出该函数调用了libx264的x264_encoder_close()关闭了libx264编码器 static av_cold int X264_close(AVCodecContext *avctx) {X264Context *x4 avctx-priv_data;av_freep(x4-sei);av_freep(x4-reordered_opaque);#if X264_BUILD 161x264_param_cleanup(x4-params); #endifif (x4-enc) {x264_encoder_close(x4-enc);x4-enc NULL;}return 0; }

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/926041.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

使用rem布局的网站网站开发5人小组分工

. 单论品牌(主要以登山鞋及徙步鞋为主): 高级品牌:SCARPA、ASOLO、MONTRAIL、ZAMBERLAN、vasque、Lowa、La Sportiva 价格都较高,单价都在千元以上,品质一流,做工精细。 中档品牌:Tr…

详细介绍:计算机视觉:OpenCV+Dlib 人脸检测

详细介绍:计算机视觉:OpenCV+Dlib 人脸检测pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", &qu…

怀化 网站建设国内网页加速器

文章目录 企业无线局域网部署最佳实践引言1. 无线网规划和设计a. 选择合适的频宽b. 网络规划工具c. 考虑物理环境d. 用户密度和需求e. 未来扩展f. 安全性和策略g. 测试和验证2. 无线局域网容量2.1 用户和设备预测2.2 应用流量分析2.3 带宽管理2.4 无线技术选择2.5 网络健康检查…

python 老生常谈的找2个excel相同列的行,把其中一个excel行的对应的值放入到另一个excel中

有个excel叫典型草原降水强度,还有个excel叫典型草原数浓度,这两个excel里面time和data_name列,time列里面的数据格式是YYYY-M-D空格H:S,data_name列里面是XXXX-时间戳,53192-20240510101700-20240510105559-0_N…

可信网站标识河南省考生服务平台官网

目录 服务端这么做服务端告知客户端使用 Basic Authentication 方式进行认证服务端接收并处理客户端按照 Basic Authentication 方式发送的数据 客户端这么做如果客户端是浏览器如果客户端是 RestTemplat如果客户端是 HttpClient 其它参考 服务端这么做 服务端告知客户端使用 …

wordpress建站优缺点服务中心网站建设意见

less 用来浏览超过一页的文件 用 / 可用来查找关键字 q键退出 cat -n 3.txt | less行号显示grep 文本处理工具,以行为单位找关键字 ls -l /boot | grep ^l grep 关键字 文件名 grep runlevel /etc/inittab 参数 -i忽略大小写 -n显示行号 -v排除关键字&#xff0…

【K8S】Kubernetes 调度器深度解析:原理与源码分析

@目录一、调度器架构概述1.1 核心架构设计1.2 调度器工作流程二、调度队列机制2.1 优先级队列实现2.2 Pod 优先级与抢占三、调度框架与插件系统3.1 框架扩展点3.2 插件注册与执行四、调度周期详细分析4.1 调度算法入口…

Elasticsearch MCP 服务器:与你的 Index 聊天 - 指南

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …

AI大事记4:从 ELIZA 到 ChatGPT—— 对话式 AI 的世纪征程(上) - 详解

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …

堆叠集成

为了让你彻底理解堆叠集成模型(尤其是项目中针对时序数据和小样本场景的定制化设计),我会从“核心概念拆解(结合项目实例)→ 分阶段运作流程(附代码细节)→ 设计逻辑深层原因(对应项目痛点)”三个维度,逐点展…

深入解析:逻辑回归(Logistic Regression)

深入解析:逻辑回归(Logistic Regression)pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "…

快速幂算法的基础和扩展

快速幂 快速幂(Fast Exponentiation)算法解决这样一个问题:求解自然数的指数运算。计算 \(a^b\) 时,按照指数定义的朴素的方法是通过连续相乘: \[a^b = \underbrace{a \times a \times \cdots \times a}_{b\text{…

网站模块名称移动端首页

学完本文,您将了解不同相机模型分类、内参意义,及对应的应用代码模型 标定的意义 建模三维世界点投影到二维图像平面的过程。标定输出的是相机模型。 相机模型 相机模型可以解理解为投影模型 +

概率与决策 - 模拟程序让你在选择中取胜

在人生中我们会处处面临抉择,是选择A还是选择B呢。作为程序员,看着这种概率与决策,有时候常在想,我怎么做决策我的胜率概率最大,能不能用程序来模拟一下。我选择A赢的概率,我选择B赢的概率呢?前言 在人生中我们…

题解:qoj6504 Flowers Land 2

人类智慧题。 题意:给出一个由 \(0,1,2\) 组成的字符串,每次给出一个区间,使 \(a_i\leftarrow (a_i+1)\mod 3\) 或者询问区间能否通过删除相邻两项使得整个串被删除。 做法: 首先注意到每次一定删除一个奇数位置的…

Prophet

Prophet模型深度解析:从设计理念到数学原理 Prophet是Meta(原Facebook)为商业场景时间序列预测开发的工具,核心设计目标是解决传统时序模型(如ARIMA、SARIMA)的痛点——对非平稳数据鲁棒性差、需手动处理趋势/季…

详细介绍:Jenkins:持续集成和持续交付(CI/CD)工具

详细介绍:Jenkins:持续集成和持续交付(CI/CD)工具pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas&qu…

详细介绍:范式革命:RDMA 如何让网络成为 “分布式内存总线”

详细介绍:范式革命:RDMA 如何让网络成为 “分布式内存总线”2025-10-03 15:09 tlnshuju 阅读(0) 评论(0) 收藏 举报pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !impor…

专业做家具的网站有哪些鹤峰网站制作

ArkTS语言入门 在学习ArkTS语言之前,我们首先需要一个能够编译并运行该语言的工具 DevEco Studio。 了解ArkTS ArkTS是OpenHarmony优选的主力应用开发语言。ArkTS围绕应用开发在TypeScript(简称TS)生态基础上做了进一步扩展,继…

大型活动临时组网的技术解析:如何构建高效稳定的通信网络

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …