FFmpeg  4.0
allformats.c
Go to the documentation of this file.
1 /*
2  * Register all the formats and protocols
3  * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #include "libavutil/thread.h"
23 #include "libavformat/internal.h"
24 #include "avformat.h"
25 #include "rtp.h"
26 #include "rdt.h"
27 #include "url.h"
28 #include "version.h"
29 
30 /* (de)muxers */
455 /* image demuxers */
479 
480 /* external libraries */
485 
486 #include "libavformat/muxer_list.c"
488 
489 static const AVInputFormat * const *indev_list = NULL;
490 static const AVOutputFormat * const *outdev_list = NULL;
491 
492 const AVOutputFormat *av_muxer_iterate(void **opaque)
493 {
494  static const uintptr_t size = sizeof(muxer_list)/sizeof(muxer_list[0]) - 1;
495  uintptr_t i = (uintptr_t)*opaque;
496  const AVOutputFormat *f = NULL;
497 
498  if (i < size) {
499  f = muxer_list[i];
500  } else if (indev_list) {
501  f = outdev_list[i - size];
502  }
503 
504  if (f)
505  *opaque = (void*)(i + 1);
506  return f;
507 }
508 
509 const AVInputFormat *av_demuxer_iterate(void **opaque)
510 {
511  static const uintptr_t size = sizeof(demuxer_list)/sizeof(demuxer_list[0]) - 1;
512  uintptr_t i = (uintptr_t)*opaque;
513  const AVInputFormat *f = NULL;
514 
515  if (i < size) {
516  f = demuxer_list[i];
517  } else if (outdev_list) {
518  f = indev_list[i - size];
519  }
520 
521  if (f)
522  *opaque = (void*)(i + 1);
523  return f;
524 }
525 
527 
528 #if FF_API_NEXT
530 static AVOnce av_format_next_init = AV_ONCE_INIT;
531 
532 static void av_format_init_next(void)
533 {
534  AVOutputFormat *prevout = NULL, *out;
535  AVInputFormat *previn = NULL, *in;
536 
538 
539  for (int i = 0; (out = (AVOutputFormat*)muxer_list[i]); i++) {
540  if (prevout)
541  prevout->next = out;
542  prevout = out;
543  }
544 
545  if (outdev_list) {
546  for (int i = 0; (out = (AVOutputFormat*)outdev_list[i]); i++) {
547  if (prevout)
548  prevout->next = out;
549  prevout = out;
550  }
551  }
552 
553  for (int i = 0; (in = (AVInputFormat*)demuxer_list[i]); i++) {
554  if (previn)
555  previn->next = in;
556  previn = in;
557  }
558 
559  if (indev_list) {
560  for (int i = 0; (in = (AVInputFormat*)indev_list[i]); i++) {
561  if (previn)
562  previn->next = in;
563  previn = in;
564  }
565  }
566 
568 }
569 
570 AVInputFormat *av_iformat_next(const AVInputFormat *f)
571 {
572  ff_thread_once(&av_format_next_init, av_format_init_next);
573 
574  if (f)
575  return f->next;
576  else {
577  void *opaque = NULL;
578  return (AVInputFormat *)av_demuxer_iterate(&opaque);
579  }
580 }
581 
582 AVOutputFormat *av_oformat_next(const AVOutputFormat *f)
583 {
584  ff_thread_once(&av_format_next_init, av_format_init_next);
585 
586  if (f)
587  return f->next;
588  else {
589  void *opaque = NULL;
590  return (AVOutputFormat *)av_muxer_iterate(&opaque);
591  }
592 }
593 
594 void av_register_all(void)
595 {
596  ff_thread_once(&av_format_next_init, av_format_init_next);
597 }
598 
599 void av_register_input_format(AVInputFormat *format)
600 {
601  ff_thread_once(&av_format_next_init, av_format_init_next);
602 }
603 
604 void av_register_output_format(AVOutputFormat *format)
605 {
606  ff_thread_once(&av_format_next_init, av_format_init_next);
607 }
609 #endif
610 
611 void avpriv_register_devices(const AVOutputFormat * const o[], const AVInputFormat * const i[])
612 {
614  outdev_list = o;
615  indev_list = i;
617 #if FF_API_NEXT
618  av_format_init_next();
619 #endif
620 }
AVOutputFormat ff_mpeg2svcd_muxer
AVInputFormat ff_pcm_s16le_demuxer
AVInputFormat ff_yuv4mpegpipe_demuxer
Definition: yuv4mpegdec.c:331
AVInputFormat ff_cine_demuxer
Definition: cinedec.c:321
AVInputFormat ff_s337m_demuxer
Definition: s337m.c:199
AVOutputFormat ff_caf_muxer
Definition: cafenc.c:268
AVOutputFormat ff_m4v_muxer
#define NULL
Definition: coverity.c:32
AVInputFormat ff_image_bmp_pipe_demuxer
AVInputFormat ff_asf_demuxer
Definition: asfdec_f.c:1693
AVOutputFormat ff_asf_stream_muxer
AVOutputFormat ff_segment_muxer
AVOutputFormat ff_image2_muxer
AVInputFormat ff_dtshd_demuxer
Definition: dtshddec.c:162
AVOutputFormat ff_jacosub_muxer
Definition: jacosubenc.c:33
AVInputFormat ff_txd_demuxer
Definition: txd.c:95
AVInputFormat ff_mtv_demuxer
Definition: mtv.c:226
AVInputFormat ff_srt_demuxer
Definition: srtdec.c:235
static const char * format[]
Definition: af_aiir.c:311
int size
AVInputFormat ff_msf_demuxer
Definition: msf.c:103
AVOutputFormat ff_vc1t_muxer
Definition: vc1testenc.c:84
AVInputFormat ff_pcm_s32be_demuxer
AVInputFormat ff_ac3_demuxer
AVOutputFormat ff_g726_muxer
AVInputFormat ff_sup_demuxer
Definition: supdec.c:100
AVInputFormat ff_aa_demuxer
Definition: aadec.c:299
AVOutputFormat ff_f4v_muxer
AVInputFormat ff_ads_demuxer
Definition: ads.c:82
AVInputFormat ff_data_demuxer
AVInputFormat ff_dsf_demuxer
Definition: dsfdec.c:157
AVOutputFormat ff_rtsp_muxer
Definition: rtspenc.c:244
AVInputFormat ff_str_demuxer
Definition: psxstr.c:301
AVOutputFormat ff_chromaprint_muxer
Definition: chromaprint.c:181
AVInputFormat ff_image_sunrast_pipe_demuxer
AVInputFormat ff_aqtitle_demuxer
Definition: aqtitledec.c:137
AVInputFormat ff_pcm_s24le_demuxer
AVInputFormat ff_caf_demuxer
Definition: cafdec.c:446
AVInputFormat ff_bink_demuxer
Definition: bink.c:317
AVOutputFormat ff_apng_muxer
Definition: apngenc.c:292
AVInputFormat ff_pcm_u8_demuxer
AVInputFormat ff_dash_demuxer
Definition: dashdec.c:2167
AVOutputFormat ff_nut_muxer
Definition: nutenc.c:1216
AVInputFormat ff_image2_demuxer
AVInputFormat ff_image_pictor_pipe_demuxer
AVInputFormat ff_pva_demuxer
Definition: pva.c:226
AVInputFormat ff_mmf_demuxer
AVInputFormat ff_daud_demuxer
Definition: dauddec.c:53
AVInputFormat ff_aea_demuxer
Definition: aea.c:101
AVOutputFormat ff_aiff_muxer
Definition: aiffenc.c:323
AVInputFormat ff_yop_demuxer
Definition: yop.c:214
AVInputFormat ff_jacosub_demuxer
Definition: jacosubdec.c:265
AVInputFormat ff_image_xpm_pipe_demuxer
AVOutputFormat ff_md5_muxer
AVOutputFormat ff_latm_muxer
Definition: latmenc.c:243
AVInputFormat ff_mgsts_demuxer
Definition: mgsts.c:99
AVOutputFormat ff_mp3_muxer
Definition: mp3enc.c:611
static int ff_mutex_lock(AVMutex *mutex)
Definition: thread.h:155
AVInputFormat ff_dsicin_demuxer
Definition: dsicin.c:227
AVOutputFormat ff_hds_muxer
Definition: hdsenc.c:582
AVOutputFormat ff_dash_muxer
Definition: dashenc.c:1455
AVInputFormat ff_vpk_demuxer
Definition: vpk.c:109
AVOutputFormat ff_mpeg1video_muxer
AVInputFormat ff_dts_demuxer
Definition: dtsdec.c:130
AVOutputFormat ff_ircam_muxer
Definition: ircamenc.c:53
AVInputFormat ff_image_jpeg_pipe_demuxer
AVInputFormat ff_ast_demuxer
Definition: astdec.c:113
AVOutputFormat ff_uncodedframecrc_muxer
AVInputFormat ff_scc_demuxer
Definition: sccdec.c:170
AVInputFormat ff_ty_demuxer
Definition: ty.c:779
AVOutputFormat ff_ast_muxer
Definition: astenc.c:202
AVInputFormat ff_pcm_s32le_demuxer
AVInputFormat ff_webm_dash_manifest_demuxer
Definition: matroskadec.c:4039
AVOutputFormat ff_mp2_muxer
AVInputFormat ff_smush_demuxer
Definition: smush.c:244
AVOutputFormat ff_flv_muxer
Definition: flvenc.c:1086
AVOutputFormat ff_mpjpeg_muxer
Definition: mpjpeg.c:70
AVInputFormat ff_image_qdraw_pipe_demuxer
AVInputFormat ff_gxf_demuxer
Definition: gxf.c:599
AVInputFormat ff_g723_1_demuxer
Definition: g723_1.c:79
AVInputFormat ff_bethsoftvid_demuxer
Definition: bethsoftvid.c:294
AVInputFormat ff_sdx_demuxer
Definition: sdxdec.c:81
AVInputFormat ff_vag_demuxer
Definition: vag.c:76
AVOutputFormat ff_smoothstreaming_muxer
AVInputFormat ff_bit_demuxer
AVInputFormat ff_roq_demuxer
Definition: idroqdec.c:242
AVInputFormat ff_pcm_f64le_demuxer
AVInputFormat ff_pmp_demuxer
Definition: pmpdec.c:186
AVOutputFormat ff_data_muxer
AVOutputFormat ff_dirac_muxer
AVOutputFormat ff_au_muxer
AVOutputFormat ff_pcm_s8_muxer
AVInputFormat ff_voc_demuxer
Definition: vocdec.c:101
AVInputFormat ff_webvtt_demuxer
Definition: webvttdec.c:213
AVOutputFormat ff_roq_muxer
Definition: idroqenc.c:63
AVOutputFormat ff_pcm_u16be_muxer
AVInputFormat ff_epaf_demuxer
Definition: epafdec.c:96
void avpriv_register_devices(const AVOutputFormat *const o[], const AVInputFormat *const i[])
Definition: allformats.c:611
AVInputFormat ff_apng_demuxer
Definition: apngdec.c:434
AVOutputFormat ff_webp_muxer
Definition: webpenc.c:207
AVInputFormat ff_mpjpeg_demuxer
Definition: mpjpegdec.c:391
AVInputFormat ff_image_j2k_pipe_demuxer
AVInputFormat ff_image_psd_pipe_demuxer
AVInputFormat ff_dvbsub_demuxer
static const AVOutputFormat *const * outdev_list
Definition: allformats.c:490
AVInputFormat ff_realtext_demuxer
Definition: realtextdec.c:146
AVOutputFormat ff_ipod_muxer
AVOutputFormat ff_mpeg1system_muxer
AVInputFormat ff_boa_demuxer
Definition: boadec.c:78
AVOutputFormat ff_rm_muxer
Definition: rmenc.c:469
AVInputFormat ff_microdvd_demuxer
Definition: microdvddec.c:194
AVInputFormat ff_ffmetadata_demuxer
Definition: ffmetadec.c:171
AVInputFormat ff_tta_demuxer
Definition: tta.c:187
AVOutputFormat ff_eac3_muxer
AVInputFormat ff_wsd_demuxer
Definition: wsddec.c:164
AVInputFormat ff_sol_demuxer
Definition: sol.c:141
AVInputFormat ff_sami_demuxer
Definition: samidec.c:136
AVInputFormat ff_g729_demuxer
Definition: g729dec.c:96
AVInputFormat ff_iff_demuxer
Definition: iff.c:887
AVInputFormat ff_codec2raw_demuxer
AVInputFormat ff_spdif_demuxer
Definition: spdifdec.c:237
AVInputFormat ff_swf_demuxer
Definition: swfdec.c:539
AVOutputFormat ff_smjpeg_muxer
Definition: smjpegenc.c:136
AVInputFormat ff_threedostr_demuxer
Definition: 3dostr.c:160
AVInputFormat ff_sds_demuxer
Definition: sdsdec.c:156
AVOutputFormat ff_webm_dash_manifest_muxer
AVInputFormat ff_segafilm_demuxer
Definition: segafilm.c:333
AVInputFormat ff_matroska_demuxer
Definition: matroskadec.c:4026
AVOutputFormat ff_filmstrip_muxer
Definition: filmstripenc.c:75
AVOutputFormat ff_avi_muxer
Definition: avienc.c:993
AVOutputFormat ff_mpeg2dvd_muxer
AVOutputFormat ff_g722_muxer
AVOutputFormat ff_pcm_f32be_muxer
AVInputFormat ff_mtaf_demuxer
Definition: mtaf.c:74
AVOutputFormat ff_spx_muxer
AVInputFormat ff_sdr2_demuxer
Definition: sdr2.c:113
AVInputFormat ff_bfi_demuxer
Definition: bfi.c:177
static const AVInputFormat *const * indev_list
Definition: allformats.c:489
AVInputFormat ff_image_pcx_pipe_demuxer
AVInputFormat ff_ea_cdata_demuxer
Definition: eacdata.c:97
AVOutputFormat ff_pcm_f64be_muxer
AVOutputFormat ff_pcm_s32be_muxer
AVOutputFormat ff_adx_muxer
AVInputFormat ff_gsm_demuxer
Definition: gsmdec.c:107
AVInputFormat ff_m4v_demuxer
AVOutputFormat ff_dv_muxer
Definition: dvenc.c:445
static const AVOutputFormat *const muxer_list[]
Definition: muxer_list.c:1
AVInputFormat ff_amrwb_demuxer
AVInputFormat ff_iv8_demuxer
Definition: iv8.c:111
AVInputFormat ff_mpegtsraw_demuxer
Definition: mpegts.c:2996
AVInputFormat ff_aiff_demuxer
Definition: aiffdec.c:415
AVInputFormat ff_wtv_demuxer
Definition: wtvdec.c:1121
#define AVOnce
Definition: thread.h:159
AVInputFormat ff_g726le_demuxer
AVInputFormat ff_image_svg_pipe_demuxer
AVOutputFormat ff_webm_muxer
AVInputFormat ff_dss_demuxer
Definition: dss.c:388
AVInputFormat ff_pcm_s8_demuxer
AVInputFormat ff_rtp_demuxer
AVOutputFormat ff_h261_muxer
const AVOutputFormat * av_muxer_iterate(void **opaque)
Iterate over all registered muxers.
Definition: allformats.c:492
AVInputFormat ff_nc_demuxer
Definition: ncdec.c:94
AVInputFormat ff_sln_demuxer
Definition: pcmdec.c:193
AVInputFormat ff_mlv_demuxer
Definition: mlvdec.c:470
AVInputFormat ff_cdxl_demuxer
Definition: cdxl.c:239
AVInputFormat ff_image_sgi_pipe_demuxer
AVInputFormat ff_g726_demuxer
AVInputFormat ff_tmv_demuxer
Definition: tmv.c:190
AVInputFormat ff_thp_demuxer
Definition: thp.c:209
AVInputFormat ff_nsp_demuxer
Definition: nspdec.c:99
AVInputFormat ff_ivf_demuxer
Definition: ivfdec.c:83
AVInputFormat ff_act_demuxer
Definition: act.c:200
AVOutputFormat ff_hevc_muxer
AVInputFormat ff_rpl_demuxer
Definition: rpl.c:357
#define AVMutex
Definition: thread.h:151
AVInputFormat ff_pvf_demuxer
Definition: pvfdec.c:68
AVOutputFormat ff_codec2_muxer
AVInputFormat ff_apc_demuxer
Definition: apc.c:86
AVInputFormat ff_pjs_demuxer
Definition: pjsdec.c:128
AVInputFormat ff_hls_demuxer
Definition: hls.c:2343
AVInputFormat ff_ipmovie_demuxer
Definition: ipmovie.c:729
AVOutputFormat ff_framehash_muxer
AVOutputFormat ff_yuv4mpegpipe_muxer
Definition: yuv4mpegenc.c:321
AVOutputFormat ff_microdvd_muxer
Definition: microdvdenc.c:58
AVInputFormat ff_rawvideo_demuxer
Definition: rawvideodec.c:103
AVOutputFormat ff_adts_muxer
Definition: adtsenc.c:227
AVOutputFormat ff_rso_muxer
Definition: rsoenc.c:101
AVOutputFormat ff_sox_muxer
Definition: soxenc.c:111
AVInputFormat ff_afc_demuxer
Definition: afc.c:71
AVOutputFormat ff_ffmetadata_muxer
Definition: ffmetaenc.c:91
AVInputFormat ff_nut_demuxer
Definition: nutdec.c:1293
AVOutputFormat ff_bit_muxer
AVInputFormat ff_wv_demuxer
Definition: wvdec.c:313
AVOutputFormat ff_h264_muxer
AVInputFormat ff_smjpeg_demuxer
Definition: smjpegdec.c:176
AVOutputFormat ff_pcm_u16le_muxer
AVOutputFormat ff_ico_muxer
Definition: icoenc.c:191
AVInputFormat ff_mpl2_demuxer
Definition: mpl2dec.c:144
AVInputFormat ff_mov_demuxer
Definition: mov.c:7356
AVOutputFormat ff_ogv_muxer
AVOutputFormat ff_pcm_u8_muxer
AVOutputFormat ff_rtp_muxer
Definition: rtpenc.c:651
AVOutputFormat ff_mmf_muxer
AVInputFormat ff_siff_demuxer
Definition: siff.c:250
AVInputFormat ff_fsb_demuxer
Definition: fsb.c:202
AVOutputFormat ff_sap_muxer
Definition: sapenc.c:271
AVInputFormat ff_dirac_demuxer
AVInputFormat ff_live_flv_demuxer
Definition: flvdec.c:1313
AVOutputFormat ff_wav_muxer
AVOutputFormat ff_pcm_u24le_muxer
AVOutputFormat ff_ass_muxer
Definition: assenc.c:230
AVOutputFormat ff_aptx_muxer
static int ff_mutex_unlock(AVMutex *mutex)
Definition: thread.h:156
AVInputFormat ff_xwma_demuxer
Definition: xwma.c:288
AVInputFormat ff_vplayer_demuxer
Definition: vplayerdec.c:119
AVOutputFormat ff_amr_muxer
AVOutputFormat ff_w64_muxer
AVInputFormat ff_wav_demuxer
AVOutputFormat ff_mpeg1vcd_muxer
AVOutputFormat ff_lrc_muxer
Definition: lrcenc.c:143
AVOutputFormat ff_scc_muxer
Definition: sccenc.c:114
AVOutputFormat ff_sbc_muxer
AVInputFormat ff_acm_demuxer
Definition: acm.c:66
AVOutputFormat ff_matroska_audio_muxer
AVInputFormat ff_asf_o_demuxer
Definition: asfdec_o.c:1786
AVOutputFormat ff_pcm_u32le_muxer
AVOutputFormat ff_rawvideo_muxer
AVOutputFormat ff_rtp_mpegts_muxer
AVInputFormat ff_sbc_demuxer
Definition: sbcdec.c:25
AVInputFormat ff_rm_demuxer
Definition: rmdec.c:1141
AVInputFormat ff_dnxhd_demuxer
#define AV_MUTEX_INITIALIZER
Definition: thread.h:152
AVInputFormat ff_h261_demuxer
AVOutputFormat ff_mkvtimestamp_v2_muxer
AVInputFormat ff_image_jpegls_pipe_demuxer
AVInputFormat ff_image2_brender_pix_demuxer
AVOutputFormat ff_g723_1_muxer
AVOutputFormat ff_tee_muxer
Definition: tee.c:609
AVInputFormat ff_svag_demuxer
Definition: svag.c:71
AVInputFormat ff_ircam_demuxer
Definition: ircamdec.c:109
AVOutputFormat ff_mpegts_muxer
Definition: mpegtsenc.c:1973
AVInputFormat ff_ico_demuxer
Definition: icodec.c:213
AVInputFormat ff_ea_demuxer
AVInputFormat ff_pcm_u24be_demuxer
AVInputFormat ff_image_pbm_pipe_demuxer
AVInputFormat ff_truehd_demuxer
AVInputFormat ff_h264_demuxer
AVOutputFormat ff_swf_muxer
AVInputFormat ff_vmd_demuxer
Definition: sierravmd.c:321
AVOutputFormat ff_crc_muxer
Definition: crcenc.c:59
AVOutputFormat ff_gsm_muxer
AVInputFormat ff_flic_demuxer
Definition: flic.c:262
AVInputFormat ff_fits_demuxer
Definition: fitsdec.c:222
AVInputFormat ff_flv_demuxer
Definition: flvdec.c:1293
AVInputFormat ff_aptx_demuxer
AVOutputFormat ff_spdif_muxer
Definition: spdifenc.c:549
AVInputFormat ff_aac_demuxer
Definition: aacdec.c:194
AVInputFormat ff_c93_demuxer
Definition: c93.c:195
AVInputFormat ff_adf_demuxer
AVInputFormat ff_subviewer_demuxer
Definition: subviewerdec.c:184
AVInputFormat ff_v210_demuxer
AVOutputFormat ff_segafilm_muxer
Definition: segafilmenc.c:387
AVInputFormat ff_bintext_demuxer
AVInputFormat ff_pcm_u32be_demuxer
AVInputFormat ff_xmv_demuxer
Definition: xmv.c:588
AVInputFormat ff_mpc_demuxer
Definition: mpc.c:226
AVInputFormat ff_mpsub_demuxer
Definition: mpsubdec.c:134
AVInputFormat ff_concat_demuxer
Definition: concatdec.c:773
AVInputFormat ff_libopenmpt_demuxer
Definition: libopenmpt.c:284
Libavformat version macros.
AVInputFormat ff_xvag_demuxer
Definition: xvag.c:106
AVInputFormat ff_avi_demuxer
Definition: avidec.c:1931
AVInputFormat ff_lxf_demuxer
Definition: lxfdec.c:336
const AVInputFormat * av_demuxer_iterate(void **opaque)
Iterate over all registered demuxers.
Definition: allformats.c:509
AVInputFormat ff_nistsphere_demuxer
AVInputFormat ff_mpegps_demuxer
Definition: mpeg.c:687
AVOutputFormat ff_framecrc_muxer
Definition: framecrcenc.c:79
AVInputFormat ff_ogg_demuxer
Definition: oggdec.c:951
AVInputFormat ff_image_dpx_pipe_demuxer
AVOutputFormat ff_psp_muxer
AVInputFormat ff_tiertexseq_demuxer
Definition: tiertexseq.c:309
AVOutputFormat ff_pcm_u24be_muxer
AVOutputFormat ff_avm2_muxer
AVInputFormat ff_brstm_demuxer
Definition: brstm.c:461
AVOutputFormat ff_pcm_s24le_muxer
AVInputFormat ff_image_dds_pipe_demuxer
AVInputFormat ff_bmv_demuxer
Definition: bmv.c:128
AVInputFormat ff_sap_demuxer
Definition: sapdec.c:235
static const AVInputFormat *const demuxer_list[]
Definition: demuxer_list.c:1
static AVMutex avpriv_register_devices_mutex
Definition: allformats.c:526
AVInputFormat ff_tak_demuxer
Definition: takdec.c:207
AVInputFormat ff_rsd_demuxer
Definition: rsd.c:212
#define AV_ONCE_INIT
Definition: thread.h:160
AVOutputFormat ff_truehd_muxer
struct AVOutputFormat * next
Definition: avformat.h:544
AVOutputFormat ff_tgp_muxer
AVOutputFormat ff_pcm_s16le_muxer
AVInputFormat ff_xbin_demuxer
AVInputFormat ff_image2pipe_demuxer
AVInputFormat ff_mm_demuxer
Definition: mm.c:190
AVInputFormat ff_sdp_demuxer
AVInputFormat ff_paf_demuxer
Definition: paf.c:260
AVInputFormat ff_ivr_demuxer
Definition: rmdec.c:1389
AVInputFormat ff_mjpeg_demuxer
AVInputFormat ff_avs_demuxer
Definition: avs.c:226
AVInputFormat ff_filmstrip_demuxer
Definition: filmstripdec.c:107
AVOutputFormat ff_pcm_mulaw_muxer
AVOutputFormat ff_asf_muxer
AVOutputFormat ff_wv_muxer
Definition: wvenc.c:79
AVInputFormat ff_idf_demuxer
AVOutputFormat ff_pcm_u32be_muxer
AVInputFormat ff_lrc_demuxer
Definition: lrcdec.c:240
AVInputFormat ff_frm_demuxer
Definition: frmdec.c:104
AVInputFormat ff_pcm_u16le_demuxer
AVInputFormat ff_tedcaptions_demuxer
AVInputFormat ff_pcm_u16be_demuxer
AVInputFormat ff_dv_demuxer
Definition: dv.c:632
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)\", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> in
AVOutputFormat ff_flac_muxer
Definition: flacenc.c:416
AVInputFormat ff_hnm_demuxer
Definition: hnm.c:198
AVInputFormat ff_mxf_demuxer
Definition: mxfdec.c:3539
AVInputFormat ff_rtsp_demuxer
Definition: rtspdec.c:962
AVOutputFormat ff_mjpeg_muxer
AVInputFormat ff_pcm_s16be_demuxer
AVOutputFormat ff_webm_chunk_muxer
AVOutputFormat ff_hls_muxer
Definition: hlsenc.c:2870
AVOutputFormat ff_framemd5_muxer
AVInputFormat ff_image_ppm_pipe_demuxer
AVInputFormat ff_ape_demuxer
Definition: ape.c:460
AVInputFormat ff_image_pam_pipe_demuxer
AVInputFormat ff_cavsvideo_demuxer
AVInputFormat ff_aptx_hd_demuxer
AVInputFormat ff_jv_demuxer
Definition: jvdec.c:254
AVInputFormat ff_shorten_demuxer
Definition: shortendec.c:62
AVOutputFormat ff_mxf_d10_muxer
Definition: mxfenc.c:2866
AVOutputFormat ff_gxf_muxer
Definition: gxfenc.c:1020
AVInputFormat ff_pcm_f32be_demuxer
AVInputFormat ff_au_demuxer
AVInputFormat ff_mp3_demuxer
Definition: mp3dec.c:593
AVInputFormat ff_dcstr_demuxer
Definition: dcstr.c:79
AVInputFormat ff_amr_demuxer
AVInputFormat ff_eac3_demuxer
AVInputFormat ff_image_png_pipe_demuxer
AVInputFormat ff_image_exr_pipe_demuxer
AVOutputFormat ff_a64_muxer
Definition: a64.c:61
AVInputFormat ff_genh_demuxer
Definition: genh.c:187
AVInputFormat ff_wc3_demuxer
Definition: wc3movie.c:297
AVOutputFormat ff_h263_muxer
AVOutputFormat ff_mpeg2video_muxer
AVOutputFormat ff_fifo_muxer
Definition: fifo.c:656
AVOutputFormat ff_hash_muxer
AVOutputFormat ff_daud_muxer
Definition: daudenc.c:45
AVOutputFormat ff_mov_muxer
AVInputFormat ff_pcm_u24le_demuxer
AVInputFormat ff_loas_demuxer
Definition: loasdec.c:86
AVInputFormat ff_dfa_demuxer
Definition: dfa.c:126
AVOutputFormat ff_dts_muxer
AVInputFormat ff_libgme_demuxer
Definition: libgme.c:191
AVOutputFormat ff_pcm_f64le_muxer
AVOutputFormat ff_ismv_muxer
AVOutputFormat ff_aptx_hd_muxer
AVOutputFormat ff_singlejpeg_muxer
AVOutputFormat ff_g726le_muxer
AVInputFormat ff_smacker_demuxer
Definition: smacker.c:393
AVInputFormat ff_redspark_demuxer
Definition: redspark.c:154
AVInputFormat ff_r3d_demuxer
Definition: r3d.c:412
AVOutputFormat ff_vc1_muxer
AVOutputFormat ff_cavsvideo_muxer
AVInputFormat ff_image_pgmyuv_pipe_demuxer
AVInputFormat ff_image2_alias_pix_demuxer
AVOutputFormat ff_mpeg2vob_muxer
AVInputFormat ff_amrnb_demuxer
AVInputFormat ff_mpegvideo_demuxer
AVInputFormat ff_dxa_demuxer
Definition: dxa.c:229
AVOutputFormat ff_pcm_f32le_muxer
Main libavformat public API header.
AVInputFormat ff_vivo_demuxer
Definition: vivo.c:305
AVOutputFormat ff_oga_muxer
AVOutputFormat ff_sup_muxer
Definition: supenc.c:87
AVInputFormat ff_fourxm_demuxer
Definition: 4xm.c:388
AVInputFormat ff_sox_demuxer
Definition: soxdec.c:127
#define FF_DISABLE_DEPRECATION_WARNINGS
Definition: internal.h:84
AVInputFormat ff_hevc_demuxer
AVInputFormat ff_mlp_demuxer
AVInputFormat ff_pcm_mulaw_demuxer
AVInputFormat ff_cdg_demuxer
Definition: cdg.c:84
AVInputFormat ff_mpc8_demuxer
Definition: mpc8.c:319
AVOutputFormat ff_ogg_muxer
AVInputFormat ff_codec2_demuxer
AVInputFormat ff_ingenient_demuxer
Definition: ingenientdec.c:66
AVInputFormat ff_adx_demuxer
Definition: adxdec.c:126
AVInputFormat ff_libmodplug_demuxer
Definition: libmodplug.c:371
AVOutputFormat ff_pcm_alaw_muxer
AVInputFormat ff_pcm_f32le_demuxer
AVOutputFormat ff_ilbc_muxer
Definition: ilbc.c:131
AVOutputFormat ff_ac3_muxer
AVOutputFormat ff_webvtt_muxer
Definition: webvttenc.c:97
AVOutputFormat ff_mp4_muxer
AVInputFormat ff_musx_demuxer
Definition: musx.c:170
AVOutputFormat ff_pcm_s32le_muxer
AVInputFormat ff_v210x_demuxer
AVOutputFormat ff_voc_muxer
Definition: vocenc.c:98
AVInputFormat ff_image_pgm_pipe_demuxer
AVInputFormat ff_pcm_u32le_demuxer
AVInputFormat ff_pcm_alaw_demuxer
AVInputFormat ff_tty_demuxer
Definition: tty.c:152
AVInputFormat ff_stl_demuxer
Definition: stldec.c:131
AVInputFormat ff_pcm_f64be_demuxer
AVInputFormat ff_iss_demuxer
Definition: iss.c:146
AVInputFormat ff_lmlm4_demuxer
Definition: lmlm4.c:124
#define FF_ENABLE_DEPRECATION_WARNINGS
Definition: internal.h:85
AVInputFormat ff_qcp_demuxer
Definition: qcp.c:198
AVOutputFormat ff_image2pipe_muxer
static int ff_thread_once(char *control, void(*routine)(void))
Definition: thread.h:162
AVInputFormat ff_msnwc_tcp_demuxer
Definition: msnwc_tcp.c:139
AVInputFormat ff_sbg_demuxer
Definition: sbgdec.c:1503
AVInputFormat ff_vqf_demuxer
Definition: vqf.c:285
AVOutputFormat ff_fits_muxer
Definition: fitsenc.c:178
AVInputFormat ff_ass_demuxer
Definition: assdec.c:183
AVInputFormat ff_avisynth_demuxer
Definition: avisynth.c:868
AVInputFormat ff_bfstm_demuxer
Definition: brstm.c:473
AVInputFormat ff_g722_demuxer
Definition: g722.c:49
AVOutputFormat ff_srt_muxer
Definition: srtenc.c:105
AVInputFormat ff_gdv_demuxer
Definition: gdv.c:194
AVInputFormat ff_aix_demuxer
Definition: aixdec.c:132
AVInputFormat ff_pcm_s24be_demuxer
AVOutputFormat ff_opus_muxer
AVOutputFormat ff_fifo_test_muxer
Definition: fifo_test.c:141
AVInputFormat ff_h263_demuxer
AVInputFormat ff_w64_demuxer
AVInputFormat ff_ilbc_demuxer
Definition: ilbc.c:122
AVInputFormat ff_vc1t_demuxer
Definition: vc1test.c:111
FILE * out
Definition: movenc.c:54
AVInputFormat ff_subviewer1_demuxer
AVInputFormat ff_mjpeg_2000_demuxer
AVInputFormat ff_oma_demuxer
Definition: omadec.c:602
AVInputFormat ff_wve_demuxer
Definition: wvedec.c:55
unbuffered private I/O API
AVOutputFormat ff_stream_segment_muxer
AVOutputFormat ff_matroska_muxer
AVInputFormat ff_dvbtxt_demuxer
AVInputFormat ff_xa_demuxer
Definition: xa.c:124
AVOutputFormat ff_tg2_muxer
AVInputFormat ff_avr_demuxer
Definition: avr.c:90
AVInputFormat ff_vc1_demuxer
AVInputFormat ff_anm_demuxer
Definition: anm.c:222
AVInputFormat ff_rl2_demuxer
Definition: rl2.c:297
AVInputFormat ff_wsaud_demuxer
Definition: westwood_aud.c:181
AVInputFormat ff_image_webp_pipe_demuxer
AVInputFormat ff_mv_demuxer
Definition: mvdec.c:486
struct AVInputFormat * next
Definition: avformat.h:688
AVInputFormat ff_mxg_demuxer
Definition: mxg.c:252
AVOutputFormat ff_tta_muxer
Definition: ttaenc.c:161
AVOutputFormat ff_wtv_muxer
Definition: wtvenc.c:834
AVInputFormat ff_flac_demuxer
Definition: flacdec.c:330
AVOutputFormat ff_mlp_muxer
AVOutputFormat ff_gif_muxer
Definition: gif.c:243
AVInputFormat ff_mvi_demuxer
Definition: mvi.c:139
AVInputFormat ff_vobsub_demuxer
AVOutputFormat ff_oma_muxer
Definition: omaenc.c:97
AVInputFormat ff_nuv_demuxer
Definition: nuv.c:398
AVOutputFormat ff_mxf_muxer
Definition: mxfenc.c:2850
AVInputFormat ff_gif_demuxer
Definition: gifdec.c:337
AVOutputFormat ff_pcm_s16be_muxer
AVInputFormat ff_mpegts_demuxer
Definition: mpegts.c:2983
AVInputFormat ff_nsv_demuxer
Definition: nsvdec.c:724
AVOutputFormat ff_ivf_muxer
Definition: ivfenc.c:111
AVInputFormat ff_wsvqa_demuxer
Definition: westwood_vqa.c:263
AVInputFormat ff_image_tiff_pipe_demuxer
AVInputFormat ff_idcin_demuxer
Definition: idcin.c:371
AVOutputFormat ff_null_muxer
Definition: nullenc.c:29
AVInputFormat ff_rso_demuxer
Definition: rsodec.c:75
AVInputFormat ff_adp_demuxer
Definition: adp.c:91
AVOutputFormat ff_codec2raw_muxer
AVInputFormat ff_lvf_demuxer
Definition: lvfdec.c:144
AVOutputFormat ff_mxf_opatom_muxer
Definition: mxfenc.c:2881
AVOutputFormat ff_pcm_s24be_muxer
AVOutputFormat ff_dnxhd_muxer