ASAPCabinetFE
 
Loading...
Searching...
No Matches
ivideo_player.h
1#ifndef IVIDEO_PLAYER_H
2#define IVIDEO_PLAYER_H
3
4#include <SDL2/SDL.h>
5#include <string>
6
20public:
26 virtual ~IVideoPlayer() = default;
27
39 virtual bool setup(SDL_Renderer* renderer, const std::string& path, int width, int height) = 0;
40
46 virtual void play() = 0;
47
53 virtual void stop() = 0;
54
61 virtual void update() = 0;
62
70 virtual SDL_Texture* getTexture() const = 0;
71
79 virtual bool isPlaying() const = 0;
80
85 virtual void setVolume(float volume) = 0;
86
91 virtual void setMute(bool mute) = 0;
92};
93
94#endif // IVIDEO_PLAYER_H
Interface for a video player.
Definition ivideo_player.h:19
virtual void update()=0
Updates the video state.
virtual ~IVideoPlayer()=default
Destructor.
virtual void stop()=0
Stops the video playback.
virtual void play()=0
Starts video playback.
virtual void setVolume(float volume)=0
Sets the volume for the video's audio track.
virtual bool isPlaying() const =0
Checks if the video is currently playing.
virtual void setMute(bool mute)=0
Sets the mute state for the video's audio track.
virtual SDL_Texture * getTexture() const =0
Retrieves the current video texture.
virtual bool setup(SDL_Renderer *renderer, const std::string &path, int width, int height)=0
Sets up the video player.