4#include "render/ivideo_player.h"
32 void seek(
double time_seconds,
int stream_index);
59 bool setup(SDL_Renderer* renderer,
const std::string& path,
int width,
int height)
override;
108 void setMute(
bool mute)
override;
129 SDL_Renderer* renderer_;
134 AVFormatContext* formatContext_;
Decodes and plays audio streams using FFmpeg and SDL.
Definition audio_decoder.h:34
Implements video and audio playback using FFmpeg.
Definition ffmpeg_player.h:30
void seekToBeginning(int streamIndex)
Seeks to the beginning of the specified stream.
Definition ffmpeg_player.cpp:127
SDL_Texture * getTexture() const override
Retrieves the current video texture.
Definition ffmpeg_player.cpp:109
void setVolume(float volume) override
Sets the audio volume.
Definition ffmpeg_player.cpp:117
bool setup(SDL_Renderer *renderer, const std::string &path, int width, int height) override
Sets up the player with renderer and media file.
Definition ffmpeg_player.cpp:24
void update() override
Updates the playback state.
Definition ffmpeg_player.cpp:103
void play() override
Starts playback of the media file.
Definition ffmpeg_player.cpp:76
bool isPlaying() const override
Checks if the player is currently playing.
Definition ffmpeg_player.cpp:113
AVFormatContext * getFormatContext() const
Gets the format context.
Definition ffmpeg_player.h:126
void stop() override
Stops playback of the media file.
Definition ffmpeg_player.cpp:84
~FFmpegPlayer() override
Destroys the FFmpegPlayer instance and cleans up resources.
Definition ffmpeg_player.cpp:18
void setMute(bool mute) override
Toggles audio mute state.
Definition ffmpeg_player.cpp:122
FFmpegPlayer()
Constructs an FFmpegPlayer instance.
Definition ffmpeg_player.cpp:14
Interface for a video player.
Definition ivideo_player.h:19
Decodes and renders video frames using FFmpeg and SDL.
Definition video_decoder.h:38