/src/ffmpeg/libavcodec/parser_internal.h
Line | Count | 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 | | #ifndef AVCODEC_PARSER_INTERNAL_H |
20 | | #define AVCODEC_PARSER_INTERNAL_H |
21 | | |
22 | | #include <stdint.h> |
23 | | |
24 | | #include "libavutil/macros.h" |
25 | | #include "avcodec.h" |
26 | | |
27 | | typedef struct FFCodecParser { |
28 | | AVCodecParser p; |
29 | | unsigned priv_data_size; |
30 | | int (*init)(AVCodecParserContext *s); |
31 | | int (*parse)(AVCodecParserContext *s, |
32 | | AVCodecContext *avctx, |
33 | | const uint8_t **poutbuf, int *poutbuf_size, |
34 | | const uint8_t *buf, int buf_size); |
35 | | void (*close)(AVCodecParserContext *s); |
36 | | } FFCodecParser; |
37 | | |
38 | | static inline const FFCodecParser *ffcodecparser(const AVCodecParser *parser) |
39 | 138M | { |
40 | 138M | return (const FFCodecParser*)parser; |
41 | 138M | } Unexecuted instantiation: ac3_parser.c:ffcodecparser Line | Count | Source | 39 | 138M | { | 40 | 138M | return (const FFCodecParser*)parser; | 41 | 138M | } |
Unexecuted instantiation: parsers.c:ffcodecparser Unexecuted instantiation: png_parser.c:ffcodecparser Unexecuted instantiation: pnm_parser.c:ffcodecparser Unexecuted instantiation: prores_parser.c:ffcodecparser Unexecuted instantiation: prores_raw_parser.c:ffcodecparser Unexecuted instantiation: qoi_parser.c:ffcodecparser Unexecuted instantiation: rv34_parser.c:ffcodecparser Unexecuted instantiation: sbc_parser.c:ffcodecparser Unexecuted instantiation: sipr_parser.c:ffcodecparser Unexecuted instantiation: tak_parser.c:ffcodecparser Unexecuted instantiation: vc1_parser.c:ffcodecparser Unexecuted instantiation: vorbis_parser.c:ffcodecparser Unexecuted instantiation: vp3_parser.c:ffcodecparser Unexecuted instantiation: vp8_parser.c:ffcodecparser Unexecuted instantiation: vp9_parser.c:ffcodecparser Unexecuted instantiation: vvc_parser.c:ffcodecparser Unexecuted instantiation: webp_parser.c:ffcodecparser Unexecuted instantiation: xbm_parser.c:ffcodecparser Unexecuted instantiation: xma_parser.c:ffcodecparser Unexecuted instantiation: xwd_parser.c:ffcodecparser Unexecuted instantiation: aac_parser.c:ffcodecparser Unexecuted instantiation: adx_parser.c:ffcodecparser Unexecuted instantiation: ahx_parser.c:ffcodecparser Unexecuted instantiation: amr_parser.c:ffcodecparser Unexecuted instantiation: apv_parser.c:ffcodecparser Unexecuted instantiation: av1_parser.c:ffcodecparser Unexecuted instantiation: avs2_parser.c:ffcodecparser Unexecuted instantiation: avs3_parser.c:ffcodecparser Unexecuted instantiation: bmp_parser.c:ffcodecparser Unexecuted instantiation: cavs_parser.c:ffcodecparser Unexecuted instantiation: cook_parser.c:ffcodecparser Unexecuted instantiation: cri_parser.c:ffcodecparser Unexecuted instantiation: dca_parser.c:ffcodecparser Unexecuted instantiation: dirac_parser.c:ffcodecparser Unexecuted instantiation: dnxhd_parser.c:ffcodecparser Unexecuted instantiation: dnxuc_parser.c:ffcodecparser Unexecuted instantiation: dolby_e_parser.c:ffcodecparser Unexecuted instantiation: dpx_parser.c:ffcodecparser Unexecuted instantiation: dvaudio_parser.c:ffcodecparser Unexecuted instantiation: dvbsub_parser.c:ffcodecparser Unexecuted instantiation: dvd_nav_parser.c:ffcodecparser Unexecuted instantiation: dvdsub_parser.c:ffcodecparser Unexecuted instantiation: evc_parser.c:ffcodecparser Unexecuted instantiation: ffv1_parser.c:ffcodecparser Unexecuted instantiation: flac_parser.c:ffcodecparser Unexecuted instantiation: ftr_parser.c:ffcodecparser Unexecuted instantiation: g723_1_parser.c:ffcodecparser Unexecuted instantiation: g729_parser.c:ffcodecparser Unexecuted instantiation: gif_parser.c:ffcodecparser Unexecuted instantiation: gsm_parser.c:ffcodecparser Unexecuted instantiation: h261_parser.c:ffcodecparser Unexecuted instantiation: h263_parser.c:ffcodecparser Unexecuted instantiation: h264_parser.c:ffcodecparser Unexecuted instantiation: hdr_parser.c:ffcodecparser Unexecuted instantiation: ipu_parser.c:ffcodecparser Unexecuted instantiation: jpeg2000_parser.c:ffcodecparser Unexecuted instantiation: jpegxl_parser.c:ffcodecparser Unexecuted instantiation: jpegxs_parser.c:ffcodecparser Unexecuted instantiation: latm_parser.c:ffcodecparser Unexecuted instantiation: lcevc_parser.c:ffcodecparser Unexecuted instantiation: misc4_parser.c:ffcodecparser Unexecuted instantiation: mjpeg_parser.c:ffcodecparser Unexecuted instantiation: mlp_parser.c:ffcodecparser Unexecuted instantiation: mpeg4video_parser.c:ffcodecparser Unexecuted instantiation: mpegaudio_parser.c:ffcodecparser Unexecuted instantiation: mpegvideo_parser.c:ffcodecparser |
42 | | |
43 | | #define EIGTH_ARG(a,b,c,d,e,f,g,h,...) h |
44 | | #define NO_FAIL |
45 | | // Expands to nothing if <= 7 args; induces compilation failure if not. |
46 | | #define CHECK_FOR_TOO_MANY_IDS(...) AV_JOIN(EIGTH_ARG(__VA_ARGS__, NO, NO, NO, NO, NO, NO, NO, NO), _FAIL) |
47 | | |
48 | | // For compatibility with MSVC's old, spec-incompliant preprocessor. |
49 | | #define FF_MSVC_EXPAND(...) __VA_ARGS__ |
50 | | #define FIRST_SEVEN2(a,b,c,d,e,f,g,...) a,b,c,d,e,f,g |
51 | | #define FIRST_SEVEN(...) FF_MSVC_EXPAND(FIRST_SEVEN2(__VA_ARGS__)) |
52 | | #define TIMES_SEVEN(a) a,a,a,a,a,a,a |
53 | | |
54 | | #define PARSER_CODEC_LIST(...) CHECK_FOR_TOO_MANY_IDS(__VA_ARGS__) \ |
55 | | .p.codec_ids = { FIRST_SEVEN(__VA_ARGS__, TIMES_SEVEN(AV_CODEC_ID_NONE)) } |
56 | | |
57 | | #endif /* AVCODEC_PARSER_INTERNAL_H */ |