12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- #pragma once
- #include "mp4FastAAClib.h"
- #include <windows.h> // or MAX_PATH
- #define ENCODER_TYPE_MPEG4 (mmioFOURCC('A','A','C','f'))
- #define ENCODER_TYPE_ADTS (mmioFOURCC('A','D','T','S'))
- enum
- {
- AAC_MODE_VBR=0,
- AAC_MODE_CBR=1,
-
- AAC_PROFILE_AUTOMATIC=0,
- AAC_PROFILE_LC=1,
- AAC_PROFILE_HE=2,
- AAC_PROFILE_HE_V2=3,
-
- AAC_SURROUND_BCC = 0,
- AAC_SURROUND_DISCRETE = 1,
-
- AAC_DEFAULT_MODE = AAC_MODE_VBR,
- AAC_DEFAULT_PROFILE = AAC_PROFILE_AUTOMATIC,
- AAC_DEFAULT_BITRATE = 128,
- AAC_DEFAULT_PRESET = 4,
- AAC_DEFAULT_SURROUND = AAC_SURROUND_BCC,
- };
- struct AACConfiguration
- {
- unsigned int mode;
- unsigned int profile;
- unsigned int bitrate;
- unsigned int preset;
- unsigned int surround;
- };
- struct AACConfigurationFile
- {
- AACConfiguration config;
- unsigned int channels;
- unsigned int sample_rate;
- unsigned int type;
- unsigned int shoutcast;
- bool changing;
- char config_file[MAX_PATH];
- };
- AACConfigurationFile *AACConfig_Create(unsigned int type, const char *filename);
- void AACConfig_Load(AACConfigurationFile *cfg);
- void AACConfig_Save(const AACConfigurationFile *cfg);
- void AACConfig_GetBitrateRange(const AACConfiguration *cfg, int *low, int *high);
- AUD_OBJ_TYP AACConfig_GetAOT(const AACConfiguration *cfg);
- int AACConfig_GetBitrate(const AACConfiguration *cfg, unsigned int channels);
- MPEG4ENC_BITRATE_MODE AACConfig_GetBitrateMode(const AACConfiguration *cfg);
- MPEG4ENC_CH_MODE AACConfig_GetChannelMode(const AACConfiguration *cfg, unsigned int channels);
- void AACConfig_GetToolString(const MPEG4ENC_SETUP *setup, char tool[], size_t cch);
|