1
0

MP4DecoderCallback.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // FLACDecoderPull.h
  3. // flac
  4. //
  5. // Created by Ben Allison on 1/12/12.
  6. // Copyright (c) 2012 Nullsoft, Inc. All rights reserved.
  7. //
  8. #pragma once
  9. #include "audio/ifc_audio_decoder_callback.h"
  10. #include "mp4/ifc_mp4audiodecoder.h"
  11. #include "mp4.h"
  12. #include "audio/parameters.h"
  13. #include "MP4FileObject.h"
  14. #include "nswasabi/MetadataChain.h"
  15. class MP4DecoderCallback : public ifc_audio_decoder_callback
  16. {
  17. public:
  18. MP4DecoderCallback();
  19. ~MP4DecoderCallback();
  20. int Initialize(MP4FileHandle mp4_file, ifc_mp4audiodecoder *decoder, int flags, nsaudio::Parameters *parameters, MetadataChain<MP4FileObject> *mp4_file_object);
  21. private:
  22. int WASABICALL AudioDecoderCallback_GetMetadata(ifc_metadata **metadata);
  23. int WASABICALL AudioDecoderCallback_Decode(ifc_audio_decoder_callback::callback *callback);
  24. int WASABICALL AudioDecoderCallback_DecodeStep(ifc_audio_decoder_callback::callback *callback);
  25. int WASABICALL AudioDecoderCallback_GetFrameSize(size_t *frame_size);
  26. MP4FileHandle mp4_file;
  27. ifc_mp4audiodecoder *audio_decoder;
  28. MetadataChain<MP4FileObject> *mp4_file_object;
  29. int flags;
  30. size_t pregap;
  31. size_t frame_size;
  32. unsigned int channels;
  33. };