vorbisenc.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /********************************************************************
  2. * *
  3. * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
  4. * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
  5. * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  6. * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
  7. * *
  8. * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
  9. * by the XIPHOPHORUS Company http://www.xiph.org/ *
  10. * *
  11. ********************************************************************
  12. function: vorbis encode-engine setup
  13. last mod: $Id: vorbisenc.h,v 1.10 2002/07/01 11:20:10 xiphmont Exp $
  14. ********************************************************************/
  15. #ifndef _OV_ENC_H_
  16. #define _OV_ENC_H_
  17. #ifdef __cplusplus
  18. extern "C"
  19. {
  20. #endif /* __cplusplus */
  21. #include "codec.h"
  22. extern int vorbis_encode_init(vorbis_info *vi,
  23. long channels,
  24. long rate,
  25. long max_bitrate,
  26. long nominal_bitrate,
  27. long min_bitrate);
  28. extern int vorbis_encode_setup_managed(vorbis_info *vi,
  29. long channels,
  30. long rate,
  31. long max_bitrate,
  32. long nominal_bitrate,
  33. long min_bitrate);
  34. extern int vorbis_encode_setup_vbr(vorbis_info *vi,
  35. long channels,
  36. long rate,
  37. float /* quality level from 0. (lo) to 1. (hi) */
  38. );
  39. extern int vorbis_encode_init_vbr(vorbis_info *vi,
  40. long channels,
  41. long rate,
  42. float base_quality /* quality level from 0. (lo) to 1. (hi) */
  43. );
  44. extern int vorbis_encode_setup_init(vorbis_info *vi);
  45. extern int vorbis_encode_ctl(vorbis_info *vi,int number,void *arg);
  46. #define OV_ECTL_RATEMANAGE_GET 0x10
  47. #define OV_ECTL_RATEMANAGE_SET 0x11
  48. #define OV_ECTL_RATEMANAGE_AVG 0x12
  49. #define OV_ECTL_RATEMANAGE_HARD 0x13
  50. #define OV_ECTL_LOWPASS_GET 0x20
  51. #define OV_ECTL_LOWPASS_SET 0x21
  52. #define OV_ECTL_IBLOCK_GET 0x30
  53. #define OV_ECTL_IBLOCK_SET 0x31
  54. struct ovectl_ratemanage_arg {
  55. int management_active;
  56. long bitrate_hard_min;
  57. long bitrate_hard_max;
  58. double bitrate_hard_window;
  59. long bitrate_av_lo;
  60. long bitrate_av_hi;
  61. double bitrate_av_window;
  62. double bitrate_av_window_center;
  63. };
  64. #ifdef __cplusplus
  65. }
  66. #endif /* __cplusplus */
  67. #endif