00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _OV_ENC_H_
00019 #define _OV_ENC_H_
00020
00021 #ifndef __SYMBIAN32__
00022 # define IMPORT_C extern
00023 # define EXPORT_C
00024 #else
00025 # ifndef __cplusplus
00026 # undef IMPORT_C
00027 # define IMPORT_C __declspec(dllexport)
00028 # define EXPORT_C __declspec(dllexport)
00029 # endif
00030 #endif
00031 #ifdef __cplusplus
00032 extern "C"
00033 {
00034 #endif
00035
00036 #include "vorbis/codec.h"
00037
00038 IMPORT_C int vorbis_encode_init(vorbis_info *vi,
00039 long channels,
00040 long rate,
00041
00042 long max_bitrate,
00043 long nominal_bitrate,
00044 long min_bitrate);
00045
00046 IMPORT_C int vorbis_encode_setup_managed(vorbis_info *vi,
00047 long channels,
00048 long rate,
00049
00050 long max_bitrate,
00051 long nominal_bitrate,
00052 long min_bitrate);
00053
00054 IMPORT_C int vorbis_encode_setup_vbr(vorbis_info *vi,
00055 long channels,
00056 long rate,
00057
00058 float quality
00059 );
00060
00061 IMPORT_C int vorbis_encode_init_vbr(vorbis_info *vi,
00062 long channels,
00063 long rate,
00064
00065 float base_quality
00066 );
00067
00068 IMPORT_C int vorbis_encode_setup_init(vorbis_info *vi);
00069
00070 IMPORT_C int vorbis_encode_ctl(vorbis_info *vi,int number,void *arg);
00071
00072
00073 #define OV_ECTL_RATEMANAGE_GET 0x10
00074 #define OV_ECTL_RATEMANAGE_SET 0x11
00075 #define OV_ECTL_RATEMANAGE_AVG 0x12
00076 #define OV_ECTL_RATEMANAGE_HARD 0x13
00077
00078 struct ovectl_ratemanage_arg {
00079 int management_active;
00080
00081 long bitrate_hard_min;
00082 long bitrate_hard_max;
00083 double bitrate_hard_window;
00084
00085 long bitrate_av_lo;
00086 long bitrate_av_hi;
00087 double bitrate_av_window;
00088 double bitrate_av_window_center;
00089 };
00090
00091
00092
00093 #define OV_ECTL_RATEMANAGE2_GET 0x14
00094 #define OV_ECTL_RATEMANAGE2_SET 0x15
00095
00096 struct ovectl_ratemanage2_arg {
00097 int management_active;
00098
00099 long bitrate_limit_min_kbps;
00100 long bitrate_limit_max_kbps;
00101 long bitrate_limit_reservoir_bits;
00102 double bitrate_limit_reservoir_bias;
00103
00104 long bitrate_average_kbps;
00105 double bitrate_average_damping;
00106 };
00107
00108
00109
00110 #define OV_ECTL_LOWPASS_GET 0x20
00111 #define OV_ECTL_LOWPASS_SET 0x21
00112
00113 #define OV_ECTL_IBLOCK_GET 0x30
00114 #define OV_ECTL_IBLOCK_SET 0x31
00115
00116 #ifdef __cplusplus
00117 }
00118 #endif
00119
00120 #endif
00121
00122