Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							88f80977eb 
							
						 
					 
					
						
						
							
							fftools/ffmpeg: use AVFrame to pass subtitles from decoders to filters  
						
						... 
						
						
						
						Allows to use the same buffering code for all media types. Will also be
important for the following commit. 
						
						
					 
					
						2023-06-19 09:48:56 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							fa717baaa5 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_enc: constify the subtitle passed to enc_subtitle()  
						
						
						
						
					 
					
						2023-06-19 09:48:56 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							e89a6d1089 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_dec: move InputStream.prev_sub to Decoder  
						
						... 
						
						
						
						It does not need to be visible outside of decoding code. 
						
						
					 
					
						2023-06-19 09:48:56 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							a45b9d35b9 
							
						 
					 
					
						
						
							
							fftools/ffmpeg: move fix_sub_duration_heartbeat() to ffmpeg_dec  
						
						... 
						
						
						
						This way ffmpeg.c does not need to access InputStream.prev_sub and it
can be made private. 
						
						
					 
					
						2023-06-19 09:48:55 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							01897c1788 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_dec: move decoding to a separate thread  
						
						... 
						
						
						
						This is only a preparatory step to a fully threaded architecture and
does not yet make decoding truly parallel - the main thread will
currently submit a packet and wait until it has been fully processed by
the decoding thread before moving on. Decoder behavior as observed by
the rest of the program should remain unchanged. That will change in
future commits after encoders and filters are moved to threads and a
thread-aware scheduler is added. 
						
						
					 
					
						2023-06-19 09:48:55 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							5293adb1a7 
							
						 
					 
					
						
						
							
							fftools/ffmpeg: attach bits_per_raw_sample information to frames  
						
						... 
						
						
						
						This way avoids encoders reaching into filters or decoders for this
information. 
						
						
					 
					
						2023-06-19 09:48:55 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							1bdd53e2f9 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_filter: make configure_filtergraph() static  
						
						... 
						
						
						
						It is no longer used outside of ffmpeg_filter. 
						
						
					 
					
						2023-06-19 09:48:55 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							a7aa05c599 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_filter: add an AVClass to FilterGraph  
						
						... 
						
						
						
						Use it for logging. 
						
						
					 
					
						2023-06-19 09:48:55 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							1adad44fc7 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_dec: move InputStream.hwaccel_pix_fmt to Decoder  
						
						... 
						
						
						
						It is purely decoder-internal state. 
						
						
					 
					
						2023-06-19 09:48:55 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							174cb3accf 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_dec: remove pointless InputStream.hwaccel_retrieve_data  
						
						... 
						
						
						
						It is always set to hwaccel_retrieve_data() from ffmpeg_hw.c, so that
function can just be called directly instead. 
						
						
					 
					
						2023-06-19 09:48:55 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							25d96ab6c0 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_hw: inline hwaccel_decode_init() into its caller  
						
						... 
						
						
						
						The function is now trivial and cannot fail, so all error handling in
its caller can be removed. 
						
						
					 
					
						2023-06-19 09:48:55 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							df81fb46ee 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_dec: simplify process_subtitle()  
						
						... 
						
						
						
						Its got_output argument always points to 1. 
						
						
					 
					
						2023-06-19 09:48:55 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							e9eb44ed88 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_dec: drop always-0 InputStream.prev_sub.ret  
						
						
						
						
					 
					
						2023-06-19 09:48:55 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							141d11cb3c 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_mux: make OutputStream.pkt private  
						
						... 
						
						
						
						It is no longer used outside of muxing code. 
						
						
					 
					
						2023-06-05 16:16:13 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							f94957e8f4 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_mux: simplify calling of_output_packet()  
						
						... 
						
						
						
						Use NULL packets to signal EOF instead of a separate variable. This is
made possible by the previous commit. 
						
						
					 
					
						2023-06-05 16:16:12 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							568d414074 
							
						 
					 
					
						
						
							
							fftools/ffmpeg: attach filter framerate to frames  
						
						... 
						
						
						
						This way the encoder does not need to reach backward into the filter. 
						
						
					 
					
						2023-06-05 16:15:04 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							9630341073 
							
						 
					 
					
						
						
							
							fftools/ffmpeg: factor out attaching FrameData to a frame  
						
						... 
						
						
						
						Will be useful in following commits. 
						
						
					 
					
						2023-06-05 16:15:04 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							ad14bdbcfd 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_filter: drop a write-only variable  
						
						
						
						
					 
					
						2023-06-05 16:15:04 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							ba1141d8a9 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_enc: move nb_frames{dup,drop} globals into OutputStream  
						
						
						
						
					 
					
						2023-06-05 16:15:04 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							2674532eee 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_filter: constify the argument of filtergraph_is_simple()  
						
						
						
						
					 
					
						2023-05-31 16:20:19 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							3bfc2c589a 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_filter: make InputStream.filter private  
						
						... 
						
						
						
						It is no longer accessed outside of ffmpeg_filter. 
						
						
					 
					
						2023-05-31 16:20:19 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							5924b70075 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_filter: make ifilter_has_all_input_formats() static  
						
						... 
						
						
						
						It is no longer used outside ffmpeg_filter. 
						
						
					 
					
						2023-05-31 16:20:19 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							f8abab673c 
							
						 
					 
					
						
						
							
							fftools/ffmpeg: move sub2video handling to ffmpeg_filter  
						
						... 
						
						
						
						Make all relevant state per-filtergraph input, rather than per-input
stream. Refactor the code to make it work and avoid leaking memory when
a single subtitle stream is sent to multiple filters. 
						
						
					 
					
						2023-05-31 16:20:19 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							a6d67b11f5 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_filter: move sub2video subtitle queue to InputFilterPriv  
						
						... 
						
						
						
						This queue should be associated with a specific filtergraph input - if
a subtitle stream is sent to multiple filters then each should have its
own queue. 
						
						
					 
					
						2023-05-31 16:20:19 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							5d530e3a72 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_dec: move sub2video submission to ffmpeg_filter  
						
						... 
						
						
						
						This code is a sub2video analogue of ifilter_send_frame(), so it
properly belongs to the filtering code.
Note that using sub2video with more than one target for a given input
subtitle stream is currently broken and this commit does not change
that. It will be addressed in following commits. 
						
						
					 
					
						2023-05-31 16:19:49 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							3d35b73b2a 
							
						 
					 
					
						
						
							
							fftools/ffmpeg: constify AVSubtitle parameters as appropriate  
						
						
						
						
					 
					
						2023-05-31 16:15:47 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							87b576135e 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_filter: factor out binding an output stream to OutputFilter  
						
						... 
						
						
						
						While the new function is trivial for now, it will become more useful in
future commits. 
						
						
					 
					
						2023-05-31 16:15:47 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							7ea10bfef3 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_filter: store just the link label in OutputFilter  
						
						... 
						
						
						
						Not the entire AVFilterInOut. This is simpler. 
						
						
					 
					
						2023-05-31 16:15:47 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							da7ae627e1 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_filter: always pass graph description to fg_create()  
						
						... 
						
						
						
						Currently NULL would be passed for simple filtergraphs, which would
make the filter code extract the graph description from the output
stream when needed. This is unnecessarily convoluted. 
						
						
					 
					
						2023-05-31 16:15:47 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							6abb4a28ef 
							
						 
					 
					
						
						
							
							fftools/ffmpeg: add InputStream.index  
						
						... 
						
						
						
						This allows to avoid access to the underlying AVStream in many places. 
						
						
					 
					
						2023-05-28 10:47:59 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							cad59cccaf 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_dec: move timestamp estimation state to Decoder  
						
						... 
						
						
						
						It is purely internal to decoding. 
						
						
					 
					
						2023-05-28 10:47:59 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							5b05e9e32a 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_dec: move InputStream.pkt to Decoder  
						
						... 
						
						
						
						It is purely internal to decoding. 
						
						
					 
					
						2023-05-28 10:47:59 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							dadeb28e25 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_dec: add decoder private data  
						
						... 
						
						
						
						Move InputStream.decoded_frame to it.
Analogous to what has been previously done for all the other major
components. 
						
						
					 
					
						2023-05-28 10:47:59 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							f15b206286 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_hw: move hw_device_setup_for_encode() to ffmpeg_enc  
						
						... 
						
						
						
						This function is entangled with encoder setup, so it is more encoding
code rather than ffmpeg_hw code. This will allow making more encoder
state private in the future. 
						
						
					 
					
						2023-05-28 10:47:59 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							760a9bd306 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_hw: move hw_device_setup_for_decode() to ffmpeg_dec  
						
						... 
						
						
						
						This function is entangled with decoder setup, so it is more decoding
code rather than ffmpeg_hw code. This will allow making more decoder
state private in the future. 
						
						
					 
					
						2023-05-28 10:47:59 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							dbf1c6f5f1 
							
						 
					 
					
						
						
							
							fftools/ffmpeg: move decoding code to ffmpeg_dec  
						
						
						
						
					 
					
						2023-05-22 17:10:44 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							4cec5ffc45 
							
						 
					 
					
						
						
							
							fftools/ffmpeg: rework handling -max_error_rate  
						
						... 
						
						
						
						Replace the decode_error_stat global with a per-input-stream variable.
Also, print an error message when the error rate is exceeded. 
						
						
					 
					
						2023-05-22 17:10:44 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							4a59dde0c7 
							
						 
					 
					
						
						
							
							fftools/ffmpeg: eliminate InputStream.got_output  
						
						... 
						
						
						
						It tracks whether the decoder for this stream ever produced any frames
and its only use is for checking whether a filter input ever received a
frame - those that did not are prioritized by the scheduler.
This is awkward and unnecessarily complicated - checking whether the
filtergraph input format is valid works just as well and does not
require maintaining an extra variable. 
						
						
					 
					
						2023-05-22 17:10:44 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							f980df2c04 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_filter: move InputFilter.type to private data  
						
						... 
						
						
						
						It is not accessed outside of ffmpeg_filter. 
						
						
					 
					
						2023-05-22 17:10:44 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							c4a3f7edb8 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_filter: move InputFilter.ist to private data  
						
						... 
						
						
						
						It is not accessed outside of ffmpeg_filter. 
						
						
					 
					
						2023-05-22 17:10:44 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							89b37ae70a 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_filter: make input filter configured parameters private  
						
						... 
						
						
						
						They are not used outside of ffmpeg_filter. 
						
						
					 
					
						2023-05-22 17:10:44 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							dfa29ba955 
							
						 
					 
					
						
						
							
							fftools/ffmpeg: return error codes from ist_*_add()  
						
						... 
						
						
						
						Will be useful in future commits. 
						
						
					 
					
						2023-05-22 17:10:44 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							ede6794d6a 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_filter: split finding an unused stream into a function  
						
						... 
						
						
						
						Avoids filtering code from digging in demuxer internals. 
						
						
					 
					
						2023-05-22 17:10:44 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							30a3fee24f 
							
						 
					 
					
						
						
							
							fftools/ffmpeg: rework applying input -r  
						
						... 
						
						
						
						Do not use a separate counter for CFR timestamps forced with -r used as
an input option. Set durations properly and let estimation code do the
rest. 
						
						
					 
					
						2023-05-22 17:10:44 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							c5d77dcbf1 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_demux: move InputFile.ts_offset_discont,last_ts to private data  
						
						... 
						
						
						
						They are no longer used outside of ffmpeg_demux. 
						
						
					 
					
						2023-05-15 13:32:02 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							ab223a4d8c 
							
						 
					 
					
						
						
							
							fftools/ffmpeg: stop accessing input format from decoding code  
						
						... 
						
						
						
						Export the corresponding flag in InputFile instead. This will allow
making the demuxer AVFormatContext private in future commits, similarly
to what was previously done for muxers. 
						
						
					 
					
						2023-05-15 13:32:02 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							f9657b7443 
							
						 
					 
					
						
						
							
							fftools/ffmpeg: simplify tracking -readrate start time  
						
						... 
						
						
						
						There is no point in having a per-stream wallclock start time, since
they are all computed at the same instant. Keep a per-file start time
instead, initialized when the demuxer thread starts. 
						
						
					 
					
						2023-05-15 13:32:01 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							6b0c984f0d 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_demux: move InputStream.streamcopy_needed to private data  
						
						... 
						
						
						
						It is no longer used outside of ffmpeg_demux. 
						
						
					 
					
						2023-05-15 13:32:01 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							7df3253c5a 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_demux: move InputStream.wrap_correction_done to private data  
						
						... 
						
						
						
						It is no longer used outside of ffmpeg_demux. 
						
						
					 
					
						2023-05-15 13:32:01 +02:00 
						 
				 
			
				
					
						
							
							
								Anton Khirnov 
							
						 
					 
					
						
						
						
						
							
						
						
							df25e21ce7 
							
						 
					 
					
						
						
							
							fftools/ffmpeg_demux: move InputStream.[next_]dts to private data  
						
						... 
						
						
						
						They are no longer used outside of ffmpeg_demux. 
						
						
					 
					
						2023-05-15 13:32:01 +02:00