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.

98 lines
3.2KB

  1. /*
  2. * Float MPEG Audio decoder
  3. * Copyright (c) 2010 Michael Niedermayer
  4. *
  5. * This file is part of FFmpeg.
  6. *
  7. * FFmpeg is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * FFmpeg is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with FFmpeg; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. #define CONFIG_FLOAT 1
  22. #include "mpegaudiodec.c"
  23. #if CONFIG_MP1FLOAT_DECODER
  24. AVCodec ff_mp1float_decoder = {
  25. .name = "mp1float",
  26. .type = AVMEDIA_TYPE_AUDIO,
  27. .id = CODEC_ID_MP1,
  28. .priv_data_size = sizeof(MPADecodeContext),
  29. .init = decode_init,
  30. .decode = decode_frame,
  31. #if FF_API_PARSE_FRAME
  32. .capabilities = CODEC_CAP_PARSE_ONLY,
  33. #endif
  34. .flush = flush,
  35. .long_name = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
  36. };
  37. #endif
  38. #if CONFIG_MP2FLOAT_DECODER
  39. AVCodec ff_mp2float_decoder = {
  40. .name = "mp2float",
  41. .type = AVMEDIA_TYPE_AUDIO,
  42. .id = CODEC_ID_MP2,
  43. .priv_data_size = sizeof(MPADecodeContext),
  44. .init = decode_init,
  45. .decode = decode_frame,
  46. #if FF_API_PARSE_FRAME
  47. .capabilities = CODEC_CAP_PARSE_ONLY,
  48. #endif
  49. .flush = flush,
  50. .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
  51. };
  52. #endif
  53. #if CONFIG_MP3FLOAT_DECODER
  54. AVCodec ff_mp3float_decoder = {
  55. .name = "mp3float",
  56. .type = AVMEDIA_TYPE_AUDIO,
  57. .id = CODEC_ID_MP3,
  58. .priv_data_size = sizeof(MPADecodeContext),
  59. .init = decode_init,
  60. .decode = decode_frame,
  61. #if FF_API_PARSE_FRAME
  62. .capabilities = CODEC_CAP_PARSE_ONLY,
  63. #endif
  64. .flush = flush,
  65. .long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
  66. };
  67. #endif
  68. #if CONFIG_MP3ADUFLOAT_DECODER
  69. AVCodec ff_mp3adufloat_decoder = {
  70. .name = "mp3adufloat",
  71. .type = AVMEDIA_TYPE_AUDIO,
  72. .id = CODEC_ID_MP3ADU,
  73. .priv_data_size = sizeof(MPADecodeContext),
  74. .init = decode_init,
  75. .decode = decode_frame_adu,
  76. #if FF_API_PARSE_FRAME
  77. .capabilities = CODEC_CAP_PARSE_ONLY,
  78. #endif
  79. .flush = flush,
  80. .long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
  81. };
  82. #endif
  83. #if CONFIG_MP3ON4FLOAT_DECODER
  84. AVCodec ff_mp3on4float_decoder = {
  85. .name = "mp3on4float",
  86. .type = AVMEDIA_TYPE_AUDIO,
  87. .id = CODEC_ID_MP3ON4,
  88. .priv_data_size = sizeof(MP3On4DecodeContext),
  89. .init = decode_init_mp3on4,
  90. .close = decode_close_mp3on4,
  91. .decode = decode_frame_mp3on4,
  92. .flush = flush_mp3on4,
  93. .long_name = NULL_IF_CONFIG_SMALL("MP3onMP4"),
  94. };
  95. #endif