1
0

mp4_mp4v_decoder.h 997 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include "../Plugins/Input/in_mp4/mpeg4video.h"
  3. #include "MFTDecoder.h"
  4. // {D3D14DCB-6AA8-4f59-A862-AA81D5AEE550}
  5. static const GUID mp4_mp4v_guid =
  6. { 0xd3d14dcb, 0x6aa8, 0x4f59, { 0xa8, 0x62, 0xaa, 0x81, 0xd5, 0xae, 0xe5, 0x50 } };
  7. class MP4VMP4Decoder : public MP4VideoDecoder
  8. {
  9. public:
  10. static const char *getServiceName() { return "MPEG-4 Part 2 MP4 Decoder"; }
  11. static GUID getServiceGuid() { return mp4_mp4v_guid; }
  12. MP4VMP4Decoder();
  13. ~MP4VMP4Decoder();
  14. private:
  15. /* mpeg4video interface */
  16. int Open(MP4FileHandle mp4_file, MP4TrackId mp4_track);
  17. int GetOutputFormat(int *x, int *y, int *color_format, double *aspect_ratio);
  18. int DecodeSample(const void *inputBuffer, size_t inputBufferBytes, MP4Timestamp timestamp);
  19. void Flush();
  20. void Close();
  21. int CanHandleCodec(const char *codecName);
  22. int GetPicture(void **data, void **decoder_data, MP4Timestamp *timestamp);
  23. void FreePicture(void *data, void *decoder_data);
  24. MFTDecoder decoder;
  25. protected:
  26. RECVS_DISPATCH;
  27. };