ASAPCabinetFE
 
Loading...
Searching...
No Matches
DummyVideoPlayer Class Reference

A dummy implementation of the IVideoPlayer interface for testing and debugging. More...

#include <dummy_player.h>

+ Inheritance diagram for DummyVideoPlayer:
+ Collaboration diagram for DummyVideoPlayer:

Public Member Functions

 DummyVideoPlayer ()
 Constructor for DummyVideoPlayer. Initializes the playing state to false.
 
 ~DummyVideoPlayer () override
 Destructor. Logs the destruction of the dummy player.
 
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.
 
void play () override
 DUMMY: Starts video playback. Sets m_isPlaying to true and logs the action.
 
void stop () override
 DUMMY: Stops the video playback. Sets m_isPlaying to false and logs the action.
 
void update () override
 DUMMY: Updates the video state. Logs an update message if the video is playing.
 
SDL_Texture * getTexture () const override
 DUMMY: Retrieves the current video texture. Always returns nullptr as no actual texture is created.
 
bool isPlaying () const override
 DUMMY: Checks if the video is currently playing. Returns the internal m_isPlaying state.
 
void setVolume (float volume) override
 DUMMY: Sets the volume for the video's audio track. Logs the desired volume.
 
void setMute (bool mute) override
 DUMMY: Sets the mute state for the video's audio track. Logs the mute state.
 
- Public Member Functions inherited from IVideoPlayer
virtual ~IVideoPlayer ()=default
 Destructor.
 

Detailed Description

A dummy implementation of the IVideoPlayer interface for testing and debugging.

This class provides a basic implementation of the IVideoPlayer interface, primarily printing log messages to the console to indicate method calls and simulate state changes. It does not perform actual video rendering or audio playback.

Member Function Documentation

◆ getTexture()

SDL_Texture * DummyVideoPlayer::getTexture ( ) const
inlineoverridevirtual

DUMMY: Retrieves the current video texture. Always returns nullptr as no actual texture is created.

Returns
nullptr always.

Implements IVideoPlayer.

◆ isPlaying()

bool DummyVideoPlayer::isPlaying ( ) const
inlineoverridevirtual

DUMMY: Checks if the video is currently playing. Returns the internal m_isPlaying state.

Returns
The current playing state.

Implements IVideoPlayer.

◆ play()

void DummyVideoPlayer::play ( )
inlineoverridevirtual

DUMMY: Starts video playback. Sets m_isPlaying to true and logs the action.

Implements IVideoPlayer.

◆ setMute()

void DummyVideoPlayer::setMute ( bool  mute)
inlineoverridevirtual

DUMMY: Sets the mute state for the video's audio track. Logs the mute state.

Parameters
muteTrue to mute, false to unmute.

Implements IVideoPlayer.

◆ setup()

bool DummyVideoPlayer::setup ( SDL_Renderer *  renderer,
const std::string &  path,
int  width,
int  height 
)
inlineoverridevirtual

DUMMY: Sets up the video player. Logs the setup parameters and always returns true.

Parameters
rendererIgnored.
pathLogs the path.
widthLogs the width.
heightLogs the height.
Returns
true always.

Implements IVideoPlayer.

◆ setVolume()

void DummyVideoPlayer::setVolume ( float  volume)
inlineoverridevirtual

DUMMY: Sets the volume for the video's audio track. Logs the desired volume.

Parameters
volumeThe desired volume.

Implements IVideoPlayer.

◆ stop()

void DummyVideoPlayer::stop ( )
inlineoverridevirtual

DUMMY: Stops the video playback. Sets m_isPlaying to false and logs the action.

Implements IVideoPlayer.

◆ update()

void DummyVideoPlayer::update ( )
inlineoverridevirtual

DUMMY: Updates the video state. Logs an update message if the video is playing.

Implements IVideoPlayer.


The documentation for this class was generated from the following file: