21 #ifndef AVFORMAT_AVFORMAT_H 22 #define AVFORMAT_AVFORMAT_H 448 #define AVPROBE_SCORE_RETRY (AVPROBE_SCORE_MAX/4) 449 #define AVPROBE_SCORE_STREAM_RETRY (AVPROBE_SCORE_MAX/4-1) 451 #define AVPROBE_SCORE_EXTENSION 50 452 #define AVPROBE_SCORE_MIME 75
453 #define AVPROBE_SCORE_MAX 100
455 #define AVPROBE_PADDING_SIZE 32 458 #define AVFMT_NOFILE 0x0001 459 #define AVFMT_NEEDNUMBER 0x0002 460 #define AVFMT_SHOW_IDS 0x0008 461 #define AVFMT_GLOBALHEADER 0x0040 462 #define AVFMT_NOTIMESTAMPS 0x0080 463 #define AVFMT_GENERIC_INDEX 0x0100 464 #define AVFMT_TS_DISCONT 0x0200 465 #define AVFMT_VARIABLE_FPS 0x0400 466 #define AVFMT_NODIMENSIONS 0x0800 467 #define AVFMT_NOSTREAMS 0x1000 468 #define AVFMT_NOBINSEARCH 0x2000 469 #define AVFMT_NOGENSEARCH 0x4000 470 #define AVFMT_NO_BYTE_SEEK 0x8000 471 #define AVFMT_ALLOW_FLUSH 0x10000 472 #define AVFMT_TS_NONSTRICT 0x20000 475 #define AVFMT_TS_NEGATIVE 0x40000 484 #define AVFMT_SEEK_TO_PTS 0x4000000 497 const char *long_name;
499 const char *extensions;
532 #if FF_API_AVIOFORMAT 535 #define ff_const59 const 571 int64_t *dts, int64_t *wall);
576 void *
data,
size_t data_size);
593 #if LIBAVFORMAT_VERSION_MAJOR < 59 652 const char *long_name;
666 const char *extensions;
739 int stream_index, int64_t timestamp,
int flags);
746 int64_t *
pos, int64_t pos_limit);
766 int (*read_seek2)(
struct AVFormatContext *
s,
int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts,
int flags);
774 #if LIBAVFORMAT_VERSION_MAJOR < 59 811 #define AVINDEX_KEYFRAME 0x0001 812 #define AVINDEX_DISCARD_FRAME 0x0002 820 #define AV_DISPOSITION_DEFAULT 0x0001 821 #define AV_DISPOSITION_DUB 0x0002 822 #define AV_DISPOSITION_ORIGINAL 0x0004 823 #define AV_DISPOSITION_COMMENT 0x0008 824 #define AV_DISPOSITION_LYRICS 0x0010 825 #define AV_DISPOSITION_KARAOKE 0x0020 832 #define AV_DISPOSITION_FORCED 0x0040 833 #define AV_DISPOSITION_HEARING_IMPAIRED 0x0080 834 #define AV_DISPOSITION_VISUAL_IMPAIRED 0x0100 835 #define AV_DISPOSITION_CLEAN_EFFECTS 0x0200 843 #define AV_DISPOSITION_ATTACHED_PIC 0x0400 848 #define AV_DISPOSITION_TIMED_THUMBNAILS 0x0800 855 #define AV_DISPOSITION_CAPTIONS 0x10000 856 #define AV_DISPOSITION_DESCRIPTIONS 0x20000 857 #define AV_DISPOSITION_METADATA 0x40000 858 #define AV_DISPOSITION_DEPENDENT 0x80000 859 #define AV_DISPOSITION_STILL_IMAGE 0x100000
864 #define AV_PTS_WRAP_IGNORE 0 865 #define AV_PTS_WRAP_ADD_OFFSET 1
866 #define AV_PTS_WRAP_SUB_OFFSET -1
883 #if FF_API_LAVF_AVCTX 1001 #define AVSTREAM_EVENT_FLAG_METADATA_UPDATED 0x0001 1007 #define AVSTREAM_EVENT_FLAG_NEW_PACKETS (1 << 1) 1019 #if FF_API_LAVF_FFSERVER 1028 char *recommended_encoder_configuration;
1052 #if LIBAVFORMAT_VERSION_MAJOR < 59 1069 int64_t last_IP_pts;
1070 int last_IP_duration;
1080 int codec_info_nb_frames;
1086 #if LIBAVFORMAT_VERSION_MAJOR < 59 1090 int64_t unused5[16+1];
1093 unsigned int unused4;
1101 int stream_identifier;
1103 #if LIBAVFORMAT_VERSION_MAJOR < 59 1117 #if FF_API_FORMAT_GET_SET 1126 #if FF_API_LAVF_FFSERVER 1128 char* av_stream_get_recommended_encoder_configuration(
const AVStream *
s);
1130 void av_stream_set_recommended_encoder_configuration(
AVStream *
s,
char *configuration);
1143 #define AV_PROGRAM_RUNNING 1 1155 unsigned int *stream_index;
1156 unsigned int nb_stream_indexes;
1174 int64_t pts_wrap_reference;
1175 int pts_wrap_behavior;
1178 #define AVFMTCTX_NOHEADER 0x0001 1180 #define AVFMTCTX_UNSEEKABLE 0x0002 1198 void *
data,
size_t data_size);
1299 #if FF_API_FORMAT_FILENAME 1353 unsigned int packet_size;
1361 #define AVFMT_FLAG_GENPTS 0x0001 1362 #define AVFMT_FLAG_IGNIDX 0x0002
1363 #define AVFMT_FLAG_NONBLOCK 0x0004
1364 #define AVFMT_FLAG_IGNDTS 0x0008
1365 #define AVFMT_FLAG_NOFILLIN 0x0010
1366 #define AVFMT_FLAG_NOPARSE 0x0020
1367 #define AVFMT_FLAG_NOBUFFER 0x0040
1368 #define AVFMT_FLAG_CUSTOM_IO 0x0080
1369 #define AVFMT_FLAG_DISCARD_CORRUPT 0x0100
1370 #define AVFMT_FLAG_FLUSH_PACKETS 0x0200
1377 #define AVFMT_FLAG_BITEXACT 0x0400 1378 #if FF_API_LAVF_MP4A_LATM 1379 #define AVFMT_FLAG_MP4A_LATM 0x8000 1381 #define AVFMT_FLAG_SORT_DTS 0x10000 1382 #define AVFMT_FLAG_PRIV_OPT 0x20000
1383 #if FF_API_LAVF_KEEPSIDE_FLAG
1384 #define AVFMT_FLAG_KEEP_SIDE_DATA 0x40000 1386 #define AVFMT_FLAG_FAST_SEEK 0x80000 1387 #define AVFMT_FLAG_SHORTEST 0x100000
1388 #define AVFMT_FLAG_AUTO_BSF 0x200000
1403 int64_t max_analyze_duration;
1408 unsigned int nb_programs;
1439 unsigned int max_index_size;
1445 unsigned int max_picture_buffer;
1458 unsigned int nb_chapters;
1482 int64_t start_time_realtime;
1496 int error_recognition;
1513 #define FF_FDEBUG_TS 0x0001 1531 int64_t max_interleave_delta;
1537 int strict_std_compliance;
1557 #define AVFMT_EVENT_FLAG_METADATA_UPDATED 0x0001 1572 int avoid_negative_ts;
1573 #define AVFMT_AVOID_NEG_TS_AUTO -1 1574 #define AVFMT_AVOID_NEG_TS_MAKE_NON_NEGATIVE 1
1575 #define AVFMT_AVOID_NEG_TS_MAKE_ZERO 2
1597 int max_chunk_duration;
1613 int use_wallclock_as_timestamps;
1635 int64_t skip_initial_bytes;
1642 unsigned int correct_ts_overflow;
1672 int format_probesize;
1680 char *codec_whitelist;
1688 char *format_whitelist;
1702 int io_repositioned;
1741 int metadata_header_padding;
1758 int64_t output_ts_offset;
1774 #if FF_API_OLD_OPEN_CALLBACKS 1860 #if FF_API_FORMAT_GET_SET 1895 #if FF_API_OLD_OPEN_CALLBACKS 1948 void av_register_all(
void);
2182 const char *
url,
void *logctx,
2183 unsigned int offset,
unsigned int max_probe_size);
2189 const char *
url,
void *logctx,
2190 unsigned int offset,
unsigned int max_probe_size);
2279 int wanted_stream_nb,
2397 #define AVSEEK_FLAG_BACKWARD 1 2398 #define AVSEEK_FLAG_BYTE 2
2399 #define AVSEEK_FLAG_ANY 4
2400 #define AVSEEK_FLAG_FRAME 8
2407 #define AVSTREAM_INIT_IN_WRITE_HEADER 0 2408 #define AVSTREAM_INIT_IN_INIT_OUTPUT 1
2624 int64_t *dts, int64_t *wall);
2768 char *authorization,
int authorization_size,
2769 char *hostname,
int hostname_size,
2771 char *path,
int path_size,
2791 #define AV_FRAME_FILENAME_FLAGS_MULTIPLE 1 2807 const char *path,
int number,
int flags);
2810 const char *path,
int number);
2859 int std_compliance);
2962 #if FF_API_R_FRAME_RATE 2963 AVFMT_TBCF_R_FRAMERATE,
void av_url_split(char *proto, int proto_size, char *authorization, int authorization_size, char *hostname, int hostname_size, int *port_ptr, char *path, int path_size, const char *url)
Split a URL string into components.
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
int(* io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options)
A callback for opening new IO streams.
void av_pkt_dump2(FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st)
Send a nice dump of a packet to the specified file stream.
attribute_deprecated int av_demuxer_open(AVFormatContext *ic)
This structure describes decoded (raw) audio or video data.
int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt)
Write a packet to an output media file ensuring correct interleaving.
ptrdiff_t const GLvoid * data
static void flush(AVCodecContext *avctx)
int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags)
Add an index entry into a sorted list.
int av_write_frame(AVFormatContext *s, AVPacket *pkt)
Write a packet to an output media file.
static av_cold int init(AVCodecContext *avctx)
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
AVRational av_guess_sample_aspect_ratio(AVFormatContext *format, AVStream *stream, AVFrame *frame)
Guess the sample aspect ratio of a frame, based on both the stream and the frame aspect ratio...
int av_get_output_timestamp(struct AVFormatContext *s, int stream, int64_t *dts, int64_t *wall)
Get timing information for the data currently output.
int avformat_open_input(AVFormatContext **ps, const char *url, ff_const59 AVInputFormat *fmt, AVDictionary **options)
Open an input stream and read the header.
int av_write_uncoded_frame_query(AVFormatContext *s, int stream_index)
Test whether a muxer supports uncoded frame.
int av_probe_input_buffer(AVIOContext *pb, ff_const59 AVInputFormat **fmt, const char *url, void *logctx, unsigned int offset, unsigned int max_probe_size)
Like av_probe_input_buffer2() but returns 0 on success.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample format(the sample packing is implied by the sample format) and sample rate.The lists are not just lists
This struct describes the properties of an encoded stream.
AVRational av_guess_frame_rate(AVFormatContext *ctx, AVStream *stream, AVFrame *frame)
Guess the frame rate, based on both the container and codec information.
static int query_codec(enum AVCodecID id, int std_compliance)
const struct AVCodecTag * avformat_get_mov_audio_tags(void)
static int64_t start_time
const struct AVCodecTag * avformat_get_riff_video_tags(void)
enum AVCodecID av_codec_get_id(const struct AVCodecTag *const *tags, unsigned int tag)
Get the AVCodecID for the given codec tag tag.
unsigned avformat_version(void)
Return the LIBAVFORMAT_VERSION_INT constant.
const char * avformat_license(void)
Return the libavformat license.
int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt, AVStream *ost, const AVStream *ist, enum AVTimebaseSource copy_tb)
Transfer internal timing information from one stream to another.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
Check if the stream st contained in s is matched by the stream specifier spec.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
uint8_t * av_stream_get_side_data(const AVStream *stream, enum AVPacketSideDataType type, int *size)
Get side information from stream.
int av_codec_get_tag2(const struct AVCodecTag *const *tags, enum AVCodecID id, unsigned int *tag)
Get the codec tag for the given codec id.
AVFormatContext * avformat_alloc_context(void)
Allocate an AVFormatContext.
void av_pkt_dump_log2(void *avcl, int level, const AVPacket *pkt, int dump_payload, const AVStream *st)
Send a nice dump of a packet to the log.
const char * avformat_configuration(void)
Return the libavformat build-time configuration.
AVProgram * av_new_program(AVFormatContext *s, int id)
char * protocol_whitelist
',' separated list of allowed protocols.
int avformat_network_init(void)
Do global initialization of network libraries.
const struct AVCodecTag * avformat_get_riff_audio_tags(void)
static av_cold int read_close(AVFormatContext *ctx)
int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size)
Generate an SDP for an RTP session.
int av_match_ext(const char *filename, const char *extensions)
Return a positive value if the given filename has one of the given extensions, 0 otherwise.
const AVClass * avformat_get_class(void)
Get the AVClass for AVFormatContext.
static int interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *in, int flush)
Interleave an AVPacket correctly so it can be muxed.
const AVOutputFormat * av_muxer_iterate(void **opaque)
Iterate over all registered muxers.
const struct AVCodecTag * avformat_get_mov_video_tags(void)
void av_dump_format(AVFormatContext *ic, int index, const char *url, int is_output)
Print detailed information about the input or output format, such as duration, bitrate, streams, container, programs, metadata, side data, codec and time base.
Callback for checking whether to abort blocking functions.
int av_find_best_stream(AVFormatContext *ic, enum AVMediaType type, int wanted_stream_nb, int related_stream, AVCodec **decoder_ret, int flags)
Find the "best" stream in the file.
AVRational av_stream_get_codec_timebase(const AVStream *st)
Get the internal codec timebase from a stream.
ff_const59 AVInputFormat * av_probe_input_format(ff_const59 AVProbeData *pd, int is_opened)
Guess the file format.
AVProgram * av_find_program_from_stream(AVFormatContext *ic, AVProgram *last, int s)
Find the programs which belong to a given stream.
ff_const59 AVInputFormat * av_probe_input_format2(ff_const59 AVProbeData *pd, int is_opened, int *score_max)
Guess the file format.
AVCodecID
Identify the syntax and semantics of the bitstream.
int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags)
Get the index for a specific timestamp.
const AVIOInterruptCB int_cb
void av_hex_dump(FILE *f, const uint8_t *buf, int size)
Send a nice hexadecimal dump of a buffer to the specified file stream.
struct AVCodecParser * parser
char * url
input or output URL.
int av_read_play(AVFormatContext *s)
Start playing a network-based stream (e.g.
ff_const59 AVInputFormat * av_find_input_format(const char *short_name)
Find AVInputFormat based on the short name of the input format.
int skip_estimate_duration_from_pts
Skip duration calcuation in estimate_timings_from_pts.
New fields can be added to the end with minor version bumps.
int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id, int std_compliance)
Test if the given container can store a codec.
static float distance(float x, float y, int band)
const char * mime_type
mime_type, when known.
int buf_size
Size of buf except extra allocated bytes.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
int av_read_pause(AVFormatContext *s)
Pause a network-based stream (e.g.
static void callback(void *priv_data, int index, uint8_t *buf, int buf_size, int64_t time, enum dshowDeviceType devtype)
av_warn_unused_result int avformat_write_header(AVFormatContext *s, AVDictionary **options)
Allocate the stream private data and write the stream header to an output media file.
void av_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int idx)
int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type, uint8_t *data, size_t size)
Wrap an existing array as stream side data.
int max_streams
The maximum number of streams.
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
int av_find_default_stream_index(AVFormatContext *s)
static int write_trailer(AVFormatContext *s1)
enum AVCodecID av_guess_codec(ff_const59 AVOutputFormat *fmt, const char *short_name, const char *filename, const char *mime_type, enum AVMediaType type)
Guess the codec ID based upon muxer and filename.
ff_const59 AVInputFormat * av_probe_input_format3(ff_const59 AVProbeData *pd, int is_opened, int *score_ret)
Guess the file format.
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
uint8_t * av_stream_new_side_data(AVStream *stream, enum AVPacketSideDataType type, int size)
Allocate new information from stream.
av_warn_unused_result int avformat_init_output(AVFormatContext *s, AVDictionary **options)
Allocate the stream private data and initialize the codec, but do not write the header.
const AVInputFormat * av_demuxer_iterate(void **opaque)
Iterate over all registered demuxers.
int av_get_frame_filename(char *buf, int buf_size, const char *path, int number)
ff_const59 struct AVOutputFormat * oformat
The output container format.
static int read_header(FFV1Context *f)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
int avformat_queue_attached_pictures(AVFormatContext *s)
int avformat_network_deinit(void)
Undo the initialization done by avformat_network_init.
static AVInputFormat * iformat
Libavcodec external API header.
int av_probe_input_buffer2(AVIOContext *pb, ff_const59 AVInputFormat **fmt, const char *url, void *logctx, unsigned int offset, unsigned int max_probe_size)
Probe a bytestream to determine the input format.
AVIOContext * pb
I/O context.
main external API structure.
int av_filename_number_test(const char *filename)
Check whether filename actually is a numbered sequence generator.
int av_get_frame_filename2(char *buf, int buf_size, const char *path, int number, int flags)
Return in 'buf' the path with 'd' replaced by a number.
void(* io_close)(struct AVFormatContext *s, AVIOContext *pb)
A callback for closing the streams opened with AVFormatContext.io_open().
static const AVClass av_class
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31))))#define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac){}void ff_audio_convert_free(AudioConvert **ac){if(!*ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map){AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;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);return NULL;}return ac;}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;}else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->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);return ac;}int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){int use_generic=1;int len=in->nb_samples;int p;if(ac->dc){av_log(ac->avr, AV_LOG_TRACE,"%d samples - audio_convert: %s to %s (dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> in
Describe the class of an AVClass context structure.
ff_const59 AVOutputFormat * av_guess_format(const char *short_name, const char *filename, const char *mime_type)
Return the output format in the list of registered output formats which best matches the provided par...
Rational number (pair of numerator and denominator).
int max_probe_packets
Maximum number of packets that can be probed.
void avformat_free_context(AVFormatContext *s)
Free an AVFormatContext and all its streams.
This structure contains the data a format has to probe a file.
int av_read_frame(AVFormatContext *s, AVPacket *pkt)
Return the next frame of a stream.
int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
Seek to timestamp ts.
#define flags(name, subs,...)
static int format_name(const char *buf, char **s, int index, const char *varname)
#define attribute_deprecated
#define av_warn_unused_result
int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Seek to the keyframe at timestamp.
const OptionDef options[]
int av_interleaved_write_uncoded_frame(AVFormatContext *s, int stream_index, AVFrame *frame)
Write an uncoded frame to an output media file.
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
Read packets of a media file to get stream information.
void avformat_close_input(AVFormatContext **s)
Close an opened input AVFormatContext.
int av_write_uncoded_frame(AVFormatContext *s, int stream_index, AVFrame *frame)
Write an uncoded frame to an output media file.
static int check_bitstream(AVFormatContext *s, AVStream *st, AVPacket *pkt)
static void write_header(FFV1Context *f)
int av_write_trailer(AVFormatContext *s)
Write the stream trailer to an output media file and free the file private data.
char * protocol_blacklist
',' separated list of disallowed protocols.
int avformat_flush(AVFormatContext *s)
Discard all internally buffered data.
void av_hex_dump_log(void *avcl, int level, const uint8_t *buf, int size)
Send a nice hexadecimal dump of a buffer to the log.
unsigned int av_codec_get_tag(const struct AVCodecTag *const *tags, enum AVCodecID id)
Get the codec tag for the given codec id id.
Following API allows user to probe device capabilities (supported codecs, pixel formats, sample formats, resolutions, channel counts, etc).
This structure stores compressed data.