Pleora Technologies Inc. eBUS SDK v7.0.1.7536 API



IPvSWStreamingChannelSource Class Referenceabstract

Public Member Functions

virtual ~IPvSWStreamingChannelSource ()
 Virtual destructor.
 
virtual PvBufferAllocBuffer ()=0
 Request by the PvSoftDeviceGEV to allocate a PvBuffer. More...
 
virtual void FreeBuffer (PvBuffer *aBuffer)=0
 Request by the PvSoftDeviceGEV to free or release a buffer allocated with AllocBuffer. More...
 
virtual PvResult GetTxNumBuffersToUse (uint32_t &aNumBuffer)=0
 This method is requested by PvSoftDeviceGEV to limit the number of buffers used by the transmitter. It will be called before MySource->OnStreamingStart(). To specify a different number of buffers, override this method in your source and return an integer value aNumBuffer. More...
 
virtual PvResult QueueBuffer (PvBuffer *aBuffer)=0
 Request by the PvSoftDeviceGEV to queue a buffer for acquisition. More...
 
virtual PvResult RetrieveBuffer (PvBuffer **aBuffer)=0
 Request by the PvSoftDeviceGEV to retrieve a buffer from the streaming source. More...
 
virtual void AbortQueuedBuffers ()=0
 Request by the PvSoftDeviceGEV to abort all buffers queued for acquisition. More...
 
- Public Member Functions inherited from IPvStreamingChannelSource
virtual ~IPvStreamingChannelSource ()
 Virtual destructor.
 
virtual uint32_t GetWidth () const =0
 Returns the current image width. More...
 
virtual uint32_t GetHeight () const =0
 Returns the current image height. More...
 
virtual uint32_t GetOffsetX () const =0
 Returns the current image offset X. More...
 
virtual uint32_t GetOffsetY () const =0
 Returns the current image offset Y. More...
 
virtual PvPixelType GetPixelType () const =0
 Returns the current pixel type. More...
 
virtual void GetWidthInfo (uint32_t &aMin, uint32_t &aMax, uint32_t &aInc) const =0
 Returns the stream channel width attributes. More...
 
virtual void GetHeightInfo (uint32_t &aMin, uint32_t &aMax, uint32_t &aInc) const =0
 Returns the stream channel height attributes. More...
 
virtual uint32_t GetChunksSize () const =0
 Gets the stream channel chunk size attributes. More...
 
virtual uint32_t GetPayloadSize () const =0
 Stream channel payload size in bytes. Return zero to have it inferred from width, height and pixel format. More...
 
virtual PvScanType GetScanType () const =0
 Returns the scan type that is used by the streaming source. More...
 
virtual bool GetChunkModeActive () const =0
 Indicates whether the current master chunk mode is active. More...
 
virtual bool GetChunkEnable (uint32_t aChunkID) const =0
 Returns the current chunk enabled state. More...
 
virtual PvResult GetSupportedPixelType (int aIndex, PvPixelType &aPixelType) const =0
 Obtains an index of supported pixel types. Used at PvSoftDeviceGEV::Start time to create the GenICam XML of the device. More...
 
virtual PvResult GetSupportedChunk (int aIndex, uint32_t &aID, PvString &aName) const =0
 Returns the indexed supported chunk type. Used at PvSoftDeviceGEV::Start time to create the GenICam XML of the device. More...
 
virtual PvResult GetGevSCPSPacketSizeInfo (uint32_t &aMax) const
 Get the customized max value for GevSCPSPacketSize. Used at PvSoftDeviceGEV::Start time to create the GenICam XML of the device. More...
 
virtual PvResult SetWidth (uint32_t aWidth)=0
 Request from the PvSoftDeviceGEV to change the image width. More...
 
virtual PvResult SetHeight (uint32_t aHeight)=0
 Request from the PvSoftDeviceGEV to change the image height. More...
 
virtual PvResult SetOffsetX (uint32_t aOffsetX)=0
 Request from the PvSoftDeviceGEV to change the image offset X. More...
 
virtual PvResult SetOffsetY (uint32_t aOffsetY)=0
 Request from the PvSoftDeviceGEV to change the image offset Y. More...
 
virtual PvResult SetPixelType (PvPixelType aPixelType)=0
 Request from the PvSoftDeviceGEV to change the image pixel type. More...
 
virtual PvResult SetChunkModeActive (bool aEnabled)=0
 Set the master chunk mode active state. More...
 
virtual PvResult SetChunkEnable (uint32_t aChunkID, bool aEnabled)=0
 Sets the chunk enabled state for a specific chunk type. More...
 
virtual void OnOpen (const PvString &aDestIP, uint16_t aDestPort)=0
 Notification from the PvSoftDeviceGEV that this streaming channel has been opened. More...
 
virtual void OnClose ()=0
 Notification from the PvSoftDeviceGEV that this streaming channel has been closed.
 
virtual void OnStreamingStart ()=0
 Notification that the GigE Vision controller has requested that the device start streaming on this channel.
 
virtual void OnStreamingStop ()=0
 Notification that the GigE Vision controller has requested that the device stop streaming on this channel.
 
virtual void CreateRegisters (IPvRegisterMap *aRegisterMap, IPvRegisterFactory *aFactory)
 When called, the streaming channel source should create its custom registers if they are needed. More...
 
virtual void CreateGenApiFeatures (IPvRegisterMap *aRegisterMap, IPvGenApiFactory *aFactory)
 When called, the streaming channel source should create its custom GenApi parameters if they are needed. More...
 
virtual bool IsPayloadTypeSupported (PvPayloadType aPayloadType)
 When called, the streaming source has to return whether the specificed payload type is supported or not. More...
 
virtual void SetMultiPartAllowed (bool aAllowed)
 Sets whether the streaming source is allowed or not, but not forced, to transmit multi-part data. More...
 
virtual void SetLargeLeaderTrailerEnabled (bool aEnabled, uint32_t aMaxMultiPartCount)
 Sets whether the streaming source which transmit multi-part data uses large data leader and trailer packets. More...
 
virtual PvResult SetTestPayloadFormatMode (PvPayloadType aPayloadType)
 When called, the streaming source has to ensure it can stream buffers of the specified payload type. More...
 

Member Function Documentation

◆ AbortQueuedBuffers()

virtual void IPvSWStreamingChannelSource::AbortQueuedBuffers ( )
pure virtual

Request by the PvSoftDeviceGEV to abort all buffers queued for acquisition.

This method should block until acquisition has been aborted or canceled for all buffers provided by QueueBuffer that have not yet been retrieved with RetrievedBuffer.

When this method returns, it should be possible to call RetrieveBuffer for all aborted buffers.

Implemented in PvStreamingChannelSourceDefault.

◆ AllocBuffer()

virtual PvBuffer* IPvSWStreamingChannelSource::AllocBuffer ( )
pure virtual

Request by the PvSoftDeviceGEV to allocate a PvBuffer.

On initialization, the PvSoftDeviceGEV will call this method, asking the application to allocate buffers that will be used for image acquisition and transmission. The application should return buffers until it has reached the desired number of buffers it wants to use for streaming and then return NULL.

The more buffers you use, the more buffers you can have queued in the application for image acquisition and the more buffers you can leave in the transmission output queue for packet resend. The downside of using more buffers is increased memory usage.

Buffers returned on AllocBuffer calls should be unique: you should not return the same buffer more than once.

A maximum of 64 buffers can be used by one streaming channel of the PvSoftDeviceGEV. If your application does not return NULL on the 64th buffer, AllocBuffer will not be called a 64th time.

Returns
Pointer to a new PvBuffer that can be used by the PvSoftDeviceGEV's acquisition manager.

Implemented in PvStreamingChannelSourceDefault.

◆ FreeBuffer()

virtual void IPvSWStreamingChannelSource::FreeBuffer ( PvBuffer aBuffer)
pure virtual

Request by the PvSoftDeviceGEV to free or release a buffer allocated with AllocBuffer.

You should not delete or free any PvBuffer provided by the AllocBuffer method. FreeBuffer will be called for each buffer created with AllocBuffer when PvSoftDeviceGEV::Stop is called.

Parameters
[in]aBufferBuffer to free.

Implemented in PvStreamingChannelSourceDefault.

◆ GetTxNumBuffersToUse()

virtual PvResult IPvSWStreamingChannelSource::GetTxNumBuffersToUse ( uint32_t &  aNumBuffer)
pure virtual

This method is requested by PvSoftDeviceGEV to limit the number of buffers used by the transmitter. It will be called before MySource->OnStreamingStart(). To specify a different number of buffers, override this method in your source and return an integer value aNumBuffer.

Typical Use Case: You may want to use different numbers of buffers for different frame rate or payload sizes during streaming. For example, if you have two scenarios requiring 40 and 8 buffers respectively, you must initialize your source buffer queue with 40 buffers. Then, inside this method returns 8 or 40 based on image size or frame rate .

Rules:

  • Allocate the maximum number of buffers you need during source initialization through AllocBuffer()
  • If using fewer buffers in one of the cases, then all buffers must be returned to transmitter through Source->RetrieveBuffer() at stream stop.
Parameters
[in]aNumBufferThe maximum number of buffers to be used by the transmitter. Valid range: 4 to number of buffer initialized.
Returns
Includes:

Implemented in PvStreamingChannelSourceDefault, and PvStreamingChannelSourceTrigger.

◆ QueueBuffer()

virtual PvResult IPvSWStreamingChannelSource::QueueBuffer ( PvBuffer aBuffer)
pure virtual

Request by the PvSoftDeviceGEV to queue a buffer for acquisition.

If the application can accept the buffer and queue it for image acquisition, it returns success. If the acquisition queue or pipeline is full, return a PvResult error code.

Parameters
[in]aBufferBuffer to queue for image acquisition.
Returns
Includes:

◆ RetrieveBuffer()

virtual PvResult IPvSWStreamingChannelSource::RetrieveBuffer ( PvBuffer **  aBuffer)
pure virtual

Request by the PvSoftDeviceGEV to retrieve a buffer from the streaming source.

During acquisition, buffers retrieved with this method will contain valid image data and are going to be transmitted using the GVSP protocol. This method is also used to retrieve queued buffers after calling AbortQueuedBuffers.

If no image is immediately available, we recommend that you wait until an image is available in this method to allow the acquisition thread to wait efficiently for a new image. If getting a new image can take a long time, your application should wait small chunks of time (10, 20, or 50 ms) to prevent deadlocking the acquisition thread and to allow the PvSoftDeviceGEV to stop streaming gracefully.

Parameters
[in]aBufferA pointer to a pointer to a buffer: set to a pointer to the PvBuffer being retrieved.
Returns
Includes:
  • PvResult::Code::OK if a buffer has been retrieved.
  • Any error code if there are currently no buffers available.

The documentation for this class was generated from the following file:

Copyright (c) 2002-2026 Pleora Technologies Inc.
www.pleora.com