Concrete implementation of IVideoPlayer using VLC (libVLC). More...
#include <vlc_player.h>
Inheritance diagram for VlcVideoPlayer:
Collaboration diagram for VlcVideoPlayer:Public Member Functions | |
| VlcVideoPlayer () | |
| Constructs a VlcVideoPlayer instance. | |
| ~VlcVideoPlayer () override | |
| Destroys the VlcVideoPlayer instance and cleans up VLC resources. | |
| bool | setup (SDL_Renderer *renderer, const std::string &path, int width, int height) override |
| Sets up the VLC video player with the given renderer, path, and dimensions. | |
| void | play () override |
| Starts video playback. | |
| void | stop () override |
| Stops video playback. | |
| void | update () override |
| Updates the video frame and texture. | |
| SDL_Texture * | getTexture () const override |
| Retrieves the current video frame as an SDL_Texture. | |
| int | getFrameCount () const |
| Returns the number of frames received from VLC (diagnostic). | |
| bool | isPlaying () const override |
| Checks if the video is currently playing. | |
| void | setVolume (float volume) override |
| Sets the volume for the video's audio track. | |
| void | setMute (bool mute) override |
| Sets the mute state for the video's audio track. | |
Public Member Functions inherited from IVideoPlayer | |
| virtual | ~IVideoPlayer ()=default |
| Destructor. | |
Concrete implementation of IVideoPlayer using VLC (libVLC).
This class provides video playback capabilities by integrating with the libVLC library. It handles video decoding, rendering to an SDL_Texture, and basic playback controls, including volume and mute for the video's audio track.
|
overridevirtual |
Retrieves the current video frame as an SDL_Texture.
Implements IVideoPlayer.
|
overridevirtual |
Checks if the video is currently playing.
Implements IVideoPlayer.
|
overridevirtual |
Starts video playback.
Implements IVideoPlayer.
|
overridevirtual |
Sets the mute state for the video's audio track.
| mute | True to mute, false to unmute. |
Implements IVideoPlayer.
|
overridevirtual |
Sets up the VLC video player with the given renderer, path, and dimensions.
| renderer | Pointer to the SDL_Renderer. |
| path | Path to the video file. |
| width | Desired width of the video texture. |
| height | Desired height of the video texture. |
Implements IVideoPlayer.
|
overridevirtual |
Sets the volume for the video's audio track.
| volume | The desired volume, a float between 0.0 (silent) and 1.0 (full volume). |
Implements IVideoPlayer.
|
overridevirtual |
Stops video playback.
Implements IVideoPlayer.
|
overridevirtual |
Updates the video frame and texture.
Implements IVideoPlayer.