Skip to content
Snippets Groups Projects
Commit 95fd6227 authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

Merge branch 'master' of gitlab.utu.fi:nicolas.pope/ftl

parents c4b269ec a60fa0b3
No related branches found
No related tags found
No related merge requests found
Pipeline #33856 passed
......@@ -43,7 +43,7 @@ ExternalProject_Add(
BINARY_DIR ${SDK_BINARY_DIR}
INSTALL_COMMAND ""
BUILD_ALWAYS true
CMAKE_ARGS -DOpenCV_DIR=${OpenCV_DIR}
CMAKE_ARGS -DOpenCV_DIR=${OpenCV_DIR} -DWITH_PYTHON=True
)
if (BUILD_TESTS)
......
......@@ -16,7 +16,7 @@ RoomImpl::~RoomImpl()
if (filter_) filter_->remove();
}
bool RoomImpl::waitNextFrame(int64_t timeout)
bool RoomImpl::waitNextFrame(int64_t timeout, bool except)
{
if (!filter_)
{
......@@ -40,10 +40,15 @@ bool RoomImpl::waitNextFrame(int64_t timeout)
return last_read_ < last_seen_;
});
if (except && last_read_ >= last_seen_)
{
throw voltu::exceptions::Timeout();
}
return last_read_ < last_seen_;
}
else if (timeout == 0)
{
if (except) throw voltu::exceptions::Timeout();
return false;
}
else
......
......@@ -16,7 +16,7 @@ public:
~RoomImpl() override;
bool waitNextFrame(int64_t) override;
bool waitNextFrame(int64_t, bool except) override;
voltu::FramePtr getFrame() override;
......
......@@ -87,6 +87,11 @@ std::list<voltu::RoomId> SystemImpl::listRooms()
voltu::RoomPtr SystemImpl::getRoom(voltu::RoomId id)
{
if (feed_->getURI(id).size() == 0)
{
throw voltu::exceptions::InvalidRoomId();
}
auto s = std::make_shared<voltu::internal::RoomImpl>(feed_);
s->addFrameSet(id);
return s;
......
......@@ -70,7 +70,7 @@ public:
* @param timeout Millisecond timeout, or 0 or -1.
* @return True if a new unseen frame is available.
*/
PY_API virtual bool waitNextFrame(int64_t timeout) = 0;
PY_API virtual bool waitNextFrame(int64_t timeout, bool except=false) = 0;
/**
* @brief Check if a new frame is available.
......
......@@ -47,6 +47,7 @@ VOLTU_EXCEPTION(NotImplemented, Exception, "Functionality not implemented");
VOLTU_EXCEPTION(ReadOnly, Exception, "Read only, write not allowed");
VOLTU_EXCEPTION(WriteOnly, Exception, "Write only, read not allowed");
VOLTU_EXCEPTION(IncompatibleOperation, Exception, "The input data and operator are incompatible");
VOLTU_EXCEPTION(Timeout, Exception, "Request timed out");
}
}
......@@ -8,7 +8,7 @@
// Bump these for each release
#define VOLTU_VERSION_MAJOR 0 // For API incompatible changes
#define VOLTU_VERSION_MINOR 2 // For binary compatibility and extensions
#define VOLTU_VERSION_MINOR 3 // For binary compatibility and extensions
#define VOLTU_VERSION_PATCH 0 // Binary compatible internal fixes
#define VOLTU_VERSION ((VOLTU_VERSION_MAJOR*10000) + (VOLTU_VERSION_MINOR*100) + VOLTU_VERSION_PATCH)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment