Files
vimix/MediaSource.h
brunoherbelin 196ce3df1b Cleanup of surface management in Sources (centralize texturesurface_ in
Source class, avoid mistakes in subclasses). Integration of sources in
AppearanceView (not functionnal yet).
2020-11-15 13:01:06 +01:00

38 lines
720 B
C++

#ifndef MEDIASOURCE_H
#define MEDIASOURCE_H
#include "Source.h"
class MediaPlayer;
class MediaSource : public Source
{
public:
MediaSource();
~MediaSource();
// implementation of source API
void update (float dt) override;
void setActive (bool on) 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