Files
vimix/MediaSource.h
Bruno 86aec7d2ba New SourcePlayer
Work in progress; Sources now have play/pause and associated play functions. Media player can play all playable sources, and adapts to control a media player when possible. Selection of play groups (to finalize)
2021-06-19 00:48:11 +02:00

43 lines
909 B
C++

#ifndef MEDIASOURCE_H
#define MEDIASOURCE_H
#include "Source.h"
class MediaPlayer;
class MediaSource : public Source
{
public:
MediaSource(uint64_t id = 0);
~MediaSource();
// implementation of source API
void update (float dt) override;
void setActive (bool on) override;
bool playing () const override;
void play (bool) override;
bool playable () const override;
void replay () override;
guint64 playtime () const override;
void render() override;
bool failed() const override;
uint texture() const override;
void accept (Visitor& v) override;
// Media specific interface
void setPath(const std::string &p);
std::string path() const;
MediaPlayer *mediaplayer() const;
glm::ivec2 icon() const override;
protected:
void init() override;
std::string path_;
MediaPlayer *mediaplayer_;
};
#endif // MEDIASOURCE_H