1
0

MP4HTTP.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. #include "http/svc_http_demuxer.h"
  3. #include "http/ifc_http_demuxer.h"
  4. #include "nx/nxstring.h"
  5. #include "nswasabi/ServiceName.h"
  6. #include "MP4FileObject.h"
  7. #include "ifc_mp4audiodecoder.h"
  8. // {C67A19EF-CBDB-4BD9-9B4F-EEC5D6B05093}
  9. static const GUID mp4_demuxer_guid =
  10. { 0xc67a19ef, 0xcbdb, 0x4bd9, { 0x9b, 0x4f, 0xee, 0xc5, 0xd6, 0xb0, 0x50, 0x93 } };
  11. class MP4HTTPService : public svc_http_demuxer
  12. {
  13. public:
  14. WASABI_SERVICE_NAME("MP4 HTTP Demuxer");
  15. static GUID GetServiceGUID() { return mp4_demuxer_guid; }
  16. const char *WASABICALL HTTPDemuxerService_EnumerateAcceptedTypes(size_t i);
  17. const char *WASABICALL HTTPDemuxerService_GetUserAgent();
  18. void WASABICALL HTTPDemuxerService_CustomizeHTTP(jnl_http_t http);
  19. NError WASABICALL HTTPDemuxerService_CreateDemuxer(nx_uri_t uri, jnl_http_t http, ifc_http_demuxer **demuxer, int pass);
  20. };
  21. class MP4HTTP : public ifc_http_demuxer
  22. {
  23. public:
  24. MP4HTTP();
  25. ~MP4HTTP();
  26. int Initialize(nx_uri_t uri, jnl_http_t http);
  27. private:
  28. /* ifc_http_demuxer implementation */
  29. int WASABICALL HTTPDemuxer_Run(ifc_http *http_parent, ifc_player *player, ifc_playback_parameters *secondary_parameters);
  30. /* member data */
  31. jnl_http_t http;
  32. nx_uri_t uri;
  33. nx_file_t file;
  34. MP4FileObject *mp4_file_object;
  35. ifc_audioout::Parameters audio_parameters;
  36. ifc_mp4audiodecoder *audio_decoder;
  37. };