You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

665 lines
20KB

  1. #ifndef AVFORMAT_H
  2. #define AVFORMAT_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #define LIBAVFORMAT_BUILD 4619
  7. #define LIBAVFORMAT_VERSION_INT FFMPEG_VERSION_INT
  8. #define LIBAVFORMAT_VERSION FFMPEG_VERSION
  9. #define LIBAVFORMAT_IDENT "FFmpeg" FFMPEG_VERSION "b" AV_STRINGIFY(LIBAVFORMAT_BUILD)
  10. #include <time.h>
  11. #include <stdio.h> /* FILE */
  12. #include "avcodec.h"
  13. #include "avio.h"
  14. /* packet functions */
  15. #ifndef MAXINT64
  16. #define MAXINT64 int64_t_C(0x7fffffffffffffff)
  17. #endif
  18. #ifndef MININT64
  19. #define MININT64 int64_t_C(0x8000000000000000)
  20. #endif
  21. typedef struct AVPacket {
  22. int64_t pts; /* presentation time stamp in AV_TIME_BASE units (or
  23. pts_den units in muxers or demuxers) */
  24. int64_t dts; /* decompression time stamp in AV_TIME_BASE units (or
  25. pts_den units in muxers or demuxers) */
  26. uint8_t *data;
  27. int size;
  28. int stream_index;
  29. int flags;
  30. int duration; /* presentation duration (0 if not available) */
  31. void (*destruct)(struct AVPacket *);
  32. void *priv;
  33. } AVPacket;
  34. #define PKT_FLAG_KEY 0x0001
  35. void av_destruct_packet_nofree(AVPacket *pkt);
  36. /* initialize optional fields of a packet */
  37. static inline void av_init_packet(AVPacket *pkt)
  38. {
  39. pkt->pts = AV_NOPTS_VALUE;
  40. pkt->dts = AV_NOPTS_VALUE;
  41. pkt->duration = 0;
  42. pkt->flags = 0;
  43. pkt->stream_index = 0;
  44. pkt->destruct= av_destruct_packet_nofree;
  45. }
  46. int av_new_packet(AVPacket *pkt, int size);
  47. int av_dup_packet(AVPacket *pkt);
  48. /**
  49. * Free a packet
  50. *
  51. * @param pkt packet to free
  52. */
  53. static inline void av_free_packet(AVPacket *pkt)
  54. {
  55. if (pkt && pkt->destruct) {
  56. pkt->destruct(pkt);
  57. }
  58. }
  59. /*************************************************/
  60. /* fractional numbers for exact pts handling */
  61. /* the exact value of the fractional number is: 'val + num / den'. num
  62. is assumed to be such as 0 <= num < den */
  63. typedef struct AVFrac {
  64. int64_t val, num, den;
  65. } AVFrac;
  66. void av_frac_init(AVFrac *f, int64_t val, int64_t num, int64_t den);
  67. void av_frac_add(AVFrac *f, int64_t incr);
  68. void av_frac_set(AVFrac *f, int64_t val);
  69. /*************************************************/
  70. /* input/output formats */
  71. struct AVFormatContext;
  72. /* this structure contains the data a format has to probe a file */
  73. typedef struct AVProbeData {
  74. const char *filename;
  75. unsigned char *buf;
  76. int buf_size;
  77. } AVProbeData;
  78. #define AVPROBE_SCORE_MAX 100
  79. typedef struct AVFormatParameters {
  80. int frame_rate;
  81. int frame_rate_base;
  82. int sample_rate;
  83. int channels;
  84. int width;
  85. int height;
  86. enum PixelFormat pix_fmt;
  87. struct AVImageFormat *image_format;
  88. int channel; /* used to select dv channel */
  89. const char *device; /* video4linux, audio or DV device */
  90. const char *standard; /* tv standard, NTSC, PAL, SECAM */
  91. int mpeg2ts_raw:1; /* force raw MPEG2 transport stream output, if possible */
  92. int mpeg2ts_compute_pcr:1; /* compute exact PCR for each transport
  93. stream packet (only meaningful if
  94. mpeg2ts_raw is TRUE */
  95. int initial_pause:1; /* do not begin to play the stream
  96. immediately (RTSP only) */
  97. } AVFormatParameters;
  98. #define AVFMT_NOFILE 0x0001 /* no file should be opened */
  99. #define AVFMT_NEEDNUMBER 0x0002 /* needs '%d' in filename */
  100. #define AVFMT_SHOW_IDS 0x0008 /* show format stream IDs numbers */
  101. #define AVFMT_RAWPICTURE 0x0020 /* format wants AVPicture structure for
  102. raw picture data */
  103. typedef struct AVOutputFormat {
  104. const char *name;
  105. const char *long_name;
  106. const char *mime_type;
  107. const char *extensions; /* comma separated extensions */
  108. /* size of private data so that it can be allocated in the wrapper */
  109. int priv_data_size;
  110. /* output support */
  111. enum CodecID audio_codec; /* default audio codec */
  112. enum CodecID video_codec; /* default video codec */
  113. int (*write_header)(struct AVFormatContext *);
  114. int (*write_packet)(struct AVFormatContext *, AVPacket *pkt);
  115. int (*write_trailer)(struct AVFormatContext *);
  116. /* can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER */
  117. int flags;
  118. /* currently only used to set pixel format if not YUV420P */
  119. int (*set_parameters)(struct AVFormatContext *, AVFormatParameters *);
  120. int (*interleave_packet)(struct AVFormatContext *, AVPacket *out, AVPacket *in, int flush);
  121. /* private fields */
  122. struct AVOutputFormat *next;
  123. } AVOutputFormat;
  124. typedef struct AVInputFormat {
  125. const char *name;
  126. const char *long_name;
  127. /* size of private data so that it can be allocated in the wrapper */
  128. int priv_data_size;
  129. /* tell if a given file has a chance of being parsing by this format */
  130. int (*read_probe)(AVProbeData *);
  131. /* read the format header and initialize the AVFormatContext
  132. structure. Return 0 if OK. 'ap' if non NULL contains
  133. additionnal paramters. Only used in raw format right
  134. now. 'av_new_stream' should be called to create new streams. */
  135. int (*read_header)(struct AVFormatContext *,
  136. AVFormatParameters *ap);
  137. /* read one packet and put it in 'pkt'. pts and flags are also
  138. set. 'av_new_stream' can be called only if the flag
  139. AVFMTCTX_NOHEADER is used. */
  140. int (*read_packet)(struct AVFormatContext *, AVPacket *pkt);
  141. /* close the stream. The AVFormatContext and AVStreams are not
  142. freed by this function */
  143. int (*read_close)(struct AVFormatContext *);
  144. /**
  145. * seek to a given timestamp relative to the frames in
  146. * stream component stream_index
  147. * @param stream_index must not be -1
  148. * @param flags selects which direction should be preferred if no exact
  149. * match is available
  150. */
  151. int (*read_seek)(struct AVFormatContext *,
  152. int stream_index, int64_t timestamp, int flags);
  153. /**
  154. * gets the next timestamp in AV_TIME_BASE units.
  155. */
  156. int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index,
  157. int64_t *pos, int64_t pos_limit);
  158. /* can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER */
  159. int flags;
  160. /* if extensions are defined, then no probe is done. You should
  161. usually not use extension format guessing because it is not
  162. reliable enough */
  163. const char *extensions;
  164. /* general purpose read only value that the format can use */
  165. int value;
  166. /* start/resume playing - only meaningful if using a network based format
  167. (RTSP) */
  168. int (*read_play)(struct AVFormatContext *);
  169. /* pause playing - only meaningful if using a network based format
  170. (RTSP) */
  171. int (*read_pause)(struct AVFormatContext *);
  172. /* private fields */
  173. struct AVInputFormat *next;
  174. } AVInputFormat;
  175. typedef struct AVIndexEntry {
  176. int64_t pos;
  177. int64_t timestamp;
  178. #define AVINDEX_KEYFRAME 0x0001
  179. /* the following 2 flags indicate that the next/prev keyframe is known, and scaning for it isnt needed */
  180. int flags;
  181. int min_distance; /* min distance between this and the previous keyframe, used to avoid unneeded searching */
  182. } AVIndexEntry;
  183. typedef struct AVStream {
  184. int index; /* stream index in AVFormatContext */
  185. int id; /* format specific stream id */
  186. AVCodecContext codec; /* codec context */
  187. int r_frame_rate; /* real frame rate of the stream */
  188. int r_frame_rate_base;/* real frame rate base of the stream */
  189. void *priv_data;
  190. /* internal data used in av_find_stream_info() */
  191. int64_t codec_info_duration;
  192. int codec_info_nb_frames;
  193. /* encoding: PTS generation when outputing stream */
  194. AVFrac pts;
  195. AVRational time_base;
  196. int pts_wrap_bits; /* number of bits in pts (used for wrapping control) */
  197. /* ffmpeg.c private use */
  198. int stream_copy; /* if TRUE, just copy stream */
  199. /* quality, as it has been removed from AVCodecContext and put in AVVideoFrame
  200. * MN:dunno if thats the right place, for it */
  201. float quality;
  202. /* decoding: position of the first frame of the component, in
  203. AV_TIME_BASE fractional seconds. */
  204. int64_t start_time;
  205. /* decoding: duration of the stream, in AV_TIME_BASE fractional
  206. seconds. */
  207. int64_t duration;
  208. /* av_read_frame() support */
  209. int need_parsing;
  210. struct AVCodecParserContext *parser;
  211. int64_t cur_dts;
  212. int last_IP_duration;
  213. int64_t last_IP_pts;
  214. /* av_seek_frame() support */
  215. AVIndexEntry *index_entries; /* only used if the format does not
  216. support seeking natively */
  217. int nb_index_entries;
  218. int index_entries_allocated_size;
  219. } AVStream;
  220. #define AVFMTCTX_NOHEADER 0x0001 /* signal that no header is present
  221. (streams are added dynamically) */
  222. #define MAX_STREAMS 20
  223. /* format I/O context */
  224. typedef struct AVFormatContext {
  225. const AVClass *av_class; /* set by av_alloc_format_context */
  226. /* can only be iformat or oformat, not both at the same time */
  227. struct AVInputFormat *iformat;
  228. struct AVOutputFormat *oformat;
  229. void *priv_data;
  230. ByteIOContext pb;
  231. int nb_streams;
  232. AVStream *streams[MAX_STREAMS];
  233. char filename[1024]; /* input or output filename */
  234. /* stream info */
  235. int64_t timestamp;
  236. char title[512];
  237. char author[512];
  238. char copyright[512];
  239. char comment[512];
  240. char album[512];
  241. int year; /* ID3 year, 0 if none */
  242. int track; /* track number, 0 if none */
  243. char genre[32]; /* ID3 genre */
  244. int ctx_flags; /* format specific flags, see AVFMTCTX_xx */
  245. /* private data for pts handling (do not modify directly) */
  246. /* This buffer is only needed when packets were already buffered but
  247. not decoded, for example to get the codec parameters in mpeg
  248. streams */
  249. struct AVPacketList *packet_buffer;
  250. /* decoding: position of the first frame of the component, in
  251. AV_TIME_BASE fractional seconds. NEVER set this value directly:
  252. it is deduced from the AVStream values. */
  253. int64_t start_time;
  254. /* decoding: duration of the stream, in AV_TIME_BASE fractional
  255. seconds. NEVER set this value directly: it is deduced from the
  256. AVStream values. */
  257. int64_t duration;
  258. /* decoding: total file size. 0 if unknown */
  259. int64_t file_size;
  260. /* decoding: total stream bitrate in bit/s, 0 if not
  261. available. Never set it directly if the file_size and the
  262. duration are known as ffmpeg can compute it automatically. */
  263. int bit_rate;
  264. /* av_read_frame() support */
  265. AVStream *cur_st;
  266. const uint8_t *cur_ptr;
  267. int cur_len;
  268. AVPacket cur_pkt;
  269. /* av_seek_frame() support */
  270. int64_t data_offset; /* offset of the first packet */
  271. int index_built;
  272. int mux_rate;
  273. int packet_size;
  274. } AVFormatContext;
  275. typedef struct AVPacketList {
  276. AVPacket pkt;
  277. struct AVPacketList *next;
  278. } AVPacketList;
  279. extern AVInputFormat *first_iformat;
  280. extern AVOutputFormat *first_oformat;
  281. /* still image support */
  282. struct AVInputImageContext;
  283. typedef struct AVInputImageContext AVInputImageContext;
  284. typedef struct AVImageInfo {
  285. enum PixelFormat pix_fmt; /* requested pixel format */
  286. int width; /* requested width */
  287. int height; /* requested height */
  288. int interleaved; /* image is interleaved (e.g. interleaved GIF) */
  289. AVPicture pict; /* returned allocated image */
  290. } AVImageInfo;
  291. /* AVImageFormat.flags field constants */
  292. #define AVIMAGE_INTERLEAVED 0x0001 /* image format support interleaved output */
  293. typedef struct AVImageFormat {
  294. const char *name;
  295. const char *extensions;
  296. /* tell if a given file has a chance of being parsing by this format */
  297. int (*img_probe)(AVProbeData *);
  298. /* read a whole image. 'alloc_cb' is called when the image size is
  299. known so that the caller can allocate the image. If 'allo_cb'
  300. returns non zero, then the parsing is aborted. Return '0' if
  301. OK. */
  302. int (*img_read)(ByteIOContext *,
  303. int (*alloc_cb)(void *, AVImageInfo *info), void *);
  304. /* write the image */
  305. int supported_pixel_formats; /* mask of supported formats for output */
  306. int (*img_write)(ByteIOContext *, AVImageInfo *);
  307. int flags;
  308. struct AVImageFormat *next;
  309. } AVImageFormat;
  310. void av_register_image_format(AVImageFormat *img_fmt);
  311. AVImageFormat *av_probe_image_format(AVProbeData *pd);
  312. AVImageFormat *guess_image_format(const char *filename);
  313. int av_read_image(ByteIOContext *pb, const char *filename,
  314. AVImageFormat *fmt,
  315. int (*alloc_cb)(void *, AVImageInfo *info), void *opaque);
  316. int av_write_image(ByteIOContext *pb, AVImageFormat *fmt, AVImageInfo *img);
  317. extern AVImageFormat *first_image_format;
  318. extern AVImageFormat pnm_image_format;
  319. extern AVImageFormat pbm_image_format;
  320. extern AVImageFormat pgm_image_format;
  321. extern AVImageFormat ppm_image_format;
  322. extern AVImageFormat pam_image_format;
  323. extern AVImageFormat pgmyuv_image_format;
  324. extern AVImageFormat yuv_image_format;
  325. #ifdef CONFIG_ZLIB
  326. extern AVImageFormat png_image_format;
  327. #endif
  328. extern AVImageFormat jpeg_image_format;
  329. extern AVImageFormat gif_image_format;
  330. extern AVImageFormat sgi_image_format;
  331. /* XXX: use automatic init with either ELF sections or C file parser */
  332. /* modules */
  333. /* mpeg.c */
  334. extern AVInputFormat mpegps_demux;
  335. int mpegps_init(void);
  336. /* mpegts.c */
  337. extern AVInputFormat mpegts_demux;
  338. int mpegts_init(void);
  339. /* rm.c */
  340. int rm_init(void);
  341. /* crc.c */
  342. int crc_init(void);
  343. /* img.c */
  344. int img_init(void);
  345. /* img2.c */
  346. int img2_init(void);
  347. /* asf.c */
  348. int asf_init(void);
  349. /* avienc.c */
  350. int avienc_init(void);
  351. /* avidec.c */
  352. int avidec_init(void);
  353. /* swf.c */
  354. int swf_init(void);
  355. /* mov.c */
  356. int mov_init(void);
  357. /* movenc.c */
  358. int movenc_init(void);
  359. /* flvenc.c */
  360. int flvenc_init(void);
  361. /* flvdec.c */
  362. int flvdec_init(void);
  363. /* jpeg.c */
  364. int jpeg_init(void);
  365. /* gif.c */
  366. int gif_init(void);
  367. /* au.c */
  368. int au_init(void);
  369. /* amr.c */
  370. int amr_init(void);
  371. /* wav.c */
  372. int ff_wav_init(void);
  373. /* raw.c */
  374. int pcm_read_seek(AVFormatContext *s,
  375. int stream_index, int64_t timestamp);
  376. int raw_init(void);
  377. /* mp3.c */
  378. int mp3_init(void);
  379. /* yuv4mpeg.c */
  380. int yuv4mpeg_init(void);
  381. /* ogg.c */
  382. int ogg_init(void);
  383. /* dv.c */
  384. int ff_dv_init(void);
  385. /* ffm.c */
  386. int ffm_init(void);
  387. /* rtsp.c */
  388. extern AVInputFormat redir_demux;
  389. int redir_open(AVFormatContext **ic_ptr, ByteIOContext *f);
  390. /* 4xm.c */
  391. int fourxm_init(void);
  392. /* psxstr.c */
  393. int str_init(void);
  394. /* idroq.c */
  395. int roq_init(void);
  396. /* ipmovie.c */
  397. int ipmovie_init(void);
  398. /* nut.c */
  399. int nut_init(void);
  400. /* wc3movie.c */
  401. int wc3_init(void);
  402. /* westwood.c */
  403. int westwood_init(void);
  404. /* segafilm.c */
  405. int film_init(void);
  406. /* idcin.c */
  407. int idcin_init(void);
  408. /* flic.c */
  409. int flic_init(void);
  410. /* sierravmd.c */
  411. int vmd_init(void);
  412. /* matroska.c */
  413. int matroska_init(void);
  414. /* sol.c */
  415. int sol_init(void);
  416. #include "rtp.h"
  417. #include "rtsp.h"
  418. /* yuv4mpeg.c */
  419. extern AVOutputFormat yuv4mpegpipe_oformat;
  420. /* utils.c */
  421. void av_register_input_format(AVInputFormat *format);
  422. void av_register_output_format(AVOutputFormat *format);
  423. AVOutputFormat *guess_stream_format(const char *short_name,
  424. const char *filename, const char *mime_type);
  425. AVOutputFormat *guess_format(const char *short_name,
  426. const char *filename, const char *mime_type);
  427. void av_hex_dump(FILE *f, uint8_t *buf, int size);
  428. void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload);
  429. void av_register_all(void);
  430. typedef struct FifoBuffer {
  431. uint8_t *buffer;
  432. uint8_t *rptr, *wptr, *end;
  433. } FifoBuffer;
  434. int fifo_init(FifoBuffer *f, int size);
  435. void fifo_free(FifoBuffer *f);
  436. int fifo_size(FifoBuffer *f, uint8_t *rptr);
  437. int fifo_read(FifoBuffer *f, uint8_t *buf, int buf_size, uint8_t **rptr_ptr);
  438. void fifo_write(FifoBuffer *f, uint8_t *buf, int size, uint8_t **wptr_ptr);
  439. int put_fifo(ByteIOContext *pb, FifoBuffer *f, int buf_size, uint8_t **rptr_ptr);
  440. /* media file input */
  441. AVInputFormat *av_find_input_format(const char *short_name);
  442. AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened);
  443. int av_open_input_stream(AVFormatContext **ic_ptr,
  444. ByteIOContext *pb, const char *filename,
  445. AVInputFormat *fmt, AVFormatParameters *ap);
  446. int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
  447. AVInputFormat *fmt,
  448. int buf_size,
  449. AVFormatParameters *ap);
  450. /* no av_open for output, so applications will need this: */
  451. AVFormatContext *av_alloc_format_context(void);
  452. #define AVERROR_UNKNOWN (-1) /* unknown error */
  453. #define AVERROR_IO (-2) /* i/o error */
  454. #define AVERROR_NUMEXPECTED (-3) /* number syntax expected in filename */
  455. #define AVERROR_INVALIDDATA (-4) /* invalid data found */
  456. #define AVERROR_NOMEM (-5) /* not enough memory */
  457. #define AVERROR_NOFMT (-6) /* unknown format */
  458. #define AVERROR_NOTSUPP (-7) /* operation not supported */
  459. int av_find_stream_info(AVFormatContext *ic);
  460. int av_read_packet(AVFormatContext *s, AVPacket *pkt);
  461. int av_read_frame(AVFormatContext *s, AVPacket *pkt);
  462. int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags);
  463. int av_read_play(AVFormatContext *s);
  464. int av_read_pause(AVFormatContext *s);
  465. void av_close_input_file(AVFormatContext *s);
  466. AVStream *av_new_stream(AVFormatContext *s, int id);
  467. void av_set_pts_info(AVStream *s, int pts_wrap_bits,
  468. int pts_num, int pts_den);
  469. #define AVSEEK_FLAG_BACKWARD 1 ///< seek backward
  470. #define AVSEEK_FLAG_BYTE 2 ///< seeking based on position in bytes
  471. int av_find_default_stream_index(AVFormatContext *s);
  472. int av_index_search_timestamp(AVStream *st, int timestamp, int flags);
  473. int av_add_index_entry(AVStream *st,
  474. int64_t pos, int64_t timestamp, int distance, int flags);
  475. int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts, int flags);
  476. /* media file output */
  477. int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap);
  478. int av_write_header(AVFormatContext *s);
  479. int av_write_frame(AVFormatContext *s, AVPacket *pkt);
  480. int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt);
  481. int av_write_trailer(AVFormatContext *s);
  482. void dump_format(AVFormatContext *ic,
  483. int index,
  484. const char *url,
  485. int is_output);
  486. int parse_image_size(int *width_ptr, int *height_ptr, const char *str);
  487. int parse_frame_rate(int *frame_rate, int *frame_rate_base, const char *arg);
  488. int64_t parse_date(const char *datestr, int duration);
  489. int64_t av_gettime(void);
  490. /* ffm specific for ffserver */
  491. #define FFM_PACKET_SIZE 4096
  492. offset_t ffm_read_write_index(int fd);
  493. void ffm_write_write_index(int fd, offset_t pos);
  494. void ffm_set_write_index(AVFormatContext *s, offset_t pos, offset_t file_size);
  495. int find_info_tag(char *arg, int arg_size, const char *tag1, const char *info);
  496. int get_frame_filename(char *buf, int buf_size,
  497. const char *path, int number);
  498. int filename_number_test(const char *filename);
  499. /* grab specific */
  500. int video_grab_init(void);
  501. int audio_init(void);
  502. /* DV1394 */
  503. int dv1394_init(void);
  504. #ifdef HAVE_AV_CONFIG_H
  505. #include "os_support.h"
  506. int strstart(const char *str, const char *val, const char **ptr);
  507. int stristart(const char *str, const char *val, const char **ptr);
  508. void pstrcpy(char *buf, int buf_size, const char *str);
  509. char *pstrcat(char *buf, int buf_size, const char *s);
  510. void __dynarray_add(unsigned long **tab_ptr, int *nb_ptr, unsigned long elem);
  511. #ifdef __GNUC__
  512. #define dynarray_add(tab, nb_ptr, elem)\
  513. do {\
  514. typeof(tab) _tab = (tab);\
  515. typeof(elem) _elem = (elem);\
  516. (void)sizeof(**_tab == _elem); /* check that types are compatible */\
  517. __dynarray_add((unsigned long **)_tab, nb_ptr, (unsigned long)_elem);\
  518. } while(0)
  519. #else
  520. #define dynarray_add(tab, nb_ptr, elem)\
  521. do {\
  522. __dynarray_add((unsigned long **)(tab), nb_ptr, (unsigned long)(elem));\
  523. } while(0)
  524. #endif
  525. time_t mktimegm(struct tm *tm);
  526. struct tm *brktimegm(time_t secs, struct tm *tm);
  527. const char *small_strptime(const char *p, const char *fmt,
  528. struct tm *dt);
  529. struct in_addr;
  530. int resolve_host(struct in_addr *sin_addr, const char *hostname);
  531. void url_split(char *proto, int proto_size,
  532. char *authorization, int authorization_size,
  533. char *hostname, int hostname_size,
  534. int *port_ptr,
  535. char *path, int path_size,
  536. const char *url);
  537. int match_ext(const char *filename, const char *extensions);
  538. #endif /* HAVE_AV_CONFIG_H */
  539. #ifdef __cplusplus
  540. }
  541. #endif
  542. #endif /* AVFORMAT_H */