Files
vimix/MediaSource.h
brunoherbelin 59db2cf57c Implementation of new type of source: Pattern generator (GUI, icons,
saving). A new class for gstreamer stream (Stream) is defined for
generic pipeline sources; to be integrated (inheritance) into
MediaPlayer.
2020-09-20 00:26:39 +02:00

38 lines
753 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;
protected:
void init() override;
void replaceRenderingShader() override;
Surface *mediasurface_;
std::string path_;
MediaPlayer *mediaplayer_;
};
#endif // MEDIASOURCE_H