1#ifndef DUMMY_VIDEO_PLAYER_H
2#define DUMMY_VIDEO_PLAYER_H
4#include "render/ivideo_player.h"
22 std::cout <<
"[DummyVideoPlayer] Constructor called." << std::endl;
30 std::cout <<
"[DummyVideoPlayer] Destructor called." << std::endl;
42 bool setup(SDL_Renderer* renderer,
const std::string& path,
int width,
int height)
override {
43 std::cout <<
"Renderer: " << renderer <<
"[DummyVideoPlayer] setup() called with path: " << path
44 <<
", width: " << width <<
", height: " << height << std::endl;
56 std::cout <<
"[DummyVideoPlayer] play() called. Video is now playing." << std::endl;
65 std::cout <<
"[DummyVideoPlayer] stop() called. Video is now stopped." << std::endl;
75 std::cout <<
"[DummyVideoPlayer] update() called. (Video playing)" << std::endl;
77 std::cout <<
"[DummyVideoPlayer] update() called. (Video stopped)" << std::endl;
87 std::cout <<
"[DummyVideoPlayer] getTexture() called. Returning nullptr." << std::endl;
108 std::cout <<
"[DummyVideoPlayer] setVolume() called. Volume set to: " << volume << std::endl;
118 std::cout <<
"[DummyVideoPlayer] setMute() called. Mute state set to: " << (mute ?
"true" :
"false") << std::endl;
A dummy implementation of the IVideoPlayer interface for testing and debugging.
Definition dummy_player.h:15
void setVolume(float volume) override
DUMMY: Sets the volume for the video's audio track. Logs the desired volume.
Definition dummy_player.h:106
DummyVideoPlayer()
Constructor for DummyVideoPlayer. Initializes the playing state to false.
Definition dummy_player.h:21
void stop() override
DUMMY: Stops the video playback. Sets m_isPlaying to false and logs the action.
Definition dummy_player.h:63
SDL_Texture * getTexture() const override
DUMMY: Retrieves the current video texture. Always returns nullptr as no actual texture is created.
Definition dummy_player.h:86
~DummyVideoPlayer() override
Destructor. Logs the destruction of the dummy player.
Definition dummy_player.h:29
void setMute(bool mute) override
DUMMY: Sets the mute state for the video's audio track. Logs the mute state.
Definition dummy_player.h:116
void update() override
DUMMY: Updates the video state. Logs an update message if the video is playing.
Definition dummy_player.h:72
bool setup(SDL_Renderer *renderer, const std::string &path, int width, int height) override
DUMMY: Sets up the video player. Logs the setup parameters and always returns true.
Definition dummy_player.h:42
bool isPlaying() const override
DUMMY: Checks if the video is currently playing. Returns the internal m_isPlaying state.
Definition dummy_player.h:96
void play() override
DUMMY: Starts video playback. Sets m_isPlaying to true and logs the action.
Definition dummy_player.h:54
Interface for a video player.
Definition ivideo_player.h:19