svc_output.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #pragma once
  2. #include "foundation/dispatch.h"
  3. #include "audio/ifc_audioout.h"
  4. #include "player/ifc_playback_parameters.h"
  5. class ifc_player;
  6. // {FB5E9AE3-E033-407C-942B-6C1BFAF52A5C}
  7. static const GUID output_service_guid =
  8. { 0xfb5e9ae3, 0xe033, 0x407c, { 0x94, 0x2b, 0x6c, 0x1b, 0xfa, 0xf5, 0x2a, 0x5c } };
  9. class NOVTABLE svc_output : public Wasabi2::Dispatchable
  10. {
  11. protected:
  12. svc_output() : Dispatchable(DISPATCHABLE_VERSION) {}
  13. ~svc_output() {}
  14. public:
  15. static GUID GetServiceType() { return output_service_guid; }
  16. /* ----- Audio Output ----- */
  17. // Opens winamp2-style Audio Output - good for audio-only streams (buffered, push, output-plugin-defined buffersize)
  18. int AudioOpen(const ifc_audioout::Parameters *format, ifc_player *player, ifc_playback_parameters *secondary_parameters, ifc_audioout **out_output) { return OutputService_AudioOpen(format, player, secondary_parameters, out_output); }
  19. /* ----- Video Output ----- */
  20. int VideoOpen();
  21. /* ----- Text Output ----- */
  22. // Opens a subtitle stream
  23. int TextOpenSubtitle();
  24. // Opens a video info text stream
  25. int TextOpenInfo();
  26. // Opens a lyrics text stream
  27. int TextOpenLyrics();
  28. enum
  29. {
  30. DISPATCHABLE_VERSION,
  31. };
  32. protected:
  33. virtual int WASABICALL OutputService_AudioOpen(const ifc_audioout::Parameters *format, ifc_player *player, ifc_playback_parameters *secondary_parameters, ifc_audioout **out_output) = 0;
  34. };