UnityVideoDecoderFactory.h 824 B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. #include <api/video_codecs/sdp_video_format.h>
  3. #include <api/video_codecs/video_decoder_factory.h>
  4. namespace unity
  5. {
  6. namespace webrtc
  7. {
  8. using namespace ::webrtc;
  9. class IGraphicsDevice;
  10. class ProfilerMarkerFactory;
  11. class UnityVideoDecoderFactory : public VideoDecoderFactory
  12. {
  13. public:
  14. virtual std::vector<webrtc::SdpVideoFormat> GetSupportedFormats() const override;
  15. virtual std::unique_ptr<webrtc::VideoDecoder> CreateVideoDecoder(const webrtc::SdpVideoFormat& format) override;
  16. UnityVideoDecoderFactory(IGraphicsDevice* gfxDevice, ProfilerMarkerFactory* profiler);
  17. ~UnityVideoDecoderFactory() override;
  18. private:
  19. ProfilerMarkerFactory* profiler_;
  20. std::map<std::string, std::unique_ptr<VideoDecoderFactory>> factories_;
  21. };
  22. }
  23. }