3#include "../../_cexports/c_gev_server.h"
4#include "../../global.hpp"
6#include "../_decl/decl_node_map.hpp"
8#include "../_decl/decl_server.hpp"
9#include "../_decl/decl_stream.hpp"
24 return parent_->State() == State::AcquisitionEnabled;
29 CExports::cvbval_t numBuffers = 0;
30 CVB_CALL_CAPI(GSGetPacketResendBuffers(parent_->Handle(), numBuffers));
36 CVB_CALL_CAPI(GSSetPacketResendBuffers(parent_->Handle(),
static_cast<CExports::cvbval_t
>(numBuffers)));
41 int result = InnerSend(image, imageReleased);
48 return InnerSend(image, imageReleased) >= 0;
56 int result = InnerSend(image);
66 return InnerSend(image) >= 0;
72 int result = InnerSend(bufferDescription, basePtr, bufferSize, bufferReleased);
80 return InnerSend(bufferDescription, basePtr, bufferSize, bufferReleased) >= 0;
91 auto res = CVB_CALL_CAPI(GSSendImageCB(parent_->Handle(), image->Handle(), &Stream::SendDispatcher, pPrivate));
98 inline CExports::cvbres_t Stream::InnerSend(
const Image &image)
100 return CVB_CALL_CAPI(GSSendImage(parent_->Handle(), image.Handle()));
104 std::size_t bufferSize, std::function<
void(
void *)> callback)
106 auto pPrivate =
new std::function<void()>([basePtr, callback]() { callback(basePtr); });
107 auto dataBlock = description.ImageDataBlock();
108 auto res = CVB_CALL_CAPI(
109 GSSendBlock(parent_->Handle(),
reinterpret_cast<const CExports::GSDataBlock &
>(dataBlock),
110 static_cast<CExports::cvbuint8_t *
>(basePtr), bufferSize, &Stream::SendDispatcher, pPrivate));
118 std::size_t bufferSize, std::function<
void(
void *)> callback)
120 auto pPrivate =
new std::function<void()>([basePtr, callback]() { callback(basePtr); });
121 auto dataBlock = description.ChunkImageDataBlock();
122 auto res = CVB_CALL_CAPI(
123 GSSendBlock(parent_->Handle(),
reinterpret_cast<const CExports::GSDataBlock &
>(dataBlock),
124 static_cast<CExports::cvbuint8_t *
>(basePtr), bufferSize, &Stream::SendDispatcher, pPrivate));
Describes a GenICam Pixel Format Naming Convention (PFNC) compatible image memory buffer with possibl...
Definition chunk_image_buffer_description.hpp:22
Describes a GenICam Pixel Format Naming Convention (PFNC) compatible image memory buffer.
Definition image_buffer_description.hpp:24
bool TrySend(const ImagePtr &image, std::function< void(const ImagePtr &)> imageReleased)
Tries to send the given image to the remote client.
Definition detail_stream.hpp:46
ServerPtr Parent()
Gets the parent server object.
Definition detail_stream.hpp:17
void Send(const ImagePtr &image, std::function< void(const ImagePtr &)> imageReleased)
Sends the given image to the remote client.
Definition detail_stream.hpp:39
void SetResendBuffersCount(const std::int64_t &numBuffers)
Sets the number of resend buffers.
Definition detail_stream.hpp:34
std::int64_t ResendBuffersCount() const
Gets the number of resend buffers.
Definition detail_stream.hpp:27
bool IsRunning() const
Gets whether this stream is running.
Definition detail_stream.hpp:22
Namespace for GevServer based device configuration.
Definition decl_int_swiss_knife_node.hpp:11
@ Image
Image payload.
Definition gevserver.hpp:271
std::shared_ptr< Server > ServerPtr
Convenience shared pointer for GevServer.
Definition gevserver.hpp:37
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
std::shared_ptr< Image > ImagePtr
Convenience shared pointer for Image.
Definition global.hpp:86