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.

103 lines
3.1KB

  1. /*
  2. * Utils for libavcodec
  3. * Copyright (c) 2002 Fabrice Bellard.
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General Public
  16. * License along with this library; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. */
  19. #include "avcodec.h"
  20. /* If you do not call this function, then you can select exactly which
  21. formats you want to support */
  22. /**
  23. * simple call to register all the codecs.
  24. */
  25. void avcodec_register_all(void)
  26. {
  27. static int inited = 0;
  28. if (inited != 0)
  29. return;
  30. inited = 1;
  31. /* encoders */
  32. #ifdef CONFIG_ENCODERS
  33. register_avcodec(&ac3_encoder);
  34. register_avcodec(&mp2_encoder);
  35. #ifdef CONFIG_MP3LAME
  36. register_avcodec(&mp3lame_encoder);
  37. #endif
  38. #ifdef CONFIG_VORBIS
  39. register_avcodec(&oggvorbis_encoder);
  40. #endif
  41. register_avcodec(&mpeg1video_encoder);
  42. register_avcodec(&h263_encoder);
  43. register_avcodec(&h263p_encoder);
  44. register_avcodec(&rv10_encoder);
  45. register_avcodec(&mjpeg_encoder);
  46. register_avcodec(&mpeg4_encoder);
  47. register_avcodec(&msmpeg4v1_encoder);
  48. register_avcodec(&msmpeg4v2_encoder);
  49. register_avcodec(&msmpeg4v3_encoder);
  50. register_avcodec(&wmv1_encoder);
  51. register_avcodec(&wmv2_encoder);
  52. #endif /* CONFIG_ENCODERS */
  53. register_avcodec(&rawvideo_codec);
  54. /* decoders */
  55. #ifdef CONFIG_DECODERS
  56. register_avcodec(&h263_decoder);
  57. register_avcodec(&mpeg4_decoder);
  58. register_avcodec(&msmpeg4v1_decoder);
  59. register_avcodec(&msmpeg4v2_decoder);
  60. register_avcodec(&msmpeg4v3_decoder);
  61. register_avcodec(&wmv1_decoder);
  62. register_avcodec(&wmv2_decoder);
  63. register_avcodec(&mpeg_decoder);
  64. register_avcodec(&h263i_decoder);
  65. register_avcodec(&rv10_decoder);
  66. register_avcodec(&svq1_decoder);
  67. register_avcodec(&mjpeg_decoder);
  68. register_avcodec(&mp2_decoder);
  69. register_avcodec(&mp3_decoder);
  70. #ifdef CONFIG_AC3
  71. register_avcodec(&ac3_decoder);
  72. #endif
  73. #endif /* CONFIG_DECODERS */
  74. /* pcm codecs */
  75. #define PCM_CODEC(id, name) \
  76. register_avcodec(& name ## _encoder); \
  77. register_avcodec(& name ## _decoder); \
  78. PCM_CODEC(CODEC_ID_PCM_S16LE, pcm_s16le);
  79. PCM_CODEC(CODEC_ID_PCM_S16BE, pcm_s16be);
  80. PCM_CODEC(CODEC_ID_PCM_U16LE, pcm_u16le);
  81. PCM_CODEC(CODEC_ID_PCM_U16BE, pcm_u16be);
  82. PCM_CODEC(CODEC_ID_PCM_S8, pcm_s8);
  83. PCM_CODEC(CODEC_ID_PCM_U8, pcm_u8);
  84. PCM_CODEC(CODEC_ID_PCM_ALAW, pcm_alaw);
  85. PCM_CODEC(CODEC_ID_PCM_MULAW, pcm_mulaw);
  86. /* adpcm codecs */
  87. PCM_CODEC(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt);
  88. PCM_CODEC(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav);
  89. PCM_CODEC(CODEC_ID_ADPCM_MS, adpcm_ms);
  90. #undef PCM_CODEC
  91. }