5#include "composite_stream_base.hpp"
6#include "multi_part_image.hpp"
18 class ImageStream :
public CompositeStreamBase
21 using GuardType = HandleGuard<CompositeStreamBase>;
23 ImageStream(HandleGuard<CompositeStreamBase> &&guard, PrivateTag,
const DevicePtr &device = {})
24 : CompositeStreamBase(device,
std::move(guard))
35 template <
class Rep,
class Period>
39 return CreateWaitResult(InternalWaitFor<Image>(timeSpan, token));
48 template <
class Rep,
class Period>
51 return CreateWaitResult(InternalWaitFor<Image>(timeSpan));
62 return CreateWaitResult(InternalWait<Image>(token));
72 return CreateWaitResult(InternalWait<Image>());
78 HandleGuard<Image> guard(
nullptr);
85 if (!CVB_CALL_CAPI(
IsImage(guard.Handle())))
18 class ImageStream :
public CompositeStreamBase {
…};
A token to enable cancellation on wait operations.
Definition cancellation_token.hpp:20
Streams images.
Definition image_stream.hpp:19
WaitResultTuple< MultiPartImage > WaitFor(const std::chrono::duration< Rep, Period > &timeSpan, CancellationToken &token)
Waits for the given time span for the next acquired image.
Definition image_stream.hpp:36
WaitResultTuple< MultiPartImage > Wait(const CancellationToken &token)
Waits for ever for the next acquired image.
Definition image_stream.hpp:60
WaitResultTuple< MultiPartImage > Wait()
Waits for ever for the next acquired image.
Definition image_stream.hpp:70
WaitResultTuple< MultiPartImage > WaitFor(const std::chrono::duration< Rep, Period > &timeSpan)
Waits for the given time span for the next acquired image.
Definition image_stream.hpp:49
Lazy enumeration of node maps.
Definition node_map_enumerator.hpp:30
static std::unique_ptr< Image > FromHandle(HandleGuard< Image > &&guard)
Creates an image from a classic API handle.
Definition decl_image.hpp:155
static NodeMapEnumerator FromObject(const T &object)
Create a node map enumerator for a given object.
Definition node_map_enumerator.hpp:98
cvbbool_t IsImage(IMG Image)
Namespace for driver or device related operations.
Definition decl_composite.hpp:26
std::shared_ptr< MultiPartImage > MultiPartImagePtr
Convenience shared pointer for StreamImage.
Definition driver.hpp:88
std::tuple< std::shared_ptr< T >, WaitStatus, NodeMapEnumerator > WaitResultTuple
Tuple holding multiple return values after waiting for a specific payload data.
Definition driver.hpp:579
Root namespace for the Image Manager interface.
Definition c_barcode.h:15
WaitStatus
Status after waiting for an image to be returned.
Definition global.hpp:375
@ Ok
Everything is fine, a new image arrived.
Definition global.hpp:377
std::shared_ptr< Device > DevicePtr
Convenience shared pointer for Device.
Definition global.hpp:94