Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added getSeekFinishedSignal() to GstPlayer. #2269

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions include/cinder/linux/GstPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ class GstPlayer {

ci::gl::Texture2dRef getVideoTexture();

ci::signals::Signal<void()>& getSeekFinishedSignal() { return mSignalSeekFinished; }

private:
bool initializeGStreamer();

Expand Down Expand Up @@ -234,6 +236,8 @@ class GstPlayer {
GLint getTextureID( GstBuffer* newBuffer );

std::atomic<bool> mNewFrame;

ci::signals::Signal<void()> mSignalSeekFinished;
};

}} // namespace gst::video
2 changes: 2 additions & 0 deletions include/cinder/linux/Movie.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ class MovieBase {
signals::Signal<void()>& getJumpedSignal() { return mSignalJumped; }
signals::Signal<void()>& getOutputWasFlushedSignal() { return mSignalOutputWasFlushed; }

signals::Signal<void()>& getSeekFinishedSignal();

protected:
MovieBase();
void init();
Expand Down
1 change: 1 addition & 0 deletions src/cinder/linux/GstPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ gboolean checkBusMessagesAsync( GstBus* bus, GstMessage* message, gpointer userD
}
else {
data.isSeeking = false;
data.player->getSeekFinishedSignal().emit();
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/cinder/linux/Movie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ void MovieBase::stop()
mGstPlayer->stop();
}

signals::Signal<void()>& MovieBase::getSeekFinishedSignal()
{
return mGstPlayer->getSeekFinishedSignal();
}

//! \class MovieGl
//!
//!
Expand Down