ofxPiMapper fixed for C++17 & oF 12.0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

50 lines
880 B

#pragma once
#include "ofMain.h"
#include "BaseSource.h"
#ifdef TARGET_RASPBERRY_PI
#include "ofxOMXPlayer.h"
#include "OMXPlayerCache.h"
#endif
namespace ofx {
namespace piMapper {
class VideoSource : public BaseSource {
public:
// TODO: Create enableAudio() and disableAudio() methods
// for live audio enabling and disabling.
static bool enableAudio;
static bool useHDMIForAudio;
VideoSource();
std::string & getPath();
void loadVideo(std::string & path);
void setLoop(bool loop);
void clear();
void togglePause();
void stop();
#ifndef TARGET_RASPBERRY_PI
void update(ofEventArgs & args);
#endif
private:
#ifdef TARGET_RASPBERRY_PI
ofxOMXPlayer * _omxPlayer;
#else
unique_ptr<ofVideoPlayer> _videoPlayer;
bool _initialVolumeSet;
#endif
bool _loop;
};
} // namespace piMapper
} // namespace ofx