ADTSAACEncoder.h 802 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include "mp4FastAAClib.h"
  3. #include "config.h"
  4. #include "encoder_common.h"
  5. class ADTSAACEncoder : public EncoderCommon
  6. {
  7. public:
  8. static ADTSAACEncoder *CreateDecoder(const AACConfiguration *cfg, int nch, int srate, int bps);
  9. ADTSAACEncoder(HANDLE_MPEG4ENC_ENCODER encoder, const MPEG4ENC_SETUP *setup, int nch, int srate, int bps, float *sample_buffer, unsigned int next_samples);
  10. ~ADTSAACEncoder();
  11. int Encode(int framepos, void *in, int in_avail, int *in_used, void *out, int out_avail);
  12. void PrepareToFinish();
  13. void Finish(const wchar_t *filename);
  14. private:
  15. HANDLE_MPEG4ENC_ENCODER encoder;
  16. unsigned int channels;
  17. unsigned int sample_rate;
  18. unsigned int bits_per_sample;
  19. unsigned int next_samples;
  20. unsigned int samples_per_frame;
  21. float *sample_buffer;
  22. bool finishing;
  23. };