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

2
src/Sources/VideoSource.h

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

Loading…
Cancel
Save