Interface used to write to a multi-part container. More...
Public Member Functions | |
virtual void | Reset ()=0 |
Resets the multi-part container index to empty - no parts. | |
virtual PvResult | AddImagePart (PvMultiPartDataType aDataType, uint32_t aWidth, uint32_t aMaxHeight, PvPixelType aPixelType, uint32_t aOffsetX=0, uint32_t aOffsetY=0, uint16_t aPaddingX=0)=0 |
Adds an image part to the index of a multi-part container. More... | |
virtual PvResult | AddJPEGPart (PvMultiPartDataType aDataType, uint32_t aMaxLength, uint8_t aFlag, uint64_t aTimestampTickFrequency, uint32_t aDataFormat)=0 |
Adds a JPEG part to the index of a multi-part container. More... | |
virtual PvResult | AddChunkPart (uint32_t aMaxLength, uint32_t aChunkLayoutID)=0 |
Adds a chunk data part to the index of a multi-part container. More... | |
virtual PvResult | SetPartIDs (uint32_t aIndex, uint32_t aSourceID, uint32_t aDataPurposeID, uint32_t aRegionID)=0 |
Sets the source, data purpose and region IDs of a part. More... | |
virtual PvResult | SetPartZoneInfo (uint32_t aIndex, uint8_t aAdditionalZones, uint32_t aZoneDirectionMask)=0 |
Sets the zone info of a part. More... | |
virtual PvResult | AllocAllParts ()=0 |
Allocates memory for all parts defined by the part index of the multi-part container. More... | |
virtual PvResult | AllocPart (uint32_t aIndex)=0 |
Allocates memory for one of the parts as defined by the index of the part. More... | |
virtual PvResult | AttachPart (uint32_t aIndex, uint8_t *aBuffer, uint64_t aLength)=0 |
Attaches a part to an external memory buffer. More... | |
virtual PvResult | SetPartFinalLength (uint32_t aIndex, uint32_t aLength)=0 |
Sets the final length of a part. More... | |
virtual PvResult | SetPartFinalImageHeight (uint32_t aIndex, uint32_t aHeight)=0 |
Sets the final height of an image part. More... | |
virtual PvResult | Validate ()=0 |
Validates the part index and allocated/attached part memory. More... | |
![]() | |
virtual uint32_t | GetPartCount ()=0 |
Part count of the multi-part container. More... | |
virtual const IPvMultiPartSection * | GetPart (uint32_t aIndex) const =0 |
Indexed part (section) const accessor. More... | |
virtual IPvMultiPartSection * | GetPart (uint32_t aIndex)=0 |
Indexed part (section) accessor. More... | |
virtual const IPvMultiPartSection * | operator[] (uint32_t aIndex) const =0 |
Indexed part (section) const accessor. More... | |
virtual IPvMultiPartSection * | operator[] (uint32_t aIndex)=0 |
Indexed part (section) accessor. More... | |
Interface used to write to a multi-part container.
This interface is used to create a multi-part PvBuffer than can be transmitted using PvSoftDeviceGEV. A multi-part buffer would typically be prepared for transmission by:
Adding parts with this interface only creates the part definition in the part index of the container. Memory then needs to be allocated or attached for all parts. Make sure to call Validate after defining the parts and allocating or attaching memory to make sure the multi-part container is properly setup.
You can either have no data chunk part of one chunk part and that part needs to be the last part. Use The IPvChunkData interface to the section to define the chunk data and confirm the chunk length using SetPartFinalLength to confirm the chunk data length.
See SoftGEVDeviceMultiPart C++ eBUS SDK sample for more information.
GigE Vision restricts the maximum part count to 10. This limitation comes from the part index size in the context of the maximum GVSP header size.
|
pure virtual |
Adds a chunk data part to the index of a multi-part container.
The chunk data section is always last in a multi-part container. There can only be one chunk data section for a multi-part container. A chunk data section can contain one or more chunks.
[in] | aMaxLength | Maximum length for chunk data. |
[in] | aChunkLayoutID | Chunk layoud ID for the chunk data. |
|
pure virtual |
Adds an image part to the index of a multi-part container.
Calling this method only defines a new image in the multi-part container index. Memory needs to be allocated or attached using the AllocAllParts, AllocPart or AttachPart methods.
The height is initially defined as maximum height. It is possible to later call SetPartFinalImageHeight to confirm the effective height of the image, as long as the confirmed height is less or equal to the maximum height defined here. This allows linescan-like scenario where the final height of the image is not known when the image part is defined and its memory allocated or attached.
[in] | aDataType | Image data type. Must be between PvMultiPart2DImage and PvMultiPartConfidenceMap, inclusive. |
[in] | aWidth | Width of the image, in pixels. |
[in] | aMaxHeight | Height of the image, in pixels. |
[in] | aPixelType | Pixel type of the image. |
[in] | aOffsetX | Offset X of the image, in pixels. |
[in] | aOffsetY | Offset Y of the image, in pixels. |
[in] | aPaddingX | Padding X of the image, in bytes. |
|
pure virtual |
Adds a JPEG part to the index of a multi-part container.
Calling this method only defines a new JPEG image in the multi-part container index. Memory needs to be allocated or attached using the AllocAllParts, AllocPart or AttachPart methods.
The length is initially defined as maximum length, in bytes. It is possible to later call SetPartFinalLength to confirm the effective length of the compressed image, as long as the confirmed length is less or equal to the maximum length defined here. This allows reserving memory for the worse-case compression scenario and defining the real compressed image length when putting the part together before transmission.
[in] | aDataType | Multi-part data type. Either PvMultiPartJPEGImage or PvMultiPartJPEG2000Image. |
[in] | aMaxLength | Maximum length for the compressed image. Defined here as worse-case compression, exact size later confirmed with SetPartFinalLength. |
[in] | aFlag | JPEG flags. |
[in] | aTimestampTickFrequency | Timestamp tick frequency. Can be used with JPEG2000 to turn buffer timestamp into real time units. |
[in] | aDataFormat | JPEG data format. |
|
pure virtual |
Allocates memory for all parts defined by the part index of the multi-part container.
With this method all parts are allocated as a single contiguous memory buffer.
Memory is allocated based on each parts definition: image size is inferred from width, max height, pixel format and padding X. JPEG from the maximum length. Chunk from the maximum chunk length.
If memory was allocated for all parts or individual parts, it is freed before being re-allocated. If memory was attached for any part, it is simply detached.
|
pure virtual |
Allocates memory for one of the parts as defined by the index of the part.
If memory has been previously allocated for all parts, new memory for this part alone is allocated and used instead. Unused memory for the part is still reserved in the contiguous buffer.
Memory is allocated based on each parts definition: image size is inferred from width, max height, pixel format and padding X. JPEG from the maximum length. Chunk from the maximum chunk length.
aIndex | [in] Zero-based index of the part. |
|
pure virtual |
Attaches a part to an external memory buffer.
If memory has been previously allocated for all parts, new memory for this part alone is attached and used instead. Unused memory for the part is still reserved in the contiguous buffer.
aIndex | [in] Zero-based index of the part. |
aBuffer | [in] Pointer to the external memory buffer. |
aLength | [in] Length of the external memory buffer to attach. |
|
pure virtual |
Sets the final height of an image part.
Used to confirm final height of image parts. If this method is not called, the image height is assumed to be the full maximum image height as defined in AddImagePart.
See AddImagePart for more information.
aIndex | [in] Zero-based index of the part. |
aHeight | [in] Final height of the part. |
|
pure virtual |
Sets the final length of a part.
Used to confirm final length of JPEG and chunk data parts. If this method is not called, the part length is assumed to be the full maximum part length as defined in AddJPEGPart or AddChunkPart.
See AddJPEGPart and AddChunkPart for more information.
aIndex | [in] Zero-based index of the part. |
aLength | [in] aLength Final length of the part. |
|
pure virtual |
Sets the source, data purpose and region IDs of a part.
See IPvMultiPartSection for more information about these IDs.
If this method is not called after adding a part to the multi-part container index, all IDs are zero.
aIndex | [in] Zero-based index of the part. |
aSourceID | [in] Source ID to assign to the part |
aDataPurposeID | [in] Data purpose ID to assign to the part. |
aRegionID | [in] Region ID to assign to the part. |
|
pure virtual |
Sets the zone info of a part.
See IPvMultiPartSection for more information about zone info.
If this method is not called after adding a part to the multi-part container index, the number of additional zones and direction mask are both set to zero.
aIndex | [in] Zero-based index of the part. |
aAdditionalZones | [in] Number of additional zones for this part. |
aZoneDirectionMask | [in] Zone direction of for all zones of this part. |
|
pure virtual |
Validates the part index and allocated/attached part memory.
This method goes through all parts defined in the part index of this container and makes sure that enough memory is allocated or attached to each individual part. It can also fail if not part has been defined.
Copyright (c) 2002-2021 Pleora Technologies Inc.
www.pleora.com