Libav
avconv.h
Go to the documentation of this file.
1 /*
2  * This file is part of Libav.
3  *
4  * Libav is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * Libav is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with Libav; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #ifndef AVCONV_H
20 #define AVCONV_H
21 
22 #include "config.h"
23 
24 #include <stdint.h>
25 #include <stdio.h>
26 
27 #if HAVE_PTHREADS
28 #include <pthread.h>
29 #endif
30 
31 #include "cmdutils.h"
32 
33 #include "libavformat/avformat.h"
34 #include "libavformat/avio.h"
35 
36 #include "libavcodec/avcodec.h"
37 
38 #include "libavfilter/avfilter.h"
39 
40 #include "libavutil/avutil.h"
41 #include "libavutil/dict.h"
42 #include "libavutil/fifo.h"
43 #include "libavutil/pixfmt.h"
44 #include "libavutil/rational.h"
45 
46 #define VSYNC_AUTO -1
47 #define VSYNC_PASSTHROUGH 0
48 #define VSYNC_CFR 1
49 #define VSYNC_VFR 2
50 
51 enum HWAccelID {
57 };
58 
59 typedef struct HWAccel {
60  const char *name;
61  int (*init)(AVCodecContext *s);
62  enum HWAccelID id;
64 } HWAccel;
65 
66 /* select an input stream for an output stream */
67 typedef struct StreamMap {
68  int disabled; /* 1 is this mapping is disabled by a negative map */
73  char *linklabel; /* name of an output link, for mapping lavfi outputs */
74 } StreamMap;
75 
76 /* select an input file for an output file */
77 typedef struct MetadataMap {
78  int file; // file index
79  char type; // type of metadata to copy -- (g)lobal, (s)tream, (c)hapter or (p)rogram
80  int index; // stream/chapter/program number
81 } MetadataMap;
82 
83 typedef struct OptionsContext {
85 
86  /* input/output options */
87  int64_t start_time;
88  const char *format;
89 
102 
103  /* input options */
105  int rate_emu;
107 
116 
117  /* output options */
120  /* first item specifies output metadata, second is input */
126  const char **attachments;
128 
130 
131  int64_t recording_time;
132  uint64_t limit_filesize;
133  float mux_preload;
135  int shortest;
136 
141 
142  /* indexed by output file stream index */
145 
183  int nb_pass;
187 
188 typedef struct InputFilter {
190  struct InputStream *ist;
193 } InputFilter;
194 
195 typedef struct OutputFilter {
197  struct OutputStream *ost;
200 
201  /* temporary storage until stream maps are processed */
203 } OutputFilter;
204 
205 typedef struct FilterGraph {
206  int index;
207  const char *graph_desc;
208 
210 
215 } FilterGraph;
216 
217 typedef struct InputStream {
220  int discard; /* true if stream data should be discarded */
221  int decoding_needed; /* true if the packets must be decoded in 'raw_fifo' */
225  AVFrame *filter_frame; /* a ref of decoded_frame, to be sent to filters */
226 
227  int64_t start; /* time when read started */
228  /* predicted dts of the next packet read for this stream or (when there are
229  * several frames in a packet) of the next frame in current packet */
230  int64_t next_dts;
231  /* dts of the last packet read for this stream */
232  int64_t last_dts;
234  double ts_scale;
237  AVRational framerate; /* framerate forced with -r */
238 
242 
247 
248  /* decoded data from this stream goes into all those filters
249  * currently video and audio only */
252 
253  /* hwaccel options */
256 
257  /* hwaccel context */
259  void *hwaccel_ctx;
265 
266  /* stats */
267  // combined size of all the packets read
268  uint64_t data_size;
269  /* number of packets successfully read for this stream */
270  uint64_t nb_packets;
271  // number of frames/samples retrieved from the decoder
272  uint64_t frames_decoded;
273  uint64_t samples_decoded;
274 } InputStream;
275 
276 typedef struct InputFile {
278  int eof_reached; /* true if eof reached */
279  int eagain; /* true if last read attempt returned EAGAIN */
280  int ist_index; /* index of first stream in ist_table */
281  int64_t ts_offset;
282  int64_t start_time; /* user-specified start time in AV_TIME_BASE or AV_NOPTS_VALUE */
283  int64_t recording_time;
284  int nb_streams; /* number of stream that avconv is aware of; may be different
285  from ctx.nb_streams if new streams appear during av_read_frame() */
286  int rate_emu;
288 
289 #if HAVE_PTHREADS
290  pthread_t thread; /* thread reading from this file */
291  int finished; /* the thread has exited */
292  int joined; /* the thread has been joined */
293  pthread_mutex_t fifo_lock; /* lock for access to fifo */
294  pthread_cond_t fifo_cond; /* the main thread will signal on this cond after reading from fifo */
295  AVFifoBuffer *fifo; /* demuxed packets are stored here; freed by the main thread */
296 #endif
297 } InputFile;
298 
299 typedef struct OutputStream {
300  int file_index; /* file index */
301  int index; /* stream index in the output file */
302  int source_index; /* InputStream index */
303  AVStream *st; /* stream in the output file */
304  int encoding_needed; /* true if encoding needed for this stream */
306  /* input pts and corresponding output pts
307  for A/V sync */
308  // double sync_ipts; /* dts from the AVPacket of the demuxer in second units */
309  struct InputStream *sync_ist; /* input stream to sync against */
310  int64_t sync_opts; /* output frame counter, could be changed to some true timestamp */ // FIXME look at frame_number
311  /* pts of the first frame encoded for this stream, used for limiting
312  * recording time */
313  int64_t first_pts;
314  /* dts of the last packet sent to the muxer */
315  int64_t last_mux_dts;
319  int64_t max_frames;
321 
322  /* video only */
326 
328 
329  /* forced key frames */
330  int64_t *forced_kf_pts;
334 
336  FILE *logfile;
337 
339  char *avfilter;
340 
341  int64_t sws_flags;
344  int finished; /* no more packets should be written for this stream */
346  const char *attachment_filename;
348 
350 
352 
353  /* stats */
354  // combined size of all the packets written
355  uint64_t data_size;
356  // number of packets send to the muxer
357  uint64_t packets_written;
358  // number of frames/samples sent to the encoder
359  uint64_t frames_encoded;
360  uint64_t samples_encoded;
361 } OutputStream;
362 
363 typedef struct OutputFile {
366  int ost_index; /* index of the first stream in output_streams */
367  int64_t recording_time; /* desired length of the resulting file in microseconds */
368  int64_t start_time; /* start time in microseconds */
369  uint64_t limit_filesize;
370 
371  int shortest;
372 } OutputFile;
373 
374 extern InputStream **input_streams;
375 extern int nb_input_streams;
376 extern InputFile **input_files;
377 extern int nb_input_files;
378 
380 extern int nb_output_streams;
381 extern OutputFile **output_files;
382 extern int nb_output_files;
383 
384 extern FilterGraph **filtergraphs;
385 extern int nb_filtergraphs;
386 
387 extern char *vstats_filename;
388 
389 extern float audio_drift_threshold;
390 extern float dts_delta_threshold;
391 
392 extern int audio_volume;
393 extern int audio_sync_method;
394 extern int video_sync_method;
395 extern int do_benchmark;
396 extern int do_deinterlace;
397 extern int do_hex_dump;
398 extern int do_pkt_dump;
399 extern int copy_ts;
400 extern int copy_tb;
401 extern int exit_on_error;
402 extern int print_stats;
403 extern int qp_hist;
404 
405 extern const AVIOInterruptCB int_cb;
406 
407 extern const OptionDef options[];
408 
409 extern const HWAccel hwaccels[];
410 
412 void show_usage(void);
413 
414 void opt_output_file(void *optctx, const char *filename);
415 
417 
419 
424 
425 int avconv_parse_options(int argc, char **argv);
426 
427 int vdpau_init(AVCodecContext *s);
428 int dxva2_init(AVCodecContext *s);
429 int vda_init(AVCodecContext *s);
430 
431 #endif /* AVCONV_H */
SpecifierOpt * passlogfiles
Definition: avconv.h:184
int nb_dump_attachment
Definition: avconv.h:111
int nb_metadata
Definition: avconv.h:147
int nb_streamid_map
Definition: avconv.h:144
int frame_number
Definition: avconv.h:305
enum HWAccelID active_hwaccel_id
Definition: avconv.h:258
float mux_preload
Definition: avconv.h:133
int64_t recording_time
Definition: avconv.h:367
uint8_t * name
Definition: avconv.h:199
int nb_outputs
Definition: avconv.h:214
int resample_channels
Definition: avconv.h:245
This structure describes decoded (raw) audio or video data.
Definition: frame.h:135
int stream_copy
Definition: avconv.h:345
AVRational frame_rate
Definition: avconv.h:323
int64_t * forced_kf_pts
Definition: avconv.h:330
int data_disable
Definition: avconv.h:140
float mux_max_delay
Definition: avconv.h:134
int accurate_seek
Definition: avconv.h:287
int nb_forced_key_frames
Definition: avconv.h:159
int * streamid_map
Definition: avconv.h:143
int nb_stream_maps
Definition: avconv.h:119
SpecifierOpt * copy_initial_nonkeyframes
Definition: avconv.h:176
AVRational framerate
Definition: avconv.h:237
PtsCorrectionContext pts_ctx
Definition: avconv.h:233
SpecifierOpt * ts_scale
Definition: avconv.h:108
int ist_in_filtergraph(FilterGraph *fg, InputStream *ist)
AVCodecParserContext * parser
Definition: avconv.h:351
AVFilterInOut * out_tmp
Definition: avconv.h:202
int decoding_needed
Definition: avconv.h:221
int guess_input_channel_layout(InputStream *ist)
Definition: avconv.c:1134
int nb_frame_pix_fmts
Definition: avconv.h:101
SpecifierOpt * sample_fmts
Definition: avconv.h:154
int eagain
Definition: avconv.h:279
AVBitStreamFilterContext * bitstream_filters
Definition: avconv.h:316
void(* hwaccel_uninit)(AVCodecContext *s)
Definition: avconv.h:260
AVFrame * filter_frame
Definition: avconv.h:225
FilterGraph * init_simple_filtergraph(InputStream *ist, OutputStream *ost)
int copy_ts
Definition: avconv_opt.c:80
int print_stats
Definition: avconv_opt.c:83
int nb_filter_scripts
Definition: avconv.h:181
const char * name
Definition: avconv.h:60
int nb_filtergraphs
Definition: avconv.c:109
uint64_t packets_written
Definition: avconv.h:357
AVCodec.
Definition: avcodec.h:2796
SpecifierOpt * filters
Definition: avconv.h:178
int64_t start_time
Definition: avconv.h:368
int index
Definition: avconv.h:206
uint64_t data_size
Definition: avconv.h:355
SpecifierOpt * qscale
Definition: avconv.h:156
FilterGraph ** filtergraphs
Definition: avconv.c:108
int64_t last_dts
Definition: avconv.h:232
int video_sync_method
Definition: avconv_opt.c:76
SpecifierOpt * frame_pix_fmts
Definition: avconv.h:100
struct FilterGraph * graph
Definition: avconv.h:191
float dts_delta_threshold
Definition: avconv_opt.c:72
SpecifierOpt * intra_matrices
Definition: avconv.h:166
int encoding_needed
Definition: avconv.h:304
Format I/O context.
Definition: avformat.h:922
uint64_t samples_decoded
Definition: avconv.h:273
struct InputStream * ist
Definition: avconv.h:190
enum HWAccelID id
Definition: avconv.h:62
uint64_t frames_decoded
Definition: avconv.h:272
AVFilterGraph * graph
Definition: avconv.h:209
char * logfile_prefix
Definition: avconv.h:335
int copy_initial_nonkeyframes
Definition: avconv.h:347
uint8_t
float audio_drift_threshold
Definition: avconv_opt.c:71
FILE * logfile
Definition: avconv.h:336
AVDictionary * opts
Definition: avconv.h:365
HWAccelID
Definition: avconv.h:51
CRITICAL_SECTION pthread_mutex_t
Definition: w32pthreads.h:55
void assert_avoptions(AVDictionary *m)
Definition: avconv.c:236
int nb_max_frames
Definition: avconv.h:149
int shortest
Definition: avconv.h:371
int nb_meta_data_maps
Definition: avconv.h:122
InputFile ** input_files
Definition: avconv.c:100
int nb_streams
Definition: avconv.h:284
int sync_file_index
Definition: avconv.h:71
AVDictionary * resample_opts
Definition: avconv.h:343
static int flags
Definition: log.c:44
AVFilterContext * filter
Definition: avconv.h:196
SpecifierOpt * bitstream_filters
Definition: avconv.h:150
int resample_sample_rate
Definition: avconv.h:244
OutputFile ** output_files
Definition: avconv.c:105
AVCodec * dec
Definition: avconv.h:223
int file_index
Definition: avconv.h:218
int resample_pix_fmt
Definition: avconv.h:241
int resample_height
Definition: avconv.h:239
int64_t next_dts
Definition: avconv.h:230
int configure_filtergraph(FilterGraph *fg)
const OptionDef options[]
Definition: avconv_opt.c:2187
Callback for checking whether to abort blocking functions.
Definition: avio.h:51
int nb_top_field_first
Definition: avconv.h:171
int(* hwaccel_retrieve_data)(AVCodecContext *s, AVFrame *frame)
Definition: avconv.h:262
int rate_emu
Definition: avconv.h:286
int do_deinterlace
void opt_output_file(void *optctx, const char *filename)
enum AVPixelFormat hwaccel_pix_fmt
Definition: avconv.h:263
AVFilterContext * filter
Definition: avconv.h:189
int nb_filters
Definition: avconv.h:179
int64_t start_time
Definition: avconv.h:87
int64_t start
Definition: avconv.h:227
uint64_t nb_packets
Definition: avconv.h:270
int64_t last_mux_dts
Definition: avconv.h:315
int64_t sws_flags
Definition: avconv.h:341
int nb_hwaccel_devices
Definition: avconv.h:115
int finished
Definition: avconv.h:344
SpecifierOpt * codec_tags
Definition: avconv.h:152
SpecifierOpt * rc_overrides
Definition: avconv.h:164
int video_disable
Definition: avconv.h:137
int force_fps
Definition: avconv.h:324
char type
Definition: avconv.h:79
int nb_codec_names
Definition: avconv.h:91
AVPixelFormat
Pixel format.
Definition: pixfmt.h:63
StreamMap * stream_maps
Definition: avconv.h:118
uint64_t limit_filesize
Definition: avconv.h:132
const char * format
Definition: avconv.h:88
int nb_passlogfiles
Definition: avconv.h:185
int nb_force_fps
Definition: avconv.h:161
OutputFilter * filter
Definition: avconv.h:338
int nb_sample_fmts
Definition: avconv.h:155
int file_index
Definition: avconv.h:69
MetadataMap(* meta_data_maps)[2]
Definition: avconv.h:121
SpecifierOpt * filter_scripts
Definition: avconv.h:180
int nb_attachments
Definition: avconv.h:127
int copy_tb
Definition: avconv_opt.c:81
char * linklabel
Definition: avconv.h:73
int nb_ts_scale
Definition: avconv.h:109
SpecifierOpt * audio_channels
Definition: avconv.h:92
int nb_audio_sample_rate
Definition: avconv.h:95
int metadata_chapters_manual
Definition: avconv.h:125
struct OutputStream * ost
Definition: avconv.h:197
int accurate_seek
Definition: avconv.h:106
SpecifierOpt * pass
Definition: avconv.h:182
SpecifierOpt * audio_sample_rate
Definition: avconv.h:94
SpecifierOpt * dump_attachment
Definition: avconv.h:110
int nb_codec_tags
Definition: avconv.h:153
SpecifierOpt * metadata_map
Definition: avconv.h:172
int64_t max_frames
Definition: avconv.h:319
SpecifierOpt * frame_aspect_ratios
Definition: avconv.h:162
SpecifierOpt * frame_sizes
Definition: avconv.h:98
int vdpau_init(AVCodecContext *s)
Definition: avconv_vdpau.c:294
int nb_hwaccels
Definition: avconv.h:113
int do_benchmark
Definition: avconv_opt.c:77
int nb_output_files
Definition: avconv.c:106
OutputStream ** output_streams
Definition: avconv.c:103
Stream structure.
Definition: avformat.h:699
A linked-list of the inputs/outputs of the filter chain.
Definition: avfilter.h:1091
int audio_sync_method
Definition: avconv_opt.c:75
InputFilter ** filters
Definition: avconv.h:250
int64_t recording_time
Definition: avconv.h:283
SpecifierOpt * hwaccels
Definition: avconv.h:112
Definition: avconv.h:59
int(* init)(AVCodecContext *s)
Definition: avconv.h:61
SpecifierOpt * frame_rates
Definition: avconv.h:96
int nb_presets
Definition: avconv.h:175
int ost_index
Definition: avconv.h:366
struct InputStream * sync_ist
Definition: avconv.h:309
int exit_on_error
Definition: avconv_opt.c:82
double ts_scale
Definition: avconv.h:234
int64_t recording_time
Definition: avconv.h:131
const AVIOInterruptCB int_cb
Definition: avconv.c:141
int chapters_input_file
Definition: avconv.h:129
uint64_t frames_encoded
Definition: avconv.h:359
int ist_index
Definition: avconv.h:280
const char * graph_desc
Definition: avconv.h:207
int64_t start_time
Definition: avconv.h:282
void reset_options(OptionsContext *o)
main external API structure.
Definition: avcodec.h:1050
static void(WINAPI *cond_broadcast)(pthread_cond_t *cond)
int rate_emu
Definition: avconv.h:105
int metadata_streams_manual
Definition: avconv.h:124
const char * attachment_filename
Definition: avconv.h:346
AVCodecContext * enc_ctx
Definition: avconv.h:317
int audio_disable
Definition: avconv.h:138
int64_t input_ts_offset
Definition: avconv.h:104
AVFrame * decoded_frame
Definition: avconv.h:224
int nb_bitstream_filters
Definition: avconv.h:151
int avconv_parse_options(int argc, char **argv)
Definition: avconv_opt.c:2140
SpecifierOpt * top_field_first
Definition: avconv.h:170
AVCodecContext * dec_ctx
Definition: avconv.h:222
AVStream * st
Definition: avconv.h:219
int nb_input_files
Definition: avconv.c:101
int index
Definition: avconv.h:80
rational number numerator/denominator
Definition: rational.h:43
int file_index
Definition: avconv.h:300
int metadata_global_manual
Definition: avconv.h:123
int64_t sync_opts
Definition: avconv.h:310
SpecifierOpt * force_fps
Definition: avconv.h:160
int nb_inter_matrices
Definition: avconv.h:169
AVDictionary * decoder_opts
Definition: avconv.h:236
int shortest
Definition: avconv.h:135
int showed_multi_packet_warning
Definition: avconv.h:235
int64_t ts_offset
Definition: avconv.h:281
int nb_qscale
Definition: avconv.h:157
SpecifierOpt * hwaccel_devices
Definition: avconv.h:114
AVFrame * filtered_frame
Definition: avconv.h:320
int nb_audio_channels
Definition: avconv.h:93
int source_index
Definition: avconv.h:302
int(* hwaccel_get_buffer)(AVCodecContext *s, AVFrame *frame, int flags)
Definition: avconv.h:261
SpecifierOpt * metadata
Definition: avconv.h:146
int nb_filters
Definition: avconv.h:251
int qp_hist
Definition: avconv_opt.c:84
int forced_kf_count
Definition: avconv.h:331
int resample_sample_fmt
Definition: avconv.h:243
int nb_intra_matrices
Definition: avconv.h:167
char * forced_keyframes
Definition: avconv.h:333
int nb_frame_rates
Definition: avconv.h:97
uint64_t data_size
Definition: avconv.h:268
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){if(!*ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) returnNULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method!=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt)>2){ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc){av_free(ac);returnNULL;}returnac;}in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar){ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar?ac->channels:1;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_dlog(ac->avr,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> out
int resample_width
Definition: avconv.h:240
int file
Definition: avconv.h:78
struct FilterGraph * graph
Definition: avconv.h:198
uint64_t limit_filesize
Definition: avconv.h:369
SpecifierOpt * presets
Definition: avconv.h:174
int nb_frame_sizes
Definition: avconv.h:99
OptionGroup * g
Definition: avconv.h:84
SpecifierOpt * inter_matrices
Definition: avconv.h:168
int do_pkt_dump
Definition: avconv_opt.c:79
AVStream * st
Definition: avconv.h:303
const HWAccel hwaccels[]
Definition: avconv_opt.c:56
SpecifierOpt * forced_key_frames
Definition: avconv.h:158
int vda_init(AVCodecContext *s)
Definition: avconv_vda.c:103
uint64_t samples_encoded
Definition: avconv.h:360
const char ** attachments
Definition: avconv.h:126
char * vstats_filename
Definition: avconv_opt.c:69
void show_usage(void)
Definition: avconv_opt.c:2090
AVFormatContext * ctx
Definition: avconv.h:277
int stream_index
Definition: avconv.h:70
AVCodec * enc
Definition: avconv.h:318
enum AVPixelFormat pix_fmt
Definition: avconv.h:63
int eof_reached
Definition: avconv.h:278
int nb_metadata_map
Definition: avconv.h:173
int forced_kf_index
Definition: avconv.h:332
int nb_rc_overrides
Definition: avconv.h:165
InputStream ** input_streams
Definition: avconv.c:98
char * avfilter
Definition: avconv.h:339
uint8_t * name
Definition: avconv.h:192
int audio_volume
Definition: avconv_opt.c:74
void * hwaccel_ctx
Definition: avconv.h:259
int top_field_first
Definition: avconv.h:325
OutputFilter ** outputs
Definition: avconv.h:213
SpecifierOpt * max_frames
Definition: avconv.h:148
int nb_copy_initial_nonkeyframes
Definition: avconv.h:177
int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
int disabled
Definition: avconv.h:68
int nb_input_streams
Definition: avconv.c:99
AVFormatContext * ctx
Definition: avconv.h:364
SpecifierOpt * codec_names
Definition: avconv.h:90
An instance of a filter.
Definition: avfilter.h:563
char * hwaccel_device
Definition: avconv.h:255
AVDictionary * encoder_opts
Definition: avconv.h:342
int do_hex_dump
Definition: avconv_opt.c:78
InputFilter ** inputs
Definition: avconv.h:211
float frame_aspect_ratio
Definition: avconv.h:327
enum AVPixelFormat hwaccel_retrieved_pix_fmt
Definition: avconv.h:264
int sync_stream_index
Definition: avconv.h:72
int dxva2_init(AVCodecContext *s)
Definition: avconv_dxva2.c:589
int discard
Definition: avconv.h:220
enum AVPixelFormat pix_fmts[2]
Definition: avconv.h:349
enum HWAccelID hwaccel_id
Definition: avconv.h:254
int64_t first_pts
Definition: avconv.h:313
int nb_inputs
Definition: avconv.h:212
int index
Definition: avconv.h:301
uint64_t resample_channel_layout
Definition: avconv.h:246
int nb_output_streams
Definition: avconv.c:104
int nb_frame_aspect_ratios
Definition: avconv.h:163
int subtitle_disable
Definition: avconv.h:139