商务网站建设策划书域名到期查询

web/2026/1/16 2:06:34/文章来源:
商务网站建设策划书,域名到期查询,wordpress+微官网主题,替老外做网站前言 在ffmpeg命令行中#xff0c;ffmpeg -i test -pix_fmt rgb24 test.rgb#xff0c;会自动打开ff_vf_scale滤镜#xff0c;本章主要追踪这个流程。 通过gdb可以发现其基本调用栈如下#xff1a; 可以看到#xff0c;query_formats#xff08;#xff09;中创建的v…前言 在ffmpeg命令行中ffmpeg -i test -pix_fmt rgb24 test.rgb会自动打开ff_vf_scale滤镜本章主要追踪这个流程。 通过gdb可以发现其基本调用栈如下 可以看到query_formats中创建的vf_scale滤镜 这是ffmpeg滤镜框架中的操作当avfilter进行query format的时候如果发现前后两个filter的pixformat不一致的时候就会在中间插入一个vf_scale的滤镜。这就是标题的答案。 但是本章内容主要讨论ffmpeg工具里面是如何调用avfilter的也就是从哪里开始创建哪里开始销毁以及中间是如何传递信息的。特别是当命令行中没有vf_scale的操作时ffmpeg工具是否会打开filter? 为了分析上述问题我们先用一定使用到vf_scale的命令 ffmpeg -i test -pix_fmt rgb24 test.rgb先找到调用avfilter的两个函数 ret av_buffersrc_add_frame_flags(ifilter-filter, frame, buffersrc_flags); ret av_buffersink_get_frame_flags(filter, filtered_frame,AV_BUFFERSINK_FLAG_NO_REQUEST);ffmpeg.h中定义了有关filter的三个结构体 typedef struct InputFilter {AVFilterContext *filter;struct InputStream *ist;struct FilterGraph *graph;uint8_t *name;enum AVMediaType type; // AVMEDIA_TYPE_SUBTITLE for sub2videoAVFifoBuffer *frame_queue;// parameters configured for this inputint format;int width, height;AVRational sample_aspect_ratio;int sample_rate;int channels;uint64_t channel_layout;AVBufferRef *hw_frames_ctx;int32_t *displaymatrix;int eof; } InputFilter;typedef struct OutputFilter {AVFilterContext *filter;struct OutputStream *ost;struct FilterGraph *graph;uint8_t *name;/* temporary storage until stream maps are processed */AVFilterInOut *out_tmp;enum AVMediaType type;/* desired output stream properties */int width, height;AVRational frame_rate;int format;int sample_rate;uint64_t channel_layout;// those are only set if no format is specified and the encoder gives us multiple options// They point directly to the relevant lists of the encoder.const int *formats;const uint64_t *channel_layouts;const int *sample_rates; } OutputFilter;typedef struct FilterGraph {int index;const char *graph_desc;AVFilterGraph *graph;int reconfiguration;// true when the filtergraph contains only meta filters// that do not modify the frame dataint is_meta;InputFilter **inputs;int nb_inputs;OutputFilter **outputs;int nb_outputs; } FilterGraph;我们通过上述线索寻找buffersrc和buffersink是在哪里创建的。 首先看buffersink通过 decode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_t *duration_pts, int eof,int *decode_failed)decode(ist-dec_ctx, decoded_frame, got_output, pkt)send_frame_to_filters(ist, decoded_frame)ifilter_send_frame(ist-filters[i], decoded_frame, i ist-nb_filters - 1)configure_filtergraph(fg)//reinitav_buffersrc_add_frame_flags(ifilter-filter, frame, buffersrc_flags)通过上面结构可知其中的configure_filtergraph(fg)//reinit是关键在这里初始化整个avfilter。 在这里我们回顾一下avfilter的关键调用流程 char args[512];int ret 0;const AVFilter *buffersrc avfilter_get_by_name(buffer);const AVFilter *buffersink avfilter_get_by_name(buffersink);AVFilterInOut *outputs avfilter_inout_alloc();AVFilterInOut *inputs avfilter_inout_alloc();AVRational time_base fmt_ctx-streams[video_stream_index]-time_base;enum AVPixelFormat pix_fmts[] { AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE };filter_graph avfilter_graph_alloc();if (!outputs || !inputs || !filter_graph) {ret AVERROR(ENOMEM);goto end;}/* buffer video source: the decoded frames from the decoder will be inserted here. */snprintf(args, sizeof(args),video_size%dx%d:pix_fmt%d:time_base%d/%d:pixel_aspect%d/%d,dec_ctx-width, dec_ctx-height, dec_ctx-pix_fmt,time_base.num, time_base.den,dec_ctx-sample_aspect_ratio.num, dec_ctx-sample_aspect_ratio.den);ret avfilter_graph_create_filter(buffersrc_ctx, buffersrc, in,args, NULL, filter_graph);if (ret 0) {av_log(NULL, AV_LOG_ERROR, Cannot create buffer source\n);goto end;}/* buffer video sink: to terminate the filter chain. */ret avfilter_graph_create_filter(buffersink_ctx, buffersink, out,NULL, NULL, filter_graph);if (ret 0) {av_log(NULL, AV_LOG_ERROR, Cannot create buffer sink\n);goto end;}ret av_opt_set_int_list(buffersink_ctx, pix_fmts, pix_fmts,AV_PIX_FMT_NONE, AV_OPT_SEARCH_CHILDREN);if (ret 0) {av_log(NULL, AV_LOG_ERROR, Cannot set output pixel format\n);goto end;}outputs-name av_strdup(in);outputs-filter_ctx buffersrc_ctx;outputs-pad_idx 0;outputs-next NULL;/** The buffer sink input must be connected to the output pad of* the last filter described by filters_descr; since the last* filter output label is not specified, it is set to out by* default.*/inputs-name av_strdup(out);inputs-filter_ctx buffersink_ctx;inputs-pad_idx 0;inputs-next NULL;if ((ret avfilter_graph_parse_ptr(filter_graph, filters_descr,inputs, outputs, NULL)) 0)goto end;if ((ret avfilter_graph_config(filter_graph, NULL)) 0)goto end;...回到ifilter_send_frame()中来 static int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame, int keep_reference) {FilterGraph *fg ifilter-graph;AVFrameSideData *sd;int need_reinit, ret;int buffersrc_flags AV_BUFFERSRC_FLAG_PUSH;if (keep_reference)buffersrc_flags | AV_BUFFERSRC_FLAG_KEEP_REF;/* determine if the parameters for this input changed *///如果输入和frame中的format不一致就会引起reinitneed_reinit ifilter-format ! frame-format;switch (ifilter-ist-st-codecpar-codec_type) {case AVMEDIA_TYPE_VIDEO:need_reinit | ifilter-width ! frame-width ||ifilter-height ! frame-height;break;}if (!ifilter-ist-reinit_filters fg-graph)need_reinit 0;if (!!ifilter-hw_frames_ctx ! !!frame-hw_frames_ctx ||(ifilter-hw_frames_ctx ifilter-hw_frames_ctx-data ! frame-hw_frames_ctx-data))need_reinit 1;if (sd av_frame_get_side_data(frame, AV_FRAME_DATA_DISPLAYMATRIX)) {if (!ifilter-displaymatrix || memcmp(sd-data, ifilter-displaymatrix, sizeof(int32_t) * 9))need_reinit 1;} else if (ifilter-displaymatrix)need_reinit 1;if (need_reinit) {//ifilter从这里获取到w,h,pix等信息ret ifilter_parameters_from_frame(ifilter, frame);if (ret 0)return ret;}/* (re)init the graph if possible, otherwise buffer the frame and return */if (need_reinit || !fg-graph) {ret configure_filtergraph(fg);if (ret 0) {av_log(NULL, AV_LOG_ERROR, Error reinitializing filters!\n);return ret;}}ret av_buffersrc_add_frame_flags(ifilter-filter, frame, buffersrc_flags);if (ret 0) {if (ret ! AVERROR_EOF)av_log(NULL, AV_LOG_ERROR, Error while filtering: %s\n, av_err2str(ret));return ret;}return 0; }继续回到onfigure_filtergraph(fg) 删除了与本题无关的代码 int configure_filtergraph(FilterGraph *fg) {AVFilterInOut *inputs, *outputs, *cur;//这里判断是否是simple因为我们的命令行中没有avfilter故此为trueint ret, i, simple filtergraph_is_simple(fg);//int filtergraph_is_simple(FilterGraph *fg)//{return !fg-graph_desc;}//这里其实就是NULLconst char *graph_desc simple ? fg-outputs[0]-ost-avfilter :fg-graph_desc;cleanup_filtergraph(fg);//创建图if (!(fg-graph avfilter_graph_alloc()))return AVERROR(ENOMEM);if (simple) {//获取到outputstreamOutputStream *ost fg-outputs[0]-ost;char args[512];const AVDictionaryEntry *e NULL;} else {fg-graph-nb_threads filter_complex_nbthreads;}//这里在我们这里可以跳过因为graph_desc为nullif ((ret avfilter_graph_parse2(fg-graph, graph_desc, inputs, outputs)) 0)goto fail;//这里是配置buffersrc的地方for (cur inputs, i 0; cur; cur cur-next, i){if ((ret configure_input_filter(fg, fg-inputs[i], cur)) 0) {avfilter_inout_free(inputs);avfilter_inout_free(outputs);goto fail;}}avfilter_inout_free(inputs);//这里是配置buffersink的地方for (cur outputs, i 0; cur; cur cur-next, i)configure_output_filter(fg, fg-outputs[i], cur);avfilter_inout_free(outputs);if (!auto_conversion_filters)avfilter_graph_set_auto_convert(fg-graph, AVFILTER_AUTO_CONVERT_NONE);//avfilter的标准调用if ((ret avfilter_graph_config(fg-graph, NULL)) 0)goto fail;fg-is_meta graph_is_meta(fg-graph);return 0; }接下来继续看如何配置input_filter的 static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,AVFilterInOut *in) {AVFilterContext *last_filter;//创建bufferconst AVFilter *buffer_filt avfilter_get_by_name(buffer);const AVPixFmtDescriptor *desc;InputStream *ist ifilter-ist;InputFile *f input_files[ist-file_index];AVRational tb ist-framerate.num ? av_inv_q(ist-framerate) :ist-st-time_base;AVRational fr ist-framerate;AVRational sar;AVBPrint args;char name[255];int ret, pad_idx 0;int64_t tsoffset 0;AVBufferSrcParameters *par av_buffersrc_parameters_alloc();if (!par)return AVERROR(ENOMEM);memset(par, 0, sizeof(*par));par-format AV_PIX_FMT_NONE;if (!fr.num)fr av_guess_frame_rate(input_files[ist-file_index]-ctx, ist-st, NULL);sar ifilter-sample_aspect_ratio;if(!sar.den)sar (AVRational){0,1};av_bprint_init(args, 0, AV_BPRINT_SIZE_AUTOMATIC);//这里是配置buffersrc的地方av_bprintf(args,video_size%dx%d:pix_fmt%d:time_base%d/%d:pixel_aspect%d/%d,ifilter-width, ifilter-height, ifilter-format,tb.num, tb.den, sar.num, sar.den);if (fr.num fr.den)av_bprintf(args, :frame_rate%d/%d, fr.num, fr.den);snprintf(name, sizeof(name), graph %d input from stream %d:%d, fg-index,ist-file_index, ist-st-index);//创建filterctxif ((ret avfilter_graph_create_filter(ifilter-filter, buffer_filt, name,args.str, NULL, fg-graph)) 0)goto fail;par-hw_frames_ctx ifilter-hw_frames_ctx;ret av_buffersrc_parameters_set(ifilter-filter, par);if (ret 0)goto fail;av_freep(par);last_filter ifilter-filter;desc av_pix_fmt_desc_get(ifilter-format);av_assert0(desc);snprintf(name, sizeof(name), trim_in_%d_%d,ist-file_index, ist-st-index);if (copy_ts) {tsoffset f-start_time AV_NOPTS_VALUE ? 0 : f-start_time;if (!start_at_zero f-ctx-start_time ! AV_NOPTS_VALUE)tsoffset f-ctx-start_time;}//插入trimret insert_trim(((f-start_time AV_NOPTS_VALUE) || !f-accurate_seek) ?AV_NOPTS_VALUE : tsoffset, f-recording_time,last_filter, pad_idx, name);if (ret 0)return ret;//链接if ((ret avfilter_link(last_filter, 0, in-filter_ctx, in-pad_idx)) 0)return ret;return 0; fail:av_freep(par);return ret; }下面是configure_output_filter static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out) {OutputStream *ost ofilter-ost;OutputFile *of output_files[ost-file_index];AVFilterContext *last_filter out-filter_ctx;AVBPrint bprint;int pad_idx out-pad_idx;int ret;const char *pix_fmts;char name[255];snprintf(name, sizeof(name), out_%d_%d, ost-file_index, ost-index);//创建buffersinkret avfilter_graph_create_filter(ofilter-filter,avfilter_get_by_name(buffersink),name, NULL, NULL, fg-graph);if (ret 0)return ret;//这个scale完全就是尺寸的resizeif ((ofilter-width || ofilter-height) ofilter-ost-autoscale) {char args[255];AVFilterContext *filter;const AVDictionaryEntry *e NULL;//这里只有size的scale并没有颜色空间的转换snprintf(args, sizeof(args), %d:%d,ofilter-width, ofilter-height);while ((e av_dict_get(ost-sws_dict, , e,AV_DICT_IGNORE_SUFFIX))) {av_strlcatf(args, sizeof(args), :%s%s, e-key, e-value);}snprintf(name, sizeof(name), scaler_out_%d_%d,ost-file_index, ost-index);if ((ret avfilter_graph_create_filter(filter, avfilter_get_by_name(scale),name, args, NULL, fg-graph)) 0)return ret;if ((ret avfilter_link(last_filter, pad_idx, filter, 0)) 0)return ret;last_filter filter;pad_idx 0;}av_bprint_init(bprint, 0, AV_BPRINT_SIZE_UNLIMITED);//如果设置了输出的pix_fmt 那么就会在这里增加一个format的的avfilter//这个format其实什么也不做就是指定一个中间format用来在协商的时候//确定是否增加中间的csc swscaleif ((pix_fmts choose_pix_fmts(ofilter, bprint))) {AVFilterContext *filter;ret avfilter_graph_create_filter(filter,avfilter_get_by_name(format),format, pix_fmts, NULL, fg-graph);av_bprint_finalize(bprint, NULL);if (ret 0)return ret;if ((ret avfilter_link(last_filter, pad_idx, filter, 0)) 0)return ret;last_filter filter;pad_idx 0;}if (ost-frame_rate.num 0) {AVFilterContext *fps;char args[255];snprintf(args, sizeof(args), fps%d/%d, ost-frame_rate.num,ost-frame_rate.den);snprintf(name, sizeof(name), fps_out_%d_%d,ost-file_index, ost-index);ret avfilter_graph_create_filter(fps, avfilter_get_by_name(fps),name, args, NULL, fg-graph);if (ret 0)return ret;ret avfilter_link(last_filter, pad_idx, fps, 0);if (ret 0)return ret;last_filter fps;pad_idx 0;}snprintf(name, sizeof(name), trim_out_%d_%d,ost-file_index, ost-index);ret insert_trim(of-start_time, of-recording_time,last_filter, pad_idx, name);if (ret 0)return ret;if ((ret avfilter_link(last_filter, pad_idx, ofilter-filter, 0)) 0)return ret;return 0; }所以对于ffmpeg中的graph来说依次为 ff_vsrc_buffer-ff_vf_null-(scale resize)-ff_vf_format(命令行中由format的参数)-(fps )-(trim)-ff_buffersink。 中间括号内的是几个选择的avfilter。 协商format的时候最后会协商一个ff_vsrc_buffer的pix fomat. 最后用一个rawenc去将frame编码为pkt…

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

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

相关文章

微信小程序推广赚佣金泉州网站关键词优化

当自然数 n 依次取 1、2、3、……、N 时,算式 ⌊ 有多少个不同的值?(注:⌊ 为取整函数,表示不超过 x 的最大自然数,即 x 的整数部分。) 输入格式: 输入给出一个正整数 N(…

个人网站服务器租用如何建设网站后台

网络抓包与协议分析 一. 以太网帧格式分析 这是以太网数据帧的基本格式,包含目的地址(6 Byte)、源地址(6 Byte)、类型(2 Byte)、数据(46~1500 Byte)、FCS(4 Byte)。 Mac 地址类型 分为单播地址、组播地址、广播地址。 单播地址:是指第一个字节的最低位…

一般网站用什么数据库襄阳seo站内优化

个人认为这是一篇很好,值得看的文章,但是没啥大用,可供参考。 数字化转型是一个复杂而全面的过程,它涉及到从战略规划到具体执行的多个层面。根据提供的信息,我们可以从以下几个方面来理解和探讨数字化转型的从战略到执…

wap企业网站模板济南网站设计建设公司

语法 sqlite3 命令的基本语法如下&#xff1a; $sqlite3 DatabaseName.db 通常情况下&#xff0c;数据库名称在 RDBMS 内应该是唯一的。 实例 如果您想创建一个新的数据库 <testDB.db>&#xff0c;SQLITE3 语句如下所示&#xff1a; $sqlite3 testDB.db SQLite ver…

山东seo网络推广seo入门培训课程

1. 两种异常处理机制 1.1 使用 throw 关键字手动抛出异常 使用throw关键字抛出异常&#xff0c;代码会的显得简单明了 如下图所示 1.2 使用 try-catch 捕获异常 使用try-catch进行捕获异常&#xff0c;往往会使代码变得更加笼统&#xff0c;层层包裹 如下图所示 2. 自定义…

网站建设入门培训阿里云商标注册

三极管 基本概念应用电路 基本概念 三极管 NPN 和PNP 电流方向 PNP是从e 流向 b c NPN是从 b c流向e 应用电路 箭头出发方向的电极比箭头指向方向的电极&#xff0c;高0.7v才导通。 NPN控制下游是否接到地&#xff0c;PNP控制上游的电源能否接过来。

网站推广渠道咨询长沙网站建设联系电话

P4768 [NOI2018] 归程 给定一个nnn个点&#xff0c;mmm条边的无向联通图&#xff0c;边的描述为[u,v,l,a][u, v, l, a][u,v,l,a]&#xff0c;表示uuu&#xff0c;vvv连有一条长度为lll&#xff0c;海拔为aaa的边&#xff0c; 有QQQ个询问&#xff0c;每次给出一个出发点uuu和…

上海排名优化工具价格宁波seo软件

局域网交换机作为局域网的集中连接设备&#xff0c;它的接口类型是随着各种局域网和传输介质类型的发展而变化的&#xff0c;交换机的许多接口与路由器接口完全一样。接下来就由杭州飞畅的小编来为大家介绍下交换机的接口类型以及连接方式有哪些&#xff1f;一起来看看吧&#…

企业做网站有什么用dede 更新网站地图

首先&#xff0c;为全面披露信息&#xff0c;在过去的1.5年中&#xff0c; 我一直担任 FuseSource&#xff08;现为Red Hat&#xff09; 的顾问&#xff0c;为零售&#xff0c;运输&#xff0c;银行/金融等不同行业的大型和小型公司提供SOA和集成项目支持。我的专长是使用该领域…

织梦素材网站模板全运会为什么建设网站

day29 内部类 分类 非静态成员内部类 静态成员内部类 局部内部类 匿名内部类 概念 在一个类的内部&#xff0c;再定义一个完整的类 特点&#xff1a; 编译之后可以生成一个独立的字节码class文件 内部类可以直接访问外部类的私有成员&#xff0c;而不会破坏其封装性 可以为外…

泰州网站建设方案推广软文写作的三个要素

From: http://www.cnblogs.com/ggjucheng/archive/2012/01/14/2322659.html 简介 用简单的话来定义tcpdump&#xff0c;就是&#xff1a;dump the traffic on a network&#xff0c;根据使用者的定义对网络上的数据包进行截获的包分析工具。 tcpdump可以将网络中传送的数据包…

模板网站 建设教材凡客生活

0说明 IPAM&#xff1a;IP地址管理系统 IP地址管理(IPAM)是指的一种方法IP扫描&#xff0c;IP地址跟踪和管理与网络相关的信息的互联网协议地址空间和IPAM系统。 IPAM软件和IP的工具,管理员可以确保分配IP地址仍然是当前和足够的库存先进的IP工具和IPAM服务。 IPAM简化并自动化…

优秀北京网站建设模板做网站

给你一个无重复元素的整数数组 candidates 和一个目标整数 target &#xff0c;找出 candidates 中可以使数字和为目标数 target 的所有不同组合 &#xff0c;并以列表形式返回。你可以按 任意顺序返回这些组合。 candidates 中的同一个数字可以无限制重复被选取 。如果至少一个…

jq做6个网站做什么好如何做网络投票网站

文章目录 前言一、RetinaNet的网络结构和流程二、RetinaNet的创新点Balanced Cross EntropyFocal Loss 总结 前言 根据前文目标检测-One Stage-YOLOv2可以看出YOLOv2的速度和精度都有相当程度的提升&#xff0c;但是One Stage目标检测模型仍存在一个很大的问题&#xff1a; 前…

哪个网站做的win10系统做网站找外包好吗

测试环境 CDH 6.3.1 Sqoop 1.4.7 一.Sqoop概述 Apache Sqoop&#xff08;SQL-to-Hadoop&#xff09;项目旨在协助RDBMS与Hadoop之间进行高效的大数据交流。用户可以在 Sqoop 的帮助下&#xff0c;轻松地把关系型数据库的数据导入到 Hadoop 与其相关的系统 (如HBase和Hive)中&…

个人电影网站备案黄岩区建设规划局网站

自学python如何成为大佬(目录):https://blog.csdn.net/weixin_67859959/article/details/139049996?spm1001.2014.3001.5501 1 关闭文件 打开文件后&#xff0c;需要及时关闭&#xff0c;以免对文件造成不必要的破坏。关闭文件可以使用文件对象的close()方法实现。close()方…

免费ui网站网页模板网站有那些

在 https://www.jb51.net/article/151520.htm这篇文章中&#xff0c;我们介绍了在 Angular-CLI 中引入 simple-mock 的方法。本文以 Vue-CLI 为例介绍引入 simple-mock 实现前端开发数据模拟的步骤。本质上这里介绍的是在 webpack-dev-server 中配置 simple-mock 实现 API Mock…

网站建设免费模板北京公司网站建设价格

c日志工具之——log4cpp ECU唤醒的本质就是给ECU供电。 小文件&#xff1a;零拷贝技术 传输大文件&#xff1a;异步 IO 、直接 IO&#xff1a;如何高效实现文件传输&#xff1a;小文件采用零拷贝、大文件采用异步io直接io (123条消息) Linux网络编程 | 彻底搞懂…

做网站需要招什么职位我国科技发展动态最新消息

01-FileZilla简介 FileZilla 是一个常用的文件传输工具&#xff0c;它支持多种文件传输协议&#xff0c;包括以下主要协议&#xff1a; FTP (File Transfer Protocol) 这是 FileZilla 最基本支持的协议。FTP 是一种明文传输协议&#xff0c;不加密数据&#xff08;包括用户名和…

昆明设计网站如何建设一个查询网站

错误码 意义 一般 0x800C01310x800C013E 可能是 Folders.dbx 档案属性错误或损坏. 0x800CCC00 身份验证&#xff08;Authentication&#xff09;未载入 0x800CCC01 认证&#xff08;Certificate&#xff09;内容错误 0x800CCC02 认证日期错误 0x800CCC03 使用者已联机 0x800CCC…