CEmptyVideoPlayer.h 840 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * CEmptyVideoPlayer.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "IVideoPlayer.h"
  12. class CEmptyVideoPlayer final : public IVideoPlayer
  13. {
  14. public:
  15. /// Load video from specified path
  16. std::unique_ptr<IVideoInstance> open(const VideoPath & name, float scaleFactor) override
  17. {
  18. logGlobal->debug("Failed to open video. Reason: video support disabled in build");
  19. return nullptr;
  20. };
  21. /// Extracts audio data from provided video in wav format
  22. std::pair<std::unique_ptr<ui8[]>, si64> getAudio(const VideoPath & videoToOpen) override
  23. {
  24. logGlobal->debug("Failed to open video. Reason: video support disabled in build");
  25. return {nullptr, 0};
  26. };
  27. };