3#include "../_decl/decl_gendc_descriptor.hpp"
4#include "../../_cexports/c_driver.h"
6#include "../../global.hpp"
7#include "../../composite.hpp"
8#include "../../utilities/system_info.hpp"
22 T GetPartInfo(
void *handle, CExports::CVDGNDCPartInfoCmd cmd, std::size_t componentIdx, std::size_t partIdx)
24 return Internal::DoResCallValueOut<T>([&](T &value) {
25 size_t valueSize =
sizeof(T);
26 return CVB_CALL_CAPI(CVDGNDCGetPartInfo(handle, cmd, valueSize, &value, componentIdx, partIdx));
31 void SetPartInfo(
void *handle, CExports::CVDGNDCPartInfoCmd cmd, std::size_t componentIdx, std::size_t partIdx,
34 return Internal::DoResCall([&]() {
35 size_t valueSize =
sizeof(T);
36 return CVB_CALL_CAPI(CVDGNDCSetPartInfo(handle, cmd, valueSize, &value, componentIdx, partIdx));
41 T GetComponentInfo(
void *handle, CExports::CVDGNDCComponentInfoCmd cmd, std::size_t componentIdx)
43 return Internal::DoResCallValueOut<T>([&](T &value) {
44 size_t valueSize =
sizeof(T);
45 return CVB_CALL_CAPI(CVDGNDCGetComponentInfo(handle, cmd, valueSize, &value, componentIdx));
50 void SetComponentInfo(
void *handle, CExports::CVDGNDCComponentInfoCmd cmd, std::size_t componentIdx,
53 return Internal::DoResCall([&]() {
54 size_t valueSize =
sizeof(T);
55 return CVB_CALL_CAPI(CVDGNDCSetComponentInfo(handle, cmd, valueSize, &value, componentIdx));
60 T GetHeaderInfo(
void *handle, CExports::CVDGNDCHeaderInfoCmd cmd)
62 return Internal::DoResCallValueOut<T>([&](T &value) {
63 size_t valueSize =
sizeof(T);
64 return CVB_CALL_CAPI(CVDGNDCGetHeaderInfo(handle, cmd, valueSize, &value));
69 void SetHeaderInfo(
void *handle, CExports::CVDGNDCHeaderInfoCmd cmd, T &value)
71 return Internal::DoResCall([&]() {
72 size_t valueSize =
sizeof(T);
73 return CVB_CALL_CAPI(CVDGNDCSetHeaderInfo(handle, cmd, valueSize, &value));
79 std::uint16_t flowId, std::uint64_t flowOffset,
80 std::uint64_t dataSize)
84 , FlowOffset{flowOffset}
89 inline GenDcDescriptorMetadataPartConfig::GenDcDescriptorMetadataPartConfig(GenDCPartType partType,
93 : GenDcDescriptorPartConfig{partType,
PfncFormat::
Data8, flowId, flowOffset, dataSize}
95 if ((
static_cast<std::underlying_type_t<GenDCPartType>
>(partType)
96 &
static_cast<std::underlying_type_t<GenDCPartType>
>(GenDCPartType::_TypeGenericPartMetadata))
98 throw std::runtime_error(
"GenDcDescriptorMetadataPart must contain a metadata part type");
101 inline GenDcDescriptorMetadataComponentConfig::GenDcDescriptorMetadataComponentConfig(
106 [](
const auto &part) { return static_cast<GenDcDescriptorPartConfig>(part); });
109 inline GenDcPart::GenDcPart(
void *handle,
size_t componentIdx,
size_t partIdx)
111 , componentIdx_{componentIdx}
118 return Detail::GetPartInfo<std::uint64_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCPI_PartOffset,
119 componentIdx_, partIdx_);
124 return Detail::GetPartInfo<GenDCPartType>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCPI_HeaderType,
125 componentIdx_, partIdx_);
130 return Detail::GetPartInfo<GenDcPartFlags>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCPI_FlagsValue,
131 componentIdx_, partIdx_);
136 return Detail::GetPartInfo<std::uint32_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCPI_HeaderSize,
137 componentIdx_, partIdx_);
142 return Detail::GetPartInfo<PfncFormat>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCPI_Format, componentIdx_,
148 return Detail::GetPartInfo<std::uint16_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCPI_FlowId, componentIdx_,
154 return Detail::GetPartInfo<std::size_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCPI_FlowOffset,
155 componentIdx_, partIdx_);
160 return Detail::GetPartInfo<std::size_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCPI_DataOffset,
161 componentIdx_, partIdx_);
166 return Detail::GetPartInfo<std::size_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCPI_DataSize, componentIdx_,
172 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCPI_FlagsValue, componentIdx_, partIdx_, flags);
177 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCPI_DataOffset, componentIdx_, partIdx_, offset);
182 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCPI_DataSize, componentIdx_, partIdx_, size);
187 return Detail::GetPartInfo<std::uint64_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDC1DPI_Size, componentIdx_,
193 return Detail::GetPartInfo<std::uint16_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDC1DPI_Padding,
194 componentIdx_, partIdx_);
199 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDC1DPI_Size, componentIdx_, partIdx_, size);
204 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDC1DPI_Padding, componentIdx_, partIdx_, padding);
207 inline GenDcPartMetadata::GenDcPartMetadata(
void *handle,
size_t componentIdx,
size_t partIdx)
208 :
GenDcPart{handle, componentIdx, partIdx}
214 return Detail::GetPartInfo<std::uint64_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNCDC1DPI_InfoTypeSpecific,
221 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNCDC1DPI_InfoTypeSpecific, componentIdx_, partIdx_,
225 inline GenDcPartMetadataGenICamChunk::GenDcPartMetadataGenICamChunk(
void *handle,
size_t componentIdx,
233 return Detail::GetPartInfo<std::uint64_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNCDC1DPI_InfoTypeSpecific,
240 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNCDC1DPI_InfoTypeSpecific, componentIdx_, partIdx_,
244 inline GenDcPartMetadataGenICamXML::GenDcPartMetadataGenICamXML(
void *handle,
size_t componentIdx,
size_t partIdx)
251 return Detail::GetPartInfo<std::uint64_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDC1DPI_Size, componentIdx_,
257 return Detail::GetPartInfo<std::uint16_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDC1DPI_Padding,
258 componentIdx_, partIdx_);
263 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDC1DPI_Size, componentIdx_, partIdx_, size);
268 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDC1DPI_Padding, componentIdx_, partIdx_, padding);
271 inline GenDcPart1D::GenDcPart1D(
void *handle,
size_t componentIdx,
size_t partIdx)
272 :
GenDcPart{handle, componentIdx, partIdx}
278 return Detail::GetPartInfo<std::uint32_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDC2DPI_SizeX, componentIdx_,
284 return Detail::GetPartInfo<std::uint32_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDC2DPI_SizeY, componentIdx_,
290 return Detail::GetPartInfo<std::uint16_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDC2DPI_PaddingX,
291 componentIdx_, partIdx_);
296 return Detail::GetPartInfo<std::uint16_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDC2DPI_PaddingY,
297 componentIdx_, partIdx_);
302 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDC2DPI_SizeX, componentIdx_, partIdx_, size);
307 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDC2DPI_SizeY, componentIdx_, partIdx_, size);
312 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDC2DPI_PaddingX, componentIdx_, partIdx_,
318 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDC2DPI_PaddingY, componentIdx_, partIdx_,
322 inline GenDcPart2D::GenDcPart2D(
void *handle,
size_t componentIdx,
size_t partIdx)
323 :
GenDcPart{handle, componentIdx, partIdx}
329 return Detail::GetPartInfo<std::uint32_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_SizeX,
330 componentIdx_, partIdx_);
335 return Detail::GetPartInfo<std::uint32_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_SizeY,
336 componentIdx_, partIdx_);
341 return Detail::GetPartInfo<std::uint16_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_PaddingX,
342 componentIdx_, partIdx_);
347 return Detail::GetPartInfo<std::uint16_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_PaddingY,
348 componentIdx_, partIdx_);
353 return Detail::GetPartInfo<std::uint8_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_ProfileIDC,
354 componentIdx_, partIdx_);
359 return Detail::GetPartInfo<H264Flags>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_H264Flags,
360 componentIdx_, partIdx_);
365 return Detail::GetPartInfo<std::uint8_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_LevelIDC,
366 componentIdx_, partIdx_);
371 return Detail::GetPartInfo<std::uint16_t>(
372 handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_SpropInterleavingDepth, componentIdx_,
377 return Detail::GetPartInfo<std::uint16_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_SpropMaxDonDiff,
384 return Detail::GetPartInfo<std::uint32_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_SpropDeintBufReq,
391 return Detail::GetPartInfo<std::uint32_t>(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_SpropInitBufTime,
398 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_SizeX, componentIdx_, partIdx_, size);
403 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_SizeY, componentIdx_, partIdx_, size);
408 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_PaddingX, componentIdx_, partIdx_,
414 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_PaddingY, componentIdx_, partIdx_,
420 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_ProfileIDC, componentIdx_, partIdx_,
426 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_H264Flags, componentIdx_, partIdx_,
432 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_LevelIDC, componentIdx_, partIdx_,
438 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_SpropInterleavingDepth, componentIdx_,
444 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_SpropMaxDonDiff, componentIdx_, partIdx_,
450 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_SpropDeintBufReq, componentIdx_,
456 Detail::SetPartInfo(handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCH264PI_SpropInitBufTime, componentIdx_,
460 inline GenDcPartH264::GenDcPartH264(
void *handle,
size_t componentIdx,
size_t partIdx)
465 inline GenDcComponent::GenDcComponent(
void *handle,
size_t componentIdx)
467 , componentIdx_{componentIdx}
469 const auto partCount = Detail::GetComponentInfo<std::uint16_t>(
470 handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_PartCount, componentIdx_);
473 const auto type = Detail::GetPartInfo<GenDCPartType>(
474 handle_, CExports::CVDGNDCPartInfoCmd::CVDGNDCPI_HeaderType, componentIdx_, idx);
478 parts_.push_back(GenDcPartMetadataGenICamChunk{handle_, componentIdx_, idx});
481 parts_.push_back(GenDcPartMetadataGenICamXML{handle_, componentIdx_, idx});
483 case GenDCPartType::Type1D:
484 parts_.push_back(GenDcPart1D{handle_, componentIdx_, idx});
491 parts_.push_back(GenDcPart2D{handle_, componentIdx_, idx});
494 parts_.push_back(GenDcPartH264{handle_, componentIdx_, idx});
497 parts_.push_back(GenDcPart{handle_, componentIdx_, idx});
505 return Detail::GetComponentInfo<std::uint64_t>(
506 handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_ComponentOffset, componentIdx_);
511 return Detail::GetComponentInfo<GenDcComponentFlags>(
512 handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_FlagsValue, componentIdx_);
517 return Detail::GetComponentInfo<std::uint32_t>(handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_HeaderSize,
523 return Detail::GetComponentInfo<std::uint16_t>(handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_GroupId,
529 return Detail::GetComponentInfo<std::uint16_t>(handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_SourceId,
535 return Detail::GetComponentInfo<std::uint16_t>(handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_RegionId,
541 return Detail::GetComponentInfo<std::uint32_t>(
542 handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_RegionOffsetX, componentIdx_);
547 return Detail::GetComponentInfo<std::uint32_t>(
548 handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_RegionOffsetY, componentIdx_);
553 return Detail::GetComponentInfo<std::uint64_t>(handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_Timestamp,
559 return static_cast<ComponentId>(Detail::GetComponentInfo<std::uint64_t>(
560 handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_TypeId, componentIdx_));
565 return Detail::GetComponentInfo<PfncFormat>(handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_Format,
581 return Detail::SetComponentInfo(handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_FlagsValue, componentIdx_,
587 return Detail::SetComponentInfo(handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_GroupId, componentIdx_,
593 return Detail::SetComponentInfo(handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_SourceId, componentIdx_,
599 return Detail::SetComponentInfo(handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_RegionId, componentIdx_,
605 return Detail::SetComponentInfo(handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_RegionOffsetX,
606 componentIdx_, offset);
611 return Detail::SetComponentInfo(handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_RegionOffsetY,
612 componentIdx_, offset);
617 return Detail::SetComponentInfo(handle_, CExports::CVDGNDCComponentInfoCmd::CVDGNDCCMPI_Timestamp, componentIdx_,
621 inline GenDcDescriptor::GenDcDescriptor(HandleGuard<GenDcDescriptor> &&guard)
622 : handle_(std::move(guard))
625 const auto componentCount =
626 Detail::GetHeaderInfo<std::uint32_t>(Handle(), CExports::CVDGNDCHeaderInfoCmd::CVDGNDCCNTI_ComponentCount);
627 for (
std::size_t idx = 0; idx < componentCount; ++idx)
641 return {Detail::GetHeaderInfo<std::uint8_t>(
Handle(), CExports::CVDGNDCHeaderInfoCmd::CVDGNDCCNTI_VersionMajor),
642 Detail::GetHeaderInfo<std::uint8_t>(
Handle(), CExports::CVDGNDCHeaderInfoCmd::CVDGNDCCNTI_VersionMinor),
643 Detail::GetHeaderInfo<std::uint8_t>(
Handle(), CExports::CVDGNDCHeaderInfoCmd::CVDGNDCCNTI_VersionSubMinor)};
648 return Detail::GetHeaderInfo<GenDcDescriptorFlag>(
Handle(),
649 CExports::CVDGNDCHeaderInfoCmd::CVDGNDCCNTI_FlagsValue);
654 return Detail::GetHeaderInfo<std::uint32_t>(
Handle(), CExports::CVDGNDCHeaderInfoCmd::CVDGNDCCNTI_HeaderSize);
659 return Detail::GetHeaderInfo<std::uint64_t>(
Handle(), CExports::CVDGNDCHeaderInfoCmd::CVDGNDCCNTI_ContainerId);
664 return Detail::GetHeaderInfo<GenDcDescriptorVariableField>(
665 Handle(), CExports::CVDGNDCHeaderInfoCmd::CVDGNDCCNTI_VariableFields);
670 return Detail::GetHeaderInfo<std::uint64_t>(
Handle(), CExports::CVDGNDCHeaderInfoCmd::CVDGNDCCNTI_DataSize);
675 return Detail::GetHeaderInfo<std::int64_t>(
Handle(), CExports::CVDGNDCHeaderInfoCmd::CVDGNDCCNTI_DataOffset);
680 return Detail::GetHeaderInfo<std::uint32_t>(
Handle(), CExports::CVDGNDCHeaderInfoCmd::CVDGNDCCNTI_DescriptorSize);
698 size_t maxFlowIdx = 0;
701 for (
const auto &part : component.GetParts())
703 auto flowIdx = visit([](
const GenDcPart &part) ->
size_t {
return part.
GetFlowId(); }, part);
705 maxFlowIdx =
std::max(maxFlowIdx, flowIdx);
717 for (
const auto &part : component.GetParts())
721 std::tie(flowIdx, dataSize) = visit(
727 flowSizes[flowIdx] += dataSize;
736 Detail::SetHeaderInfo(
Handle(), CExports::CVDGNDCHeaderInfoCmd::CVDGNDCCNTI_FlagsValue, flags);
741 Detail::SetHeaderInfo(
Handle(), CExports::CVDGNDCHeaderInfoCmd::CVDGNDCCNTI_ContainerId,
id);
746 Detail::SetHeaderInfo(
Handle(), CExports::CVDGNDCHeaderInfoCmd::CVDGNDCCNTI_VariableFields, fields);
751 Detail::SetHeaderInfo(
Handle(), CExports::CVDGNDCHeaderInfoCmd::CVDGNDCCNTI_DataSize, size);
756 return handle_.Handle();
761 return Internal::DoResCallValueOut<std::size_t>(
762 [&](
std::size_t &value) {
return CVB_CALL_CAPI(CVDGNDCSerialize(
Handle(), value,
nullptr)); });
767 return Internal::DoResCall([&]() {
return CVB_CALL_CAPI(CVDGNDCSerialize(
Handle(), size, buffer)); });
783 const auto partCount =
785 [](
size_t count,
const auto &component) { return count + component.Parts.size(); });
787 parts.reserve(partCount);
789 for (
const auto &component : descriptorConfig.
Components)
794 size_t startOffset = parts.size();
795 for (
const auto &part : component.Parts)
797 parts.push_back(CExports::CVDGenDCPartConfig{
798 static_cast<CExports::cvbuint16_t
>(part.PartType),
799 static_cast<CExports::cvbuint32_t
>(part.Format),
805 components.push_back(CExports::CVDGenDCComponentConfig{
806 static_cast<CExports::cvbuint32_t
>(component.TypeId),
static_cast<CExports::cvbuint32_t
>(component.Format),
807 static_cast<CExports::cvbuint16_t
>(component.Parts.size()), parts.data() + startOffset});
810 CExports::CVDGenDCDescriptorConfig config{
static_cast<CExports::cvbuint32_t
>(components.size()),
813 return Internal::DoResCallObjectOut<GenDcDescriptor>(
814 [&](
void *&handle) {
return CVB_CALL_CAPI(CVDGNDCCreateDescriptor(config, handle)); });
822 if (!CExports::CVDCanGenDCDescriptorProvider(
Handle()))
825 return Internal::DoResCallObjectOut<Driver::GenDcDescriptor>(
826 [
this](CExports::CVDGNDCDESCRIPTOR &handle) {
return CVB_CALL_CAPI(CVDGNDCPGetDescriptor(
Handle(), handle)); });
T back_inserter(T... args)
void * Handle() const noexcept
Classic API node handle.
Definition decl_composite.hpp:95
std::unique_ptr< Driver::GenDcDescriptor > GenDCFinalDescriptor() const
If this Composite represents a GenDC container, returns the GenDC final descriptor.
Definition detail_gendc_descriptor.hpp:820
Class for a GenDC component descriptor.
Definition decl_gendc_descriptor.hpp:541
std::uint64_t GetTimestamp() const
Return the timestamp of this GenDC component's generation.
Definition detail_gendc_descriptor.hpp:551
std::uint32_t GetHeaderSize() const
Return the size of this GenDC component descriptor.
Definition detail_gendc_descriptor.hpp:515
void SetTimestamp(std::uint64_t timestamp)
Set the timestamp of this GenDC component's generation.
Definition detail_gendc_descriptor.hpp:615
std::uint16_t GetRegionId() const
Return the Source ID of this GenDC component.
Definition detail_gendc_descriptor.hpp:533
ComponentId GetTypeId() const
Return the type identifier of this GenDC component.
Definition detail_gendc_descriptor.hpp:557
const std::vector< GenDCPartVariant > & GetParts() const
Return the part descriptors of this GenDC component.
Definition detail_gendc_descriptor.hpp:569
std::uint32_t GetRegionOffsetX() const
Return the X Offset of this GenDC component's region.
Definition detail_gendc_descriptor.hpp:539
std::size_t GetOffset() const
Return the offset of this component descriptor in the GenDC descriptor.
Definition detail_gendc_descriptor.hpp:503
PfncFormat GetFormat() const
Return the format of the whole GenDC component (including all its parts).
Definition detail_gendc_descriptor.hpp:563
void SetSourceId(std::uint16_t id)
Set the Source ID of this GenDC component.
Definition detail_gendc_descriptor.hpp:591
void SetFlags(GenDcComponentFlags flags)
Set the flags of this GenDC component.
Definition detail_gendc_descriptor.hpp:579
std::uint16_t GetGroupId() const
Return the Group ID of this GenDC component.
Definition detail_gendc_descriptor.hpp:521
GenDcComponentFlags GetFlags() const
Return the flags of this GenDC component.
Definition detail_gendc_descriptor.hpp:509
std::uint32_t GetRegionOffsetY() const
Return the Y Offset of this GenDC component's region.
Definition detail_gendc_descriptor.hpp:545
std::uint16_t GetSourceId() const
Return the Source ID of this GenDC component.
Definition detail_gendc_descriptor.hpp:527
void SetRegionOffsetX(std::uint32_t offset)
Set the X Offset of this GenDC component's region.
Definition detail_gendc_descriptor.hpp:603
void SetRegionId(std::uint16_t id)
Set the Source ID of this GenDC component.
Definition detail_gendc_descriptor.hpp:597
void SetRegionOffsetY(std::uint32_t offset)
Set the Y Offset of this GenDC component's region.
Definition detail_gendc_descriptor.hpp:609
void SetGroupId(std::uint16_t id)
Set the Group ID of this GenDC component.
Definition detail_gendc_descriptor.hpp:585
std::uint32_t GetHeaderSize() const
Return the size of this GenDC container descriptor.
Definition detail_gendc_descriptor.hpp:652
std::size_t GetSerializedSize() const
Get the size in bytes of this GenDC descriptor when serialized.
Definition detail_gendc_descriptor.hpp:759
const std::vector< GenDcComponent > & GetComponents() const
Return the component descriptors of this GenDC container.
Definition detail_gendc_descriptor.hpp:683
GenDcDescriptorFlag GetFlags() const
Return the flags of this GenDC container.
Definition detail_gendc_descriptor.hpp:646
void SetVariableFields(GenDcDescriptorVariableField fields)
Set the flags identifying the variable fields of this GenDC container.
Definition detail_gendc_descriptor.hpp:744
void SetContainerId(std::uint64_t id)
Set the identifier of GenDC container.
Definition detail_gendc_descriptor.hpp:739
std::vector< std::uint8_t > Serialize() const
Serialize this GenDC descriptor into a new buffer.
Definition detail_gendc_descriptor.hpp:770
std::uint64_t GetDataSize() const
Return the size of the GenDC data.
Definition detail_gendc_descriptor.hpp:668
std::uint64_t GetContainerId() const
Return the identifier of GenDC container.
Definition detail_gendc_descriptor.hpp:657
size_t CalculateDataFlowCount() const
Return the number of data flows that are configured in the GenDC container.
Definition detail_gendc_descriptor.hpp:693
void SetFlags(GenDcDescriptorFlag flags)
Set the flags of this GenDC container.
Definition detail_gendc_descriptor.hpp:734
void SetDataSize(std::uint32_t size)
Set the size of the GenDC data.
Definition detail_gendc_descriptor.hpp:749
GenDcDescriptorVariableField GetVariableFields() const
Return the flags identifying the variable fields of this GenDC container.
Definition detail_gendc_descriptor.hpp:662
std::vector< size_t > CalculateDataFlowSizes() const
Return the sizes of data flows that the GenDC container requires.
Definition detail_gendc_descriptor.hpp:711
std::int64_t GetDataOffset() const
Return the offset of the GenDC data.
Definition detail_gendc_descriptor.hpp:673
static std::unique_ptr< GenDcDescriptor > FromHandle(HandleGuard< GenDcDescriptor > &&guard)
Creates a GenDC descriptor from a classic API handle.
Definition detail_gendc_descriptor.hpp:631
std::uint32_t GetDescriptorSize() const
Return the size of the GenDC container descriptor.
Definition detail_gendc_descriptor.hpp:678
void * Handle() const noexcept
Return the Handle to the internal resource.
Definition detail_gendc_descriptor.hpp:754
Version GetVersion() const
Return the GenDC descriptor standards version.
Definition detail_gendc_descriptor.hpp:639
static std::unique_ptr< GenDcDescriptor > Create(const GenDcDescriptorConfig &descriptorConfig)
Create a GenDC descriptor.
Definition detail_gendc_descriptor.hpp:778
void SetPadding(std::uint16_t padding)
Set the padding of this GenDC 1D part.
Definition detail_gendc_descriptor.hpp:266
std::uint16_t GetPadding() const
Return the padding of this GenDC 1D part.
Definition detail_gendc_descriptor.hpp:255
void SetSize(std::uint64_t size)
Set the size of the GenDC 1D part.
Definition detail_gendc_descriptor.hpp:261
std::uint64_t GetSize() const
Return the size of the GenDC 1D part.
Definition detail_gendc_descriptor.hpp:249
Class for a GenDC 2D part descriptor.
Definition decl_gendc_descriptor.hpp:299
virtual void SetSizeY(std::uint32_t size)
Set the Y size of the GenDC 2D part.
Definition detail_gendc_descriptor.hpp:305
virtual std::uint32_t GetSizeY() const
Return the Y size of the GenDC 2D part.
Definition detail_gendc_descriptor.hpp:282
virtual std::uint16_t GetPaddingY() const
Return the Y padding of the GenDC 2D part.
Definition detail_gendc_descriptor.hpp:294
virtual void SetPaddingX(std::uint16_t padding)
Set the X padding of the GenDC 2D part.
Definition detail_gendc_descriptor.hpp:310
virtual void SetSizeX(std::uint32_t size)
Set the X size of the GenDC 2D part.
Definition detail_gendc_descriptor.hpp:300
virtual std::uint16_t GetPaddingX() const
Return the X padding of the GenDC 2D part.
Definition detail_gendc_descriptor.hpp:288
virtual std::uint32_t GetSizeX() const
Return the X size of the GenDC 2D part.
Definition detail_gendc_descriptor.hpp:276
virtual void SetPaddingY(std::uint16_t padding)
Set the Y padding of the GenDC 2D part.
Definition detail_gendc_descriptor.hpp:316
std::uint8_t GetLevelIDC() const
Return the level_idc sequence parameter of the GenDC H.264 part.
Definition detail_gendc_descriptor.hpp:363
void SetSpropMaxDonDiff(std::uint16_t diff)
Set the sprop-max-don-diff of the GenDC H.264 part.
Definition detail_gendc_descriptor.hpp:442
std::uint16_t GetPaddingY() const override
Return the Y padding of the GenDC 2D part.
Definition detail_gendc_descriptor.hpp:345
void SetSizeY(std::uint32_t size) override
Set the Y size of the GenDC 2D part.
Definition detail_gendc_descriptor.hpp:401
std::uint32_t GetSizeY() const override
Return the Y size of the GenDC 2D part.
Definition detail_gendc_descriptor.hpp:333
std::uint16_t GetSpropMaxDonDiff() const
Return the sprop-max-don-diff of the GenDC H.264 part.
Definition detail_gendc_descriptor.hpp:375
void SetPaddingX(std::uint16_t padding) override
Set the X padding of the GenDC 2D part.
Definition detail_gendc_descriptor.hpp:406
std::uint16_t GetSpropInterleavingDepth() const
Return the sprop-interleaving-depth of the GenDC H.264 part.
Definition detail_gendc_descriptor.hpp:369
void SetSpropInitBufTime(std::uint32_t time)
Set the sprop-init-buf-time of the GenDC H.264 part.
Definition detail_gendc_descriptor.hpp:454
std::uint8_t GetProfileIDC() const
Return the profile_idc of the GenDC H.264 part.
Definition detail_gendc_descriptor.hpp:351
void SetSizeX(std::uint32_t size) override
Set the X size of the GenDC 2D part.
Definition detail_gendc_descriptor.hpp:396
void SetH264Flags(H264Flags flags)
Set the Flags of the GenDC H.264 part.
Definition detail_gendc_descriptor.hpp:424
void SetProfileIDC(std::uint8_t profile)
Set the profile_idc of the GenDC H.264 part.
Definition detail_gendc_descriptor.hpp:418
void SetSpropInterleavingDepth(std::uint16_t depth)
Set the sprop-interleaving-depth of the GenDC H.264 part.
Definition detail_gendc_descriptor.hpp:436
void SetLevelIDC(std::uint8_t level)
Set the level_idc sequence parameter of the GenDC H.264 part.
Definition detail_gendc_descriptor.hpp:430
std::uint32_t GetSizeX() const override
Return the X size of the GenDC 2D part.
Definition detail_gendc_descriptor.hpp:327
std::uint16_t GetPaddingX() const override
Return the X padding of the GenDC 2D part.
Definition detail_gendc_descriptor.hpp:339
void SetSpropDeintBufReq(std::uint32_t req)
Set the sprop-deint-buf-req of the GenDC H.264 part.
Definition detail_gendc_descriptor.hpp:448
std::uint32_t GetSpropDeintBufReq() const
Return the sprop-deint-buf-req of the GenDC H.264 part.
Definition detail_gendc_descriptor.hpp:382
void SetPaddingY(std::uint16_t padding) override
Set the Y padding of the GenDC 2D part.
Definition detail_gendc_descriptor.hpp:412
H264Flags GetH264Flags() const
Return the Flags of the GenDC H.264 part.
Definition detail_gendc_descriptor.hpp:357
std::uint32_t GetSpropInitBufTime() const
Return the sprop-init-buf-time of the GenDC H.264 part.
Definition detail_gendc_descriptor.hpp:389
Class for a generic GenDC part descriptor.
Definition decl_gendc_descriptor.hpp:72
void SetDataOffset(std::size_t offset)
Set the Data offset of this GenDC part.
Definition detail_gendc_descriptor.hpp:175
std::uint32_t GetHeaderSize() const
Return the size of this GenDC part descriptor.
Definition detail_gendc_descriptor.hpp:134
void SetFlags(GenDcPartFlags flags)
Set the flags of this GenDC part.
Definition detail_gendc_descriptor.hpp:170
std::size_t GetDataOffset() const
Return the Data offset of this GenDC part.
Definition detail_gendc_descriptor.hpp:158
std::uint16_t GetFlowId() const
Return the Flow ID of this GenDC part.
Definition detail_gendc_descriptor.hpp:146
std::size_t GetOffset() const
Return the offset of this part descriptor in the GenDC descriptor.
Definition detail_gendc_descriptor.hpp:116
PfncFormat GetFormat() const
Return the data format of this GenDC part.
Definition detail_gendc_descriptor.hpp:140
GenDCPartType GetType() const
Return the type of this GenDC part descriptor.
Definition detail_gendc_descriptor.hpp:122
std::size_t GetDataSize() const
Return the Data size of this GenDC part.
Definition detail_gendc_descriptor.hpp:164
GenDcPartFlags GetFlags() const
Return the flags of this GenDC part.
Definition detail_gendc_descriptor.hpp:128
void SetDataSize(std::size_t size)
Set the Data size of this GenDC part.
Definition detail_gendc_descriptor.hpp:180
std::size_t GetFlowOffset() const
Return the Flow offset of this GenDC part.
Definition detail_gendc_descriptor.hpp:152
Namespace for driver or device related operations.
Definition decl_composite.hpp:27
ComponentId
Component type identifier,.
Definition driver.hpp:609
@ Metadata
Metadata component.
Definition driver.hpp:629
GenDcDescriptorVariableField
Flags specifying which type of data information might vary during the Container reception.
Definition driver.hpp:652
@ Format
If True, the Components' Format might change. This bit can only be set in a prefetch Descriptor.
Definition driver.hpp:662
@ DataSize
If True, the DataSize of the Components' Parts might become smaller.
Definition driver.hpp:654
H264Flags
Flags specifying the characteristics and format of the H.264 Part.
Definition driver.hpp:690
GenDCPartType
Part Type Header format identifier,.
Definition driver.hpp:581
@ TypeMetadataGenICamXML
GenICam Metadata XML.
Definition driver.hpp:594
@ TypeJPEG
JPEG compressed Image.
Definition driver.hpp:600
@ Type2D
Rectangular uncompressed image (monochrome or none planar color).
Definition driver.hpp:598
@ TypeMetadataGenICamChunk
GenICam Chunk Metadata.
Definition driver.hpp:592
@ TypeH264
H.264 compressed Image.
Definition driver.hpp:604
@ TypeJPEG2000
JPEG 2000 compressed Image.
Definition driver.hpp:602
GenDcDescriptorFlag
Flags specifying the characteristics and format of the Container.
Definition driver.hpp:641
GenDcPartFlags
Flags specifying the characteristics and format of the Part.
Definition driver.hpp:681
GenDcComponentFlags
Flags specifying the characteristics and format of the Component.
Definition driver.hpp:673
PfncFormat
GenICam Pixel Format Naming Convention (PFNC) format values.
Definition pfnc_format.hpp:34
@ Data8
Binary 8-bit data.
Definition pfnc_format.hpp:1006
Root namespace for the Image Manager interface.
Definition version.hpp:11
Configuration class for a GenDC descriptor.
Definition decl_gendc_descriptor.hpp:65
std::vector< GenDcDescriptorComponentConfig > Components
Configurations of the GenDC components in this GenDC descriptor.
Definition decl_gendc_descriptor.hpp:67
Class representing a Semantic Version in Major.Minor.SubMinor format.
Definition version.hpp:14