Browse Source

Rename VideoSource::omxPlayer

master
Krisjanis Rijnieks 8 years ago
parent
commit
7c9caec7c2
  1. 8
      src/Sources/VideoSource.cpp
  2. 2
      src/Sources/VideoSource.h

8
src/Sources/VideoSource.cpp

@ -11,7 +11,7 @@ VideoSource::VideoSource(){
loaded = false;
type = SourceType::SOURCE_TYPE_VIDEO;
#ifdef TARGET_RASPBERRY_PI
omxPlayer = 0;
_omxPlayer = 0;
#else
_videoPlayer = 0;
_initialVolumeSet = false;
@ -22,8 +22,8 @@ void VideoSource::loadVideo(string & filePath){
path = filePath;
setNameFromPath(filePath);
#ifdef TARGET_RASPBERRY_PI
omxPlayer = OMXPlayerCache::instance()->load(filePath);
texture = &(omxPlayer->getTextureReference());
_omxPlayer = OMXPlayerCache::instance()->load(filePath);
texture = &(_omxPlayer->getTextureReference());
#else
_videoPlayer = make_unique<ofVideoPlayer>();
_videoPlayer->load(filePath);
@ -52,7 +52,7 @@ void VideoSource::clear(){
void VideoSource::togglePause(){
#ifdef TARGET_RASPBERRY_PI
omxPlayer->togglePause();
_omxPlayer->togglePause();
#else
_videoPlayer->setPaused(!_videoPlayer->isPaused());
#endif

2
src/Sources/VideoSource.h

@ -34,7 +34,7 @@ class VideoSource : public BaseSource {
private:
#ifdef TARGET_RASPBERRY_PI
ofxOMXPlayer * omxPlayer; // Naming different for less confusion
ofxOMXPlayer * _omxPlayer;
#else
unique_ptr<ofVideoPlayer> _videoPlayer;
bool _initialVolumeSet;

Loading…
Cancel
Save