当前位置: 首页 > wzjs >正文

儋州个人建站哪家好百度认证号码平台

儋州个人建站哪家好,百度认证号码平台,上海建设银行官网网站,用wordpress二级导航栏1.AvFormatContext结构体 是ffmpeg中用于处理多媒体文件的核心结构体之一,属于libavformat模块,主要负责描述一个多媒体文件或流的封装格式,用来打开,读取,写入,操作媒体文件(如.MP4 .mkv .flv…

1.AvFormatContext结构体

是ffmpeg中用于处理多媒体文件的核心结构体之一,属于libavformat模块,主要负责描述一个多媒体文件或流的封装格式,用来打开,读取,写入,操作媒体文件(如.MP4 .mkv .flv等)

2.AvFormatContext常用字段

字段名类型说明
urlchar[1024]媒体文件路径
nb_streamsunsigned int媒体流数量(音频、视频、字幕等)
streamsAVStream **所有媒体流的数组
iformatAVInputFormat *输入格式(读取文件时使用)
oformatAVOutputFormat *输出格式(写文件时使用)
durationint64_t媒体总时长,单位为 AV_TIME_BASE
bit_rateint64_t平均比特率(bps)
start_timeint64_t媒体的起始时间戳
metadataAVDictionary *全局元数据(如标题、作者等)
pbAVIOContext *底层的 I/O 上下文(读写数据流用)

3.AvFormatContext的常用相关方法

函数名参数列表返回类型功能说明
avformat_alloc_contextAVFormatContext*分配并初始化 AVFormatContext(需手动释放)
avformat_open_inputAVFormatContext **ps, const char *url, AVInputFormat *fmt, AVDictionary **optionsint打开输入文件或流,并分配填充 AVFormatContext
avformat_find_stream_infoAVFormatContext *ic, AVDictionary **optionsint读取并分析媒体流信息(如分辨率、采样率等)
av_read_frameAVFormatContext *s, AVPacket *pktint读取一帧压缩的音频或视频数据(存入 AVPacket)
av_seek_frameAVFormatContext *s, int stream_index, int64_t timestamp, int flagsint按时间戳跳转媒体位置
avformat_close_inputAVFormatContext **svoid关闭输入文件并释放资源
av_dump_formatAVFormatContext *ic, int index, const char *url, int is_outputvoid打印文件的封装信息(流、格式、时长、码率等)
avformat_alloc_output_context2AVFormatContext **ctx, AVOutputFormat *oformat, const char *format_name, const char *filenameint创建输出文件的 AVFormatContext(推流或录制时使用)
av_interleaved_write_frameAVFormatContext *s, AVPacket *pktint将数据包写入输出媒体文件(带交错处理)
av_write_trailerAVFormatContext *sint写入尾部信息(完成文件封装)
avformat_free_contextAVFormatContext *svoid释放 AVFormatContext 所占用内存

4.常用字段的程序示例

#ifndef LIBAVFORMAT_CASE_H
#define LIBAVFORMAT_CASE_H
#include <libavformat/avformat.h>inline void printAVFormatContextCase(const char* input) {AVFormatContext *fmt_ctx = nullptr;avformat_open_input(&fmt_ctx, input, nullptr, nullptr);if(!fmt_ctx) {fprintf(stderr, "open file failed\n");return ;}printf("Filename: %s\n", fmt_ctx->url);printf("Number of streams: %u\n", fmt_ctx->nb_streams);printf("Duration (s): %.2f\n", fmt_ctx->duration / (double)AV_TIME_BASE);printf("Bitrate: %lld\n", fmt_ctx->bit_rate);printf("Start time: %lld\n", fmt_ctx->start_time);if (fmt_ctx->iformat)printf("Input format: %s\n", fmt_ctx->iformat->name);// 打印元数据AVDictionaryEntry *tag = NULL;while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) {printf("Metadata: %s = %s\n", tag->key, tag->value);}avformat_close_input(&fmt_ctx);
}

在这里插入图片描述

http://www.dtcms.com/wzjs/173820.html

相关文章:

  • 设计专业笔记本电脑推荐百度seo泛解析代发排名
  • 郑州建设局网站百度的广告推广需要多少费用
  • 北京建网江门搜狗网站推广优化
  • 资中移动网站建设seo外包优化公司
  • 广西崇左市住房和城乡建设局网站软文标题例子
  • 网站设计公司 上百度认证怎么认证
  • 苏州妙笔网络科技有限公司电商seo是什么
  • 网站主机ip是独立的好一键建站
  • 做dj网站用什么建站系统比较好网络培训课程
  • 做物品租赁网站网站设计制作在哪里找
  • 吴江网站建设哪家好谷歌seo推广服务
  • 域名备案与网站不一致seo刷关键词排名优化
  • 自己做网站好还是凡科关键词排名监控批量查询
  • 网站怎么做区域性优化网站排名软件推荐
  • 玛伊网站做兼职加入要多少钱网站百度权重
  • 关于网站建设live2500优化模型
  • 网页设计的首页如何设计官网进一步优化落实
  • 石家庄商标设计网络优化app哪个好
  • wordpress b站视频网站推广的目的
  • 司法网站建设运营情况淘宝运营培训班哪里有
  • 中国旅游预订网站的建设始于哪一年武汉网络推广有限公司
  • 2023年小微企业所得税优惠政策seo网站推广价格
  • 成都个人网站建设哪个网站是免费的
  • 网站图标生成交换链接营销的经典案例
  • python编程网站镇江网站
  • 网站开发百灵鸟优化泰安网站seo
  • 青岛网站维护原创文章代写平台
  • 郑州网站建设外贸淘宝代运营公司排名
  • 网站建设兴田德润ios aso优化工具
  • 做搜狗pc网站软件河北高端网站建设