int nb_pass;
SpecifierOpt *passlogfiles;
int nb_passlogfiles;
+ SpecifierOpt *max_muxing_queue_size;
+ int nb_max_muxing_queue_size;
SpecifierOpt *guess_layout_max;
int nb_guess_layout_max;
SpecifierOpt *apad;
struct InputStream *ist;
struct FilterGraph *graph;
uint8_t *name;
+
+ // parameters configured for this input
+ int format;
+
+ int width, height;
+ AVRational sample_aspect_ratio;
+
+ int sample_rate;
+ int channels;
+ uint64_t channel_layout;
+
+ AVBufferRef *hw_frames_ctx;
} InputFilter;
typedef struct OutputFilter {
/* temporary storage until stream maps are processed */
AVFilterInOut *out_tmp;
enum AVMediaType type;
+
+ /* desired output stream properties */
+ int width, height;
+ AVRational frame_rate;
+ int format;
+ int sample_rate;
+ uint64_t channel_layout;
+
+ // those are only set if no format is specified and the encoder gives us multiple options
+ int *formats;
+ uint64_t *channel_layouts;
+ int *sample_rates;
} OutputFilter;
typedef struct FilterGraph {
double ts_scale;
int saw_first_ts;
- int showed_multi_packet_warning;
AVDictionary *decoder_opts;
AVRational framerate; /* framerate forced with -r */
int top_field_first;
// number of frames/samples retrieved from the decoder
uint64_t frames_decoded;
uint64_t samples_decoded;
+
+ int64_t *dts_buffer;
+ int nb_dts_buffer;
} InputStream;
typedef struct InputFile {
OSTFinished finished; /* no more packets should be written for this stream */
int unavailable; /* true if the steram is unavailable (possibly temporarily) */
int stream_copy;
+
+ // init_output_stream() has been called for this stream
+ // The encoder and the bitstream filters have been initialized and the stream
+ // parameters are set in the AVStream.
+ int initialized;
+
const char *attachment_filename;
int copy_initial_nonkeyframes;
int copy_prior_start;
/* packet quality factor */
int quality;
+ int max_muxing_queue_size;
+
+ /* the packets are buffered here until the muxer is ready to be initialized */
+ AVFifoBuffer *muxing_queue;
+
/* packet picture type */
int pict_type;
uint64_t limit_filesize; /* filesize limit expressed in bytes */
int shortest;
+
+ int header_written;
} OutputFile;
extern InputStream **input_streams;
extern float max_error_rate;
extern char *videotoolbox_pixfmt;
+extern int filter_nbthreads;
+extern int filter_complex_nbthreads;
+
extern const AVIOInterruptCB int_cb;
extern const OptionDef options[];
int init_simple_filtergraph(InputStream *ist, OutputStream *ost);
int init_complex_filtergraph(FilterGraph *fg);
+int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame);
+int ifilter_parameters_from_decoder(InputFilter *ifilter, const AVCodecContext *avctx);
+
int ffmpeg_parse_options(int argc, char **argv);
int vdpau_init(AVCodecContext *s);