Pleora Technologies Inc. eBUS SDK v6.2.8.5877 API



PvStreamingChannelSourceDefault.h
1 // *****************************************************************************
2 //
3 // Copyright (c) 2018, Pleora Technologies Inc., All rights reserved.
4 //
5 // *****************************************************************************
6 
7 #ifndef __PVSTREAMINGCHANNELSOURCEDEFAULT_H__
8 #define __PVSTREAMINGCHANNELSOURCEDEFAULT_H__
9 
10 #include <PvSoftDeviceGEVInterfaces.h>
11 
12 
13 class PV_VIRTUAL_DEVICE_API PvStreamingChannelSourceDefault
15 {
16 public:
17 
18  PvStreamingChannelSourceDefault( uint32_t aWidth = 640, uint32_t aHeight = 480, PvPixelType aPixelType = PvPixelMono8, size_t aBufferCount = 16 );
20 
21  virtual uint32_t GetWidth() const;
22  virtual uint32_t GetHeight() const;
23  virtual uint32_t GetOffsetX() const;
24  virtual uint32_t GetOffsetY() const;
25  virtual PvPixelType GetPixelType() const;
26  virtual void GetWidthInfo( uint32_t &aMin, uint32_t &aMax, uint32_t &aInc ) const;
27  virtual void GetHeightInfo( uint32_t &aMin, uint32_t &aMax, uint32_t &aInc ) const;
28  virtual uint32_t GetChunksSize() const;
29  virtual uint32_t GetPayloadSize() const;
30  virtual PvScanType GetScanType() const;
31  virtual bool GetChunkModeActive() const;
32  virtual bool GetChunkEnable( uint32_t aChunkID ) const;
33  virtual PvResult GetSupportedPixelType( int aIndex, PvPixelType &aPixelType ) const;
34  virtual PvResult GetSupportedChunk( int aIndex, uint32_t &aID, PvString &aName ) const;
35 
36  virtual PvResult SetWidth( uint32_t aWidth );
37  virtual PvResult SetHeight( uint32_t aHeight );
38  virtual PvResult SetOffsetX( uint32_t aOffsetX );
39  virtual PvResult SetOffsetY( uint32_t aOffsetY );
40  virtual PvResult SetPixelType( PvPixelType aPixelType );
41  virtual PvResult SetChunkModeActive( bool aEnabled );
42  virtual PvResult SetChunkEnable( uint32_t aChunkID, bool aEnabled );
43 
44  virtual void OnOpen( const PvString &aDestIP, uint16_t aDestPort );
45  virtual void OnClose();
46 
47  virtual void OnStreamingStart();
48  virtual void OnStreamingStop();
49 
50  virtual PvBuffer *AllocBuffer();
51  virtual void FreeBuffer( PvBuffer *aBuffer );
52 
53  virtual void AbortQueuedBuffers();
54 
55  virtual void CreateRegisters( IPvRegisterMap *aRegisterMap, IPvRegisterFactory *aFactory );
56  virtual void CreateGenApiFeatures( IPvRegisterMap *aRegisterMap, IPvGenApiFactory *aFactory );
57 
58  virtual bool IsPayloadTypeSupported( PvPayloadType aPayloadType );
59  virtual void SetMultiPartAllowed( bool aAllowed );
60  virtual PvResult SetTestPayloadFormatMode( PvPayloadType aPayloadType );
61 
62 private:
63 
64  size_t mBufferCount;
65  size_t mBufferAllocated;
66 
67  uint32_t mStaticWidth;
68  uint32_t mStaticHeight;
69  PvPixelType mStaticPixelType;
70 
71 };
72 
73 
74 #endif // __PVSTREAMINGCHANNELSOURCEDEFAULT_H__
PvResult
Result information.
Definition: PvResult.h:13
IPvStreamingChannelSource::SetWidth
virtual PvResult SetWidth(uint32_t aWidth)=0
Request from the PvSoftDeviceGEV to change the image width.
IPvRegisterMap
Register map interface for a software-based GigE Vision Device.
Definition: PvSoftDeviceGEVInterfaces.h:310
IPvStreamingChannelSource::GetSupportedPixelType
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 ...
IPvStreamingChannelSource::SetOffsetX
virtual PvResult SetOffsetX(uint32_t aOffsetX)=0
Request from the PvSoftDeviceGEV to change the image offset X.
PvStreamingChannelSourceDefault
A default implementation for the IPvStreamingSourceChannelSource interface.
Definition: PvStreamingChannelSourceDefault.h:13
IPvStreamingChannelSource::GetChunkModeActive
virtual bool GetChunkModeActive() const =0
Indicates whether the current master chunk mode is active.
IPvGenApiFactory
GenApi factory used to add custom GenApi parameters to a software-based GigE Vision Device GenICam XM...
Definition: PvSoftDeviceGEVInterfaces.h:325
IPvStreamingChannelSource::OnStreamingStop
virtual void OnStreamingStop()=0
Notification that the GigE Vision controller has requested that the device stop streaming on this cha...
IPvStreamingChannelSource::SetChunkModeActive
virtual PvResult SetChunkModeActive(bool aEnabled)=0
Set the master chunk mode active state.
IPvStreamingChannelSource::FreeBuffer
virtual void FreeBuffer(PvBuffer *aBuffer)=0
Request by the PvSoftDeviceGEV to free or release a buffer allocated with AllocBuffer.
IPvStreamingChannelSource::OnStreamingStart
virtual void OnStreamingStart()=0
Notification that the GigE Vision controller has requested that the device start streaming on this ch...
IPvStreamingChannelSource::GetOffsetX
virtual uint32_t GetOffsetX() const =0
Returns the current image offset X.
IPvStreamingChannelSource::SetChunkEnable
virtual PvResult SetChunkEnable(uint32_t aChunkID, bool aEnabled)=0
Sets the chunk enabled state for a specific chunk type.
IPvStreamingChannelSource::GetWidth
virtual uint32_t GetWidth() const =0
Returns the current image width.
IPvStreamingChannelSource::GetHeight
virtual uint32_t GetHeight() const =0
Returns the current image height.
IPvStreamingChannelSource::AbortQueuedBuffers
virtual void AbortQueuedBuffers()=0
Request by the PvSoftDeviceGEV to abort all buffers queued for acquisition.
IPvStreamingChannelSource::IsPayloadTypeSupported
virtual bool IsPayloadTypeSupported(PvPayloadType aPayloadType)
When called, the streaming source has to return whether the specificed payload type is supported or n...
Definition: PvSoftDeviceGEVInterfaces.h:219
PvString
String class.
Definition: PvString.h:21
IPvStreamingChannelSource::GetScanType
virtual PvScanType GetScanType() const =0
Returns the scan type that is used by the streaming source.
IPvStreamingChannelSource::GetChunksSize
virtual uint32_t GetChunksSize() const =0
Gets the stream channel chunk size attributes.
IPvStreamingChannelSource::CreateRegisters
virtual void CreateRegisters(IPvRegisterMap *aRegisterMap, IPvRegisterFactory *aFactory)
When called, the streaming channel source should create its custom registers if they are needed.
Definition: PvSoftDeviceGEVInterfaces.h:207
IPvStreamingChannelSource::OnClose
virtual void OnClose()=0
Notification from the PvSoftDeviceGEV that this streaming channel has been closed.
IPvRegisterFactory
Class used for register creation.
Definition: PvSoftDeviceGEVInterfaces.h:300
IPvStreamingChannelSource::SetOffsetY
virtual PvResult SetOffsetY(uint32_t aOffsetY)=0
Request from the PvSoftDeviceGEV to change the image offset Y.
PvPayloadType
PvPayloadType
GVSP payload type.
Definition: PvPayloadType.h:11
IPvStreamingChannelSource::SetTestPayloadFormatMode
virtual PvResult SetTestPayloadFormatMode(PvPayloadType aPayloadType)
When called, the streaming source has to ensure it can stream buffers of the specified payload type.
Definition: PvSoftDeviceGEVInterfaces.h:221
IPvStreamingChannelSource::OnOpen
virtual void OnOpen(const PvString &aDestIP, uint16_t aDestPort)=0
Notification from the PvSoftDeviceGEV that this streaming channel has been opened.
IPvStreamingChannelSource::GetPixelType
virtual PvPixelType GetPixelType() const =0
Returns the current pixel type.
IPvStreamingChannelSource::GetHeightInfo
virtual void GetHeightInfo(uint32_t &aMin, uint32_t &aMax, uint32_t &aInc) const =0
Returns the stream channel height attributes.
PvPixelType
PvPixelType
Definition: PvPixelType.h:53
PvPixelMono8
@ PvPixelMono8
Definition: PvPixelType.h:57
IPvStreamingChannelSource::SetHeight
virtual PvResult SetHeight(uint32_t aHeight)=0
Request from the PvSoftDeviceGEV to change the image height.
IPvStreamingChannelSource::AllocBuffer
virtual PvBuffer * AllocBuffer()=0
Request by the PvSoftDeviceGEV to allocate a PvBuffer.
IPvStreamingChannelSource::CreateGenApiFeatures
virtual void CreateGenApiFeatures(IPvRegisterMap *aRegisterMap, IPvGenApiFactory *aFactory)
When called, the streaming channel source should create its custom GenApi parameters if they are need...
Definition: PvSoftDeviceGEVInterfaces.h:213
IPvStreamingChannelSource::GetChunkEnable
virtual bool GetChunkEnable(uint32_t aChunkID) const =0
Returns the current chunk enabled state.
IPvStreamingChannelSource::GetSupportedChunk
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 X...
PvBuffer
Represents a block of GigE Vision or USB3 Vision data in memory.
Definition: PvBuffer.h:47
IPvStreamingChannelSource
Interface that is used by PvSoftDeviceGEV to query and report information from a streaming source imp...
Definition: PvSoftDeviceGEVInterfaces.h:151
IPvStreamingChannelSource::GetPayloadSize
virtual uint32_t GetPayloadSize() const =0
Stream channel payload size in bytes. Return zero to have it inferred from width, height and pixel fo...
IPvStreamingChannelSource::GetWidthInfo
virtual void GetWidthInfo(uint32_t &aMin, uint32_t &aMax, uint32_t &aInc) const =0
Returns the stream channel width attributes.
IPvStreamingChannelSource::SetPixelType
virtual PvResult SetPixelType(PvPixelType aPixelType)=0
Request from the PvSoftDeviceGEV to change the image pixel type.
IPvStreamingChannelSource::SetMultiPartAllowed
virtual void SetMultiPartAllowed(bool aAllowed)
Sets whether the streaming source is allowed or not, but not forced, to transmit multi-part data.
Definition: PvSoftDeviceGEVInterfaces.h:220
IPvStreamingChannelSource::GetOffsetY
virtual uint32_t GetOffsetY() const =0
Returns the current image offset Y.

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