diff --git a/src/Sources/VideoSource.cpp b/src/Sources/VideoSource.cpp index 9c70e1e..75eae49 100644 --- a/src/Sources/VideoSource.cpp +++ b/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 \ No newline at end of file +} // namespace ofx diff --git a/src/Sources/VideoSource.h b/src/Sources/VideoSource.h index 6fe8638..ec20b98 100644 --- a/src/Sources/VideoSource.h +++ b/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 \ No newline at end of file +} // namespace ofx