opus.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Asterisk -- An open source telephony toolkit.
  3. *
  4. * Copyright (C) 2013, Digium, Inc.
  5. *
  6. * Lorenzo Miniero <lorenzo@meetecho.com>
  7. *
  8. * See http://www.asterisk.org for more information about
  9. * the Asterisk project. Please do not directly contact
  10. * any of the maintainers of this project for assistance;
  11. * the project provides a web site, mailing lists and IRC
  12. * channels for your use.
  13. *
  14. * This program is free software, distributed under the terms of
  15. * the GNU General Public License Version 2. See the LICENSE file
  16. * at the top of the source tree.
  17. */
  18. /*!
  19. * \file
  20. * \brief Codec opus externals and format attributes
  21. *
  22. * RFC - https://tools.ietf.org/rfc/rfc7587.txt
  23. */
  24. #ifndef _AST_FORMAT_OPUS_H_
  25. #define _AST_FORMAT_OPUS_H_
  26. /*! \brief Maximum sampling rate an endpoint is capable of receiving */
  27. #define CODEC_OPUS_ATTR_MAX_PLAYBACK_RATE "maxplaybackrate"
  28. /*! \brief An alias for maxplaybackrate (used in older versions) */
  29. #define CODEC_OPUS_ATTR_MAX_CODED_AUDIO_BANDWIDTH "maxcodedaudiobandwidth"
  30. /*! \brief Maximum sampling rate an endpoint is capable of sending */
  31. #define CODEC_OPUS_ATTR_SPROP_MAX_CAPTURE_RATE "sprop-maxcapturerate"
  32. /*! \brief Maximum duration of packet (in milliseconds) */
  33. #define CODEC_OPUS_ATTR_MAX_PTIME "maxptime"
  34. /*! \brief Duration of packet (in milliseconds) */
  35. #define CODEC_OPUS_ATTR_PTIME "ptime"
  36. /*! \brief Maximum average received bit rate (in bits per second) */
  37. #define CODEC_OPUS_ATTR_MAX_AVERAGE_BITRATE "maxaveragebitrate"
  38. /*! \brief Decode stereo (1) vs mono (0) */
  39. #define CODEC_OPUS_ATTR_STEREO "stereo"
  40. /*! \brief Likeliness of sender producing stereo (1) vs mono (0) */
  41. #define CODEC_OPUS_ATTR_SPROP_STEREO "sprop-stereo"
  42. /*! \brief Decoder prefers a constant (1) vs variable (0) bitrate */
  43. #define CODEC_OPUS_ATTR_CBR "cbr"
  44. /*! \brief Use forward error correction (1) or not (0) */
  45. #define CODEC_OPUS_ATTR_FEC "useinbandfec"
  46. /*! \brief Use discontinuous transmission (1) or not (0) */
  47. #define CODEC_OPUS_ATTR_DTX "usedtx"
  48. /*! \brief Custom data object */
  49. #define CODEC_OPUS_ATTR_DATA "data"
  50. /*! \brief Default attribute values */
  51. #define CODEC_OPUS_DEFAULT_SAMPLE_RATE 48000
  52. #define CODEC_OPUS_DEFAULT_MAX_PLAYBACK_RATE 48000
  53. #define CODEC_OPUS_DEFAULT_MAX_PTIME 120
  54. #define CODEC_OPUS_DEFAULT_PTIME 20
  55. #define CODEC_OPUS_DEFAULT_BITRATE -1000 /* OPUS_AUTO */
  56. #define CODEC_OPUS_DEFAULT_CBR 0
  57. #define CODEC_OPUS_DEFAULT_FEC 0
  58. #define CODEC_OPUS_DEFAULT_DTX 0
  59. #define CODEC_OPUS_DEFAULT_STEREO 0
  60. #endif /* _AST_FORMAT_OPUS_H */