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

FFMPEG: [ API ] >打开/关闭一个输入文件

它们是成对出现的.

ffmpeg 把输入文件--转换成--->AVFormatContext实例

 

◆ avformat_open_input()

int avformat_open_input(AVFormatContext ** ps,
const char * url,
ff_const59 AVInputFormat * fmt,
AVDictionary ** options 
)

Open an input stream and read the header.

The codecs are not opened. The stream must be closed with avformat_close_input().

Parameters

ps

Pointer to user-supplied AVFormatContext (allocated by avformat_alloc_context). May be a pointer to NULL, in which case an AVFormatContext is allocated by this function and written into ps. Note that a user-supplied AVFormatContext will be freed on failure.

(输出参数: 返回格式上下文实例)

urlURL of the stream to open.
fmtIf non-NULL, this parameter forces a specific input format. Otherwise the format is autodetected.
optionsA dictionary filled with AVFormatContext and demuxer-private options. On return this parameter will be destroyed and replaced with a dict containing options that were not found. May be NULL.

Returns

0 on success, a negative AVERROR on failure.

◆ avformat_close_input()

void avformat_close_input(AVFormatContext ** s)

Close an opened input AVFormatContext.

Free it and all its contents and set *s to NULL.

Examples

avio_reading.c, demuxing_decoding.c, filtering_audio.c, filtering_video.c, hw_decode.c, metadata.c, qsvdec.c, remuxing.c, transcode_aac.c, transcoding.c, and vaapi_transcode.c.

Definition at line 4498 of file utils.c.

Referenced by avi_read_close(), close_demux_for_component(), close_input_file(), concat_read_close(), concat_seek(), ff_load_image(), ff_rtsp_close_streams(), ff_wms_parse_sdp_a_line(), ffmpeg_cleanup(), free_playlist_list(), free_representation(), handle_file(), LLVMFuzzerTestOneInput(), main(), movie_uninit(), open_file(), open_input_file(), rdt_close_context(), read_thread(), sap_read_close(), seek_test(), stream_close(), video_decode(), and video_decode_example().


http://www.kler.cn/news/10636.html

相关文章:

  • Shiro概述
  • 9.1 相关分析
  • 定点乘法器优化---华为杯
  • Python求矩阵的特征值和广义特征值
  • 认识C++《共、枚、指1》
  • 什么是雪花算法?啥原理?
  • GORM 基础 -- Associations
  • 这7种常见的JavaScript错误,你知道吗?
  • 规模化敏捷框架:Scrum@Scale
  • 他98年的,我真的玩不过他...
  • 请我为详细讲解C11的新增原子操作
  • Oracle-主备切换问题(BUG-31747989)
  • 论文阅读 - ANEMONE: Graph Anomaly Detection with Multi-Scale Contrastive Learning
  • 大数据 | 实验一:大数据系统基本实验 | MapReduce 初级编程
  • JAVA经典之递归测试01-----JAVA入门基础教程
  • #详细介绍!!! 造成死锁的原因以及解决方案!
  • L2-042 老板的作息表(极短代码)
  • JavaScript【六】JavaScript中的字符串(String)
  • python+vue 在线考试系统的设计与实现
  • Quartz框架详解分析
  • 技术创业者必读:从验证想法到技术产品商业化的全方位解析
  • 算法训练Day29:491.递增子序列, 46.全排列 ,47.全排列 II
  • selenium自动化测试面试题【含答案】
  • 关于“复活节Easter”知识,你了解多少?
  • SadTalker项目上手教程
  • yolov8训练自己的数据集
  • 数据库系列之MySQL线程ID和操作系统线程ID对应关系
  • 雪花算法ID冲突问题与解决方案
  • 如何从 PowerPoint 导出高分辨率(高 dpi)幻灯片
  • Chocolatey 包管理器安装配置