ffmpeg中avformat_open_input超时设置(附件一)

avformat_open_input 刚打开的时候堆栈信息

 AVDictionary *inputDic = nullptr;
    av_dict_set(&inputDic, "rtsp_transport", "tcp", 0);
    // av_dict_set(&inputDic, "muxdelay", "10", 0); // seconds
    // runs = stimeout / 100 * 1000
    av_dict_set(&inputDic, "stimeout", "100*1000", 0); // milliseconds
    m_avformatCtx->flags |= AVFMT_FLAG_NONBLOCK;
    LOG_INFO("open url: {}", m_url);
    m_avformatCtx->interrupt_callback.callback = interrupt_cb;
    m_avformatCtx->interrupt_callback.opaque = this;
    m_openInputTime = av_gettime();
    int ret =
        avformat_open_input(&m_avformatCtx, m_url.c_str(), nullptr, &inputDic);

上面是具体函数调用,下面是堆栈信息

		Locals		
		filename	"rtsp://172.0.8.21:9980/2/analysis"	char*
		fmt	0x0	AVInputFormat*
		i	<optimized out>	
		id3v2_extra_meta	0x0	ID3v2ExtraMeta*
		options	@0x7ffdcd3ee2d8	AVDictionary
			count	2	int
			elems	@0x7ffd6c002ba0	AVDictionaryEntry
		ps	@0x555557f0b160	AVFormatContext
			audio_codec	0x0	AVCodec*
			audio_codec_id	AV_CODEC_ID_NONE (0)	enum AVCodecID
			audio_preload	0	int
			av_class	@0x7ffff0b6a0a0	AVClass
			avio_flags	0	int
			avoid_negative_ts	-1	int
			bit_rate	0	int64_t
			chapters	0x0	AVChapter**
			codec_whitelist	0x0	char*
			control_message_cb	0	av_format_control_message
			correct_ts_overflow	1	unsigned int
			ctx_flags	0	int
			data_codec	0x0	AVCodec*
			data_codec_id	AV_CODEC_ID_NONE (0)	enum AVCodecID
			debug	0	int
			dump_separator	44	uint8_t
			duration	0	int64_t
			duration_estimation_method	AVFMT_DURATION_FROM_PTS (0)	enum AVDurationEstimationMethod
			error_recognition	1	int
			event_flags	0	int
			filename	"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"... (1024)	char[1024]
			flags	2097156	int
			flush_packets	-1	int
			format_probesize	1048576	int
			format_whitelist	0x0	char*
			fps_probe_size	-1	int
			iformat	0x0	struct AVInputFormat*
			internal	@0x7ffd6c002ac0	AVFormatInternal
				avoid_negative_ts_use_pts	0	int
				data_offset	0	int64_t
				id3v2_meta	0x0	AVDictionary*
				initialized	0	int
				inject_global_side_data	0	int
				missing_ts_warning	0	int
				nb_interleaved_streams	0	int
				offset	-9223372036854775808	int64_t
				offset_timebase	@0x7ffd6c002b10	AVRational
				packet_buffer	0x0	struct AVPacketList*
				packet_buffer_end	0x0	struct AVPacketList*
				parse_queue	0x0	struct AVPacketList*
				parse_queue_end	0x0	struct AVPacketList*
				prefer_codec_framerate	0	int
				raw_packet_buffer	0x0	struct AVPacketList*
				raw_packet_buffer_end	0x0	struct AVPacketList*
				raw_packet_buffer_remaining_size	2500000	int
				shortest_end	-9223372036854775808	int64_t
				streams_initialized	0	int
			interrupt_callback	@0x7ffd6c003108	AVIOInterruptCB
				callback	0x7ffff772d1d2 <flow::FFmpegCapture::interrupt_cb(void*)>	int (void *)*
				opaque	0x555557f0b050	void*
			io_close	0x7ffff0a7a6e0 <io_close_default>	void (struct AVFormatContext *, AVIOContext *)*
			io_open	0x7ffff0a7a6f0 <io_open_default>	int (struct AVFormatContext *, AVIOContext **, const char *, int, AVDictionary **)*
			io_repositioned	0	int
			key	0x0	uint8_t*
			keylen	0	int
			max_analyze_duration	0	int64_t
			max_chunk_duration	0	int
			max_chunk_size	0	int
			max_delay	-1	int
			max_index_size	1048576	unsigned int
			max_interleave_delta	10000000	int64_t
			max_picture_buffer	3041280	unsigned int
			max_streams	1000	int
			max_ts_probe	50	int
			metadata	0x0	AVDictionary*
			metadata_header_padding	-1	int
			nb_chapters	0	unsigned int
			nb_programs	0	unsigned int
			nb_streams	0	unsigned int
			oformat	0x0	struct AVOutputFormat*
			opaque	0x0	void*
			open_cb	0x0	int (struct AVFormatContext *, AVIOContext **, const char *, int, const AVIOInterruptCB *, AVDictionary **)*
			output_ts_offset	0	int64_t
			packet_size	0	unsigned int
			pb	0x0	AVIOContext*
			priv_data	0x0	void*
			probe_score	0	int
			probesize	5000000	int64_t
			programs	0x0	AVProgram**
			protocol_blacklist	0x0	char*
			protocol_whitelist	0x0	char*
			seek2any	0	int
			skip_estimate_duration_from_pts	0	int
			skip_initial_bytes	0	int64_t
			start_time	0	int64_t
			start_time_realtime	-9223372036854775808	int64_t
			streams	0x0	AVStream**
			strict_std_compliance	0	int
			subtitle_codec	0x0	AVCodec*
			subtitle_codec_id	AV_CODEC_ID_NONE (0)	enum AVCodecID
			ts_id	0	int
			url	0x0	char*
			use_wallclock_as_timestamps	0	int
			video_codec	0x0	AVCodec*
			video_codec_id	AV_CODEC_ID_NONE (0)	enum AVCodecID
		ret	0	int
		s	@0x7ffd6c002c40	AVFormatContext
			audio_codec	0x0	AVCodec*
			audio_codec_id	AV_CODEC_ID_NONE (0)	enum AVCodecID
			audio_preload	0	int
			av_class	@0x7ffff0b6a0a0	AVClass
				category	AV_CLASS_CATEGORY_MUXER (3)	AVClassCategory
				child_class_next	0x7ffff0a7a850 <format_child_class_next>	const struct AVClass *(const struct AVClass *)*
				child_next	0x7ffff0a7a660 <format_child_next>	void *(void *, void *)*
				class_name	"AVFormatContext"	char*
				get_category	0x7ffff0a7a6c0 <get_category>	AVClassCategory (void *)*
				item_name	0x7ffff0a7a820 <format_to_name>	const char *(void *)*
				log_level_offset_offset	0	int
				option	@0x7ffff0b6a100	struct AVOption
					default_val	@0x7ffff0b6a118	union {...}
						dbl	0	double
						i64	0	int64_t
						q	@0x7ffff0b6a118	AVRational
							den	0	int
							num	0	int
						str	0x0	char*
					flags	3	int  //class里面的这个值是创建的时候就默认的
					help	0x0	char*
					max	2147483647	double
					min	-2147483648	double
					name	"avioflags"	char*//这些参数也是默认的
					offset	1292	int
					type	AV_OPT_TYPE_FLAGS (0)	enum AVOptionType
					unit	"avioflags"	char*
				parent_log_context_offset	0	int
				query_ranges	0x0	int (struct AVOptionRanges **, void *, const char *, int)*
				version	3679076	int
			avio_flags	0	int
			avoid_negative_ts	-1	int
			bit_rate	0	int64_t
			chapters	0x0	AVChapter**
			codec_whitelist	0x0	char*
			control_message_cb	0	av_format_control_message
			correct_ts_overflow	1	unsigned int
			ctx_flags	0	int
			data_codec	0x0	AVCodec*
			data_codec_id	AV_CODEC_ID_NONE (0)	enum AVCodecID
			debug	0	int
			dump_separator	44	uint8_t
			duration	0	int64_t
			duration_estimation_method	AVFMT_DURATION_FROM_PTS (0)	enum AVDurationEstimationMethod
			error_recognition	1	int
			event_flags	0	int
			filename	"\000\000\0"... (1024)	char[1024]
			flags	2097156	int
			flush_packets	-1	int
			format_probesize	1048576	int
			format_whitelist	0x0	char*
			fps_probe_size	-1	int
			iformat	0x0	struct AVInputFormat*
			internal	@0x7ffd6c002ac0	AVFormatInternal
				avoid_negative_ts_use_pts	0	int
				data_offset	0	int64_t
				id3v2_meta	0x0	AVDictionary*
				initialized	0	int
				inject_global_side_data	0	int
				missing_ts_warning	0	int
				nb_interleaved_streams	0	int
				offset	-9223372036854775808	int64_t
				offset_timebase	@0x7ffd6c002b10	AVRational
					den	0	int
					num	0	int
				packet_buffer	0x0	struct AVPacketList*
				packet_buffer_end	0x0	struct AVPacketList*
				parse_queue	0x0	struct AVPacketList*
				parse_queue_end	0x0	struct AVPacketList*
				prefer_codec_framerate	0	int
				raw_packet_buffer	0x0	struct AVPacketList*
				raw_packet_buffer_end	0x0	struct AVPacketList*
				raw_packet_buffer_remaining_size	2500000	int
				shortest_end	-9223372036854775808	int64_t
				streams_initialized	0	int
			interrupt_callback	@0x7ffd6c003108	AVIOInterruptCB
				callback	0x7ffff772d1d2 <flow::FFmpegCapture::interrupt_cb(void*)>	int (void *)*
				opaque	0x555557f0b050	void*
			io_close	0x7ffff0a7a6e0 <io_close_default>	void (struct AVFormatContext *, AVIOContext *)*
			io_open	0x7ffff0a7a6f0 <io_open_default>	int (struct AVFormatContext *, AVIOContext **, const char *, int, AVDictionary **)*
			io_repositioned	0	int
			key	0x0	uint8_t*
			keylen	0	int
			max_analyze_duration	0	int64_t
			max_chunk_duration	0	int
			max_chunk_size	0	int
			max_delay	-1	int
			max_index_size	1048576	unsigned int
			max_interleave_delta	10000000	int64_t
			max_picture_buffer	3041280	unsigned int
			max_streams	1000	int
			max_ts_probe	50	int
			metadata	0x0	AVDictionary*
			metadata_header_padding	-1	int
			nb_chapters	0	unsigned int
			nb_programs	0	unsigned int
			nb_streams	0	unsigned int
			oformat	0x0	struct AVOutputFormat*
			opaque	0x0	void*
			open_cb	0x0	int (struct AVFormatContext *, AVIOContext **, const char *, int, const AVIOInterruptCB *, AVDictionary **)*
			output_ts_offset	0	int64_t
			packet_size	0	unsigned int
			pb	0x0	AVIOContext*
			priv_data	0x0	void*
			probe_score	0	int
			probesize	5000000	int64_t
			programs	0x0	AVProgram**
			protocol_blacklist	0x0	char*
			protocol_whitelist	0x0	char*
			seek2any	0	int
			skip_estimate_duration_from_pts	0	int
			skip_initial_bytes	0	int64_t
			start_time	0	int64_t
			start_time_realtime	-9223372036854775808	int64_t
			streams	0x0	AVStream**
			strict_std_compliance	0	int
			subtitle_codec	0x0	AVCodec*
			subtitle_codec_id	AV_CODEC_ID_NONE (0)	enum AVCodecID
			ts_id	0	int
			url	0x0	char*
			use_wallclock_as_timestamps	0	int
			video_codec	0x0	AVCodec*
			video_codec_id	AV_CODEC_ID_NONE (0)	enum AVCodecID
		tmp	0x0	AVDictionary*
	Inspector		
	Expressions		
		up	<no such value>	 
		url_protocols	@0x7ffff0b76680	URLProtocol*[29]
	Return Value		
	Tooltip		


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值