Browse Source

Add VideoSource::stop()

master
Krisjanis Rijnieks 7 years ago
parent
commit
ca47482cb1
  1. 10
      src/Sources/VideoSource.cpp
  2. 3
      src/Sources/VideoSource.h

10
src/Sources/VideoSource.cpp

@ -58,6 +58,14 @@ void VideoSource::togglePause(){
#endif
}
void VideoSource::stop(){
#ifdef TARGET_RASPBERRY_PI
_omxPlayer->setPaused(true);
#else
_videoPlayer->setPaused(true);
#endif
}
#ifndef TARGET_RASPBERRY_PI
void VideoSource::update(ofEventArgs & args){
if(_videoPlayer != 0){
@ -73,4 +81,4 @@ void VideoSource::togglePause(){
#endif
} // namespace piMapper
} // namespace ofx
} // namespace ofx

3
src/Sources/VideoSource.h

@ -26,6 +26,7 @@ class VideoSource : public BaseSource {
void loadVideo(std::string & path);
void clear();
void togglePause();
void stop();
#ifndef TARGET_RASPBERRY_PI
void update(ofEventArgs & args);
@ -43,4 +44,4 @@ class VideoSource : public BaseSource {
};
} // namespace piMapper
} // namespace ofx
} // namespace ofx

Loading…
Cancel
Save