| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | * This file is part of FFmpeg. | ||
| 3 | * | ||
| 4 | * FFmpeg 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 | * FFmpeg 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 FFmpeg; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 17 | */ | ||
| 18 | |||
| 19 | #include <stdint.h> | ||
| 20 | |||
| 21 | #include "avcodec.h" | ||
| 22 | #include "parser_internal.h" | ||
| 23 | |||
| 24 | #if FF_API_PARSER_PRIVATE | ||
| 25 | #include "libavutil/internal.h" | ||
| 26 | #include <assert.h> | ||
| 27 | #include <stddef.h> | ||
| 28 | |||
| 29 | FF_DISABLE_DEPRECATION_WARNINGS | ||
| 30 | #define CHECK_OFFSET(field, public_prefix) static_assert(offsetof(FFCodecParser, field) == offsetof(FFCodecParser, p.public_prefix ## field), "Wrong offsets") | ||
| 31 | CHECK_OFFSET(codec_ids,); | ||
| 32 | CHECK_OFFSET(priv_data_size,); | ||
| 33 | CHECK_OFFSET(init, parser_); | ||
| 34 | CHECK_OFFSET(parse, parser_); | ||
| 35 | CHECK_OFFSET(close, parser_); | ||
| 36 | CHECK_OFFSET(split,); | ||
| 37 | FF_ENABLE_DEPRECATION_WARNINGS | ||
| 38 | #endif | ||
| 39 | |||
| 40 | extern const FFCodecParser ff_aac_parser; | ||
| 41 | extern const FFCodecParser ff_aac_latm_parser; | ||
| 42 | extern const FFCodecParser ff_ac3_parser; | ||
| 43 | extern const FFCodecParser ff_adx_parser; | ||
| 44 | extern const FFCodecParser ff_ahx_parser; | ||
| 45 | extern const FFCodecParser ff_amr_parser; | ||
| 46 | extern const FFCodecParser ff_apv_parser; | ||
| 47 | extern const FFCodecParser ff_av1_parser; | ||
| 48 | extern const FFCodecParser ff_avs2_parser; | ||
| 49 | extern const FFCodecParser ff_avs3_parser; | ||
| 50 | extern const FFCodecParser ff_bmp_parser; | ||
| 51 | extern const FFCodecParser ff_cavsvideo_parser; | ||
| 52 | extern const FFCodecParser ff_cook_parser; | ||
| 53 | extern const FFCodecParser ff_cri_parser; | ||
| 54 | extern const FFCodecParser ff_dca_parser; | ||
| 55 | extern const FFCodecParser ff_dirac_parser; | ||
| 56 | extern const FFCodecParser ff_dnxhd_parser; | ||
| 57 | extern const FFCodecParser ff_dnxuc_parser; | ||
| 58 | extern const FFCodecParser ff_dolby_e_parser; | ||
| 59 | extern const FFCodecParser ff_dpx_parser; | ||
| 60 | extern const FFCodecParser ff_dvaudio_parser; | ||
| 61 | extern const FFCodecParser ff_dvbsub_parser; | ||
| 62 | extern const FFCodecParser ff_dvdsub_parser; | ||
| 63 | extern const FFCodecParser ff_dvd_nav_parser; | ||
| 64 | extern const FFCodecParser ff_evc_parser; | ||
| 65 | extern const FFCodecParser ff_flac_parser; | ||
| 66 | extern const FFCodecParser ff_ftr_parser; | ||
| 67 | extern const FFCodecParser ff_ffv1_parser; | ||
| 68 | extern const FFCodecParser ff_g723_1_parser; | ||
| 69 | extern const FFCodecParser ff_g729_parser; | ||
| 70 | extern const FFCodecParser ff_gif_parser; | ||
| 71 | extern const FFCodecParser ff_gsm_parser; | ||
| 72 | extern const FFCodecParser ff_h261_parser; | ||
| 73 | extern const FFCodecParser ff_h263_parser; | ||
| 74 | extern const FFCodecParser ff_h264_parser; | ||
| 75 | extern const FFCodecParser ff_hevc_parser; | ||
| 76 | extern const FFCodecParser ff_hdr_parser; | ||
| 77 | extern const FFCodecParser ff_ipu_parser; | ||
| 78 | extern const FFCodecParser ff_jpeg2000_parser; | ||
| 79 | extern const FFCodecParser ff_jpegxl_parser; | ||
| 80 | extern const FFCodecParser ff_jpegxs_parser; | ||
| 81 | extern const FFCodecParser ff_misc4_parser; | ||
| 82 | extern const FFCodecParser ff_mjpeg_parser; | ||
| 83 | extern const FFCodecParser ff_mlp_parser; | ||
| 84 | extern const FFCodecParser ff_mpeg4video_parser; | ||
| 85 | extern const FFCodecParser ff_mpegaudio_parser; | ||
| 86 | extern const FFCodecParser ff_mpegvideo_parser; | ||
| 87 | extern const FFCodecParser ff_opus_parser; | ||
| 88 | extern const FFCodecParser ff_prores_parser; | ||
| 89 | extern const FFCodecParser ff_png_parser; | ||
| 90 | extern const FFCodecParser ff_pnm_parser; | ||
| 91 | extern const FFCodecParser ff_prores_raw_parser; | ||
| 92 | extern const FFCodecParser ff_qoi_parser; | ||
| 93 | extern const FFCodecParser ff_rv34_parser; | ||
| 94 | extern const FFCodecParser ff_sbc_parser; | ||
| 95 | extern const FFCodecParser ff_sipr_parser; | ||
| 96 | extern const FFCodecParser ff_tak_parser; | ||
| 97 | extern const FFCodecParser ff_vc1_parser; | ||
| 98 | extern const FFCodecParser ff_vorbis_parser; | ||
| 99 | extern const FFCodecParser ff_vp3_parser; | ||
| 100 | extern const FFCodecParser ff_vp8_parser; | ||
| 101 | extern const FFCodecParser ff_vp9_parser; | ||
| 102 | extern const FFCodecParser ff_vvc_parser; | ||
| 103 | extern const FFCodecParser ff_webp_parser; | ||
| 104 | extern const FFCodecParser ff_xbm_parser; | ||
| 105 | extern const FFCodecParser ff_xma_parser; | ||
| 106 | extern const FFCodecParser ff_xwd_parser; | ||
| 107 | |||
| 108 | #include "libavcodec/parser_list.c" | ||
| 109 | |||
| 110 | 552433 | const AVCodecParser *av_parser_iterate(void **opaque) | |
| 111 | { | ||
| 112 | 552433 | uintptr_t i = (uintptr_t)*opaque; | |
| 113 | 552433 | const FFCodecParser *p = parser_list[i]; | |
| 114 | |||
| 115 |
2/2✓ Branch 0 taken 548987 times.
✓ Branch 1 taken 3446 times.
|
552433 | if (p) { |
| 116 | 548987 | *opaque = (void*)(i + 1); | |
| 117 | 548987 | return &p->p; | |
| 118 | } | ||
| 119 | |||
| 120 | 3446 | return NULL; | |
| 121 | } | ||
| 122 |