#include "libavutil/fifo.h"
#include "libavutil/pixfmt.h"
#include "libavutil/rational.h"
+#include "libavutil/threadmessage.h"
#include "libswresample/swresample.h"
int nb_guess_layout_max;
SpecifierOpt *apad;
int nb_apad;
+ SpecifierOpt *discard;
+ int nb_discard;
} OptionsContext;
typedef struct InputFilter {
int file_index;
AVStream *st;
int discard; /* true if stream data should be discarded */
+ int user_set_discard;
int decoding_needed; /* true if the packets must be decoded in 'raw_fifo' */
+ AVCodecContext *dec_ctx;
AVCodec *dec;
AVFrame *decoded_frame;
AVFrame *filter_frame; /* a ref of decoded_frame, to be sent to filters */
int accurate_seek;
#if HAVE_PTHREADS
+ AVThreadMessageQueue *in_thread_queue;
pthread_t thread; /* thread reading from this file */
int non_blocking; /* reading packets from the thread should not block */
- int finished; /* the thread has exited */
int joined; /* the thread has been joined */
- pthread_mutex_t fifo_lock; /* lock for access to fifo */
- pthread_cond_t fifo_cond; /* the main thread will signal on this cond after reading from fifo */
- AVFifoBuffer *fifo; /* demuxed packets are stored here; freed by the main thread */
#endif
} InputFile;
/* dts of the last packet sent to the muxer */
int64_t last_mux_dts;
AVBitStreamFilterContext *bitstream_filters;
+ AVCodecContext *enc_ctx;
AVCodec *enc;
int64_t max_frames;
AVFrame *filtered_frame;
int guess_input_channel_layout(InputStream *ist);
-enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodec *codec, enum AVPixelFormat target);
+enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *avctx, AVCodec *codec, enum AVPixelFormat target);
void choose_sample_fmt(AVStream *st, AVCodec *codec);
int configure_filtergraph(FilterGraph *fg);