svc_oggdecoder.h 901 B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include "../replicant/foundation/dispatch.h"
  3. #include "ogg/ogg.h"
  4. #include "../replicant/ogg/ifc_oggaudiodecoder.h"
  5. #include "../replicant/foundation/error.h"
  6. // {EC953F63-DFD3-41E7-B893-92537AE88280}
  7. static const GUID ogg_decoder_service_type_guid =
  8. { 0xec953f63, 0xdfd3, 0x41e7, { 0xb8, 0x93, 0x92, 0x53, 0x7a, 0xe8, 0x82, 0x80 } };
  9. class svc_oggdecoder : public Wasabi2::Dispatchable
  10. {
  11. protected:
  12. svc_oggdecoder() : Dispatchable(DISPATCHABLE_VERSION) {}
  13. ~svc_oggdecoder() {}
  14. public:
  15. static GUID GetServiceType() { return ogg_decoder_service_type_guid; }
  16. ns_error_t CreateAudioDecoder(ogg_packet *packet, ifc_oggaudiodecoder **audio_decoder) { return OggDecoder_CreateAudioDecoder(packet, audio_decoder); }
  17. enum
  18. {
  19. DISPATCHABLE_VERSION,
  20. };
  21. private:
  22. virtual ns_error_t WASABICALL OggDecoder_CreateAudioDecoder(ogg_packet *packet, ifc_oggaudiodecoder **audio_decoder)=0;
  23. };