[英]ffmpeg C++ and AVFormatContext
I have a question about ffmpeg. 我对ffmpeg有疑问。
How I can init an AVFormatContext
in my program. 如何在程序中初始化
AVFormatContext
。 I know that it's possible to make av_open_input_file
and use my AVFormatContext
as one of the parametres, but my data which I want use for decoding not in file. 我知道可以制作
av_open_input_file
并将我的AVFormatContext
用作参数之一,但是我想用于解码的数据不在文件中。 I get it from other components of my program as char* array. 我从我程序的其他组件中将其作为char *数组获取。 Is it possible to init
AVFormatContext
struct only using this array of data. 是否可以仅使用此数据数组来初始化
AVFormatContext
结构。
have a look at these functions, they might be useful. 看一下这些功能,它们可能会有用。
AVInputFormat *av_find_input_format(const char *short_name);
AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened);
AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max);
AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, int *score_ret);
int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
const char *filename, void *logctx,
unsigned int offset, unsigned int max_probe_size);
I did this with output data but not input data (My input data was raw frames grabbed from a video device). 我使用输出数据执行此操作,而不使用输入数据(我的输入数据是从视频设备获取的原始帧)。 what's you input data?
您输入什么数据?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.