FFmpeg
parsers.c
Go to the documentation of this file.
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 "libavutil/thread.h"
22 
23 #include "avcodec.h"
24 #include "version.h"
25 
78 
79 #include "libavcodec/parser_list.c"
80 
81 #if FF_API_NEXT
84 
85 static void av_parser_init_next(void)
86 {
87  AVCodecParser *prev = NULL, *p;
88  int i = 0;
89  while ((p = (AVCodecParser*)parser_list[i++])) {
90  if (prev)
91  prev->next = p;
92  prev = p;
93  }
94 }
95 
97 {
99 
100  if (p)
101  return p->next;
102  else
103  return (AVCodecParser*)parser_list[0];
104 }
105 
107 {
109 }
111 #endif
112 
113 const AVCodecParser *av_parser_iterate(void **opaque)
114 {
115  uintptr_t i = (uintptr_t)*opaque;
116  const AVCodecParser *p = parser_list[i];
117 
118  if (p)
119  *opaque = (void*)(i + 1);
120 
121  return p;
122 }
FF_ENABLE_DEPRECATION_WARNINGS
#define FF_ENABLE_DEPRECATION_WARNINGS
Definition: internal.h:84
ff_av1_parser
AVCodecParser ff_av1_parser
Definition: av1_parser.c:230
ff_webp_parser
AVCodecParser ff_webp_parser
Definition: webp_parser.c:107
av_parser_next
AVCodecParser * av_parser_next(const AVCodecParser *p)
Definition: parsers.c:96
ff_vc1_parser
AVCodecParser ff_vc1_parser
Definition: vc1_parser.c:289
thread.h
ff_g723_1_parser
AVCodecParser ff_g723_1_parser
Definition: g723_1_parser.c:55
ff_g729_parser
AVCodecParser ff_g729_parser
Definition: g729_parser.c:88
av_parser_iterate
const FF_ENABLE_DEPRECATION_WARNINGS AVCodecParser * av_parser_iterate(void **opaque)
Iterate over all registered codec parsers.
Definition: parsers.c:113
ff_dirac_parser
AVCodecParser ff_dirac_parser
Definition: dirac_parser.c:276
ff_vp8_parser
AVCodecParser ff_vp8_parser
Definition: vp8_parser.c:76
version.h
ff_h261_parser
AVCodecParser ff_h261_parser
Definition: h261_parser.c:89
av_parser_init_next
static void av_parser_init_next(void)
Definition: parsers.c:85
ff_mpegvideo_parser
AVCodecParser ff_mpegvideo_parser
Definition: mpegvideo_parser.c:239
ff_aac_parser
AVCodecParser ff_aac_parser
Definition: aac_parser.c:65
ff_opus_parser
AVCodecParser ff_opus_parser
Definition: opus_parser.c:193
ff_gif_parser
AVCodecParser ff_gif_parser
Definition: gif_parser.c:183
ff_dnxhd_parser
AVCodecParser ff_dnxhd_parser
Definition: dnxhd_parser.c:141
ff_dpx_parser
AVCodecParser ff_dpx_parser
Definition: dpx_parser.c:111
ff_png_parser
AVCodecParser ff_png_parser
Definition: png_parser.c:113
ff_thread_once
static int ff_thread_once(char *control, void(*routine)(void))
Definition: thread.h:175
ff_mlp_parser
AVCodecParser ff_mlp_parser
Definition: mlp_parser.c:211
ff_sbc_parser
AVCodecParser ff_sbc_parser
Definition: sbc_parser.c:115
ff_cri_parser
AVCodecParser ff_cri_parser
Definition: cri_parser.c:100
av_parser_next_init
static FF_DISABLE_DEPRECATION_WARNINGS AVOnce av_parser_next_init
Definition: parsers.c:83
ff_xma_parser
AVCodecParser ff_xma_parser
Definition: xma_parser.c:58
ff_vp9_parser
AVCodecParser ff_vp9_parser
Definition: vp9_parser.c:67
AV_ONCE_INIT
#define AV_ONCE_INIT
Definition: thread.h:173
NULL
#define NULL
Definition: coverity.c:32
ff_avs2_parser
AVCodecParser ff_avs2_parser
Definition: avs2_parser.c:89
AVOnce
#define AVOnce
Definition: thread.h:172
ff_vorbis_parser
AVCodecParser ff_vorbis_parser
ff_gsm_parser
AVCodecParser ff_gsm_parser
Definition: gsm_parser.c:86
ff_h263_parser
AVCodecParser ff_h263_parser
Definition: h263_parser.c:90
ff_sipr_parser
AVCodecParser ff_sipr_parser
Definition: sipr_parser.c:69
ff_flac_parser
AVCodecParser ff_flac_parser
Definition: flac_parser.c:746
ff_tak_parser
AVCodecParser ff_tak_parser
Definition: tak_parser.c:125
av_register_codec_parser
void av_register_codec_parser(AVCodecParser *parser)
Definition: parsers.c:106
ff_mpeg4video_parser
AVCodecParser ff_mpeg4video_parser
Definition: mpeg4video_parser.c:156
ff_vp3_parser
AVCodecParser ff_vp3_parser
Definition: vp3_parser.c:38
ff_pnm_parser
AVCodecParser ff_pnm_parser
Definition: pnm_parser.c:134
ff_mjpeg_parser
AVCodecParser ff_mjpeg_parser
Definition: mjpeg_parser.c:131
ff_dvaudio_parser
AVCodecParser ff_dvaudio_parser
Definition: dvaudio_parser.c:43
i
int i
Definition: input.c:407
ff_aac_latm_parser
AVCodecParser ff_aac_latm_parser
Definition: latm_parser.c:107
ff_avs3_parser
AVCodecParser ff_avs3_parser
Definition: avs3_parser.c:173
ff_dvbsub_parser
AVCodecParser ff_dvbsub_parser
Definition: dvbsub_parser.c:168
ff_dvd_nav_parser
AVCodecParser ff_dvd_nav_parser
Definition: dvd_nav_parser.c:110
avcodec.h
ff_cook_parser
AVCodecParser ff_cook_parser
Definition: cook_parser.c:56
ff_ipu_parser
AVCodecParser ff_ipu_parser
Definition: ipu_parser.c:72
ff_ac3_parser
AVCodecParser ff_ac3_parser
ff_dvdsub_parser
AVCodecParser ff_dvdsub_parser
Definition: dvdsub_parser.c:87
ff_cavsvideo_parser
AVCodecParser ff_cavsvideo_parser
Definition: cavs_parser.c:100
ff_mpegaudio_parser
AVCodecParser ff_mpegaudio_parser
Definition: mpegaudio_parser.c:138
ff_xbm_parser
AVCodecParser ff_xbm_parser
Definition: xbm_parser.c:100
ff_rv40_parser
AVCodecParser ff_rv40_parser
ff_dca_parser
AVCodecParser ff_dca_parser
Definition: dca_parser.c:346
ff_dolby_e_parser
AVCodecParser ff_dolby_e_parser
Definition: dolby_e_parser.c:65
FF_DISABLE_DEPRECATION_WARNINGS
#define FF_DISABLE_DEPRECATION_WARNINGS
Definition: internal.h:83
ff_hevc_parser
AVCodecParser ff_hevc_parser
Definition: hevc_parser.c:383
ff_adx_parser
AVCodecParser ff_adx_parser
Definition: adx_parser.c:91
ff_h264_parser
AVCodecParser ff_h264_parser
Definition: h264_parser.c:705
AVCodecParser
Definition: avcodec.h:3544
ff_rv30_parser
AVCodecParser ff_rv30_parser
ff_jpeg2000_parser
AVCodecParser ff_jpeg2000_parser
Definition: jpeg2000_parser.c:185
AVCodecParser::next
attribute_deprecated struct AVCodecParser * next
Definition: avcodec.h:3558
ff_bmp_parser
AVCodecParser ff_bmp_parser
Definition: bmp_parser.c:108