9 #include <PvPipeline.h> 16 typedef std::list<PvBuffer *> PvBufferList;
19 class IVideoInfoHeader;
30 public IAMStreamConfig,
36 STDMETHODIMP QueryInterface( REFIID riid,
void **ppv );
37 STDMETHODIMP_(ULONG) AddRef() {
return GetOwner()->AddRef(); }
38 STDMETHODIMP_(ULONG) Release() {
return GetOwner()->Release(); }
41 STDMETHODIMP Notify( IBaseFilter * pSender, Quality q );
44 HRESULT STDMETHODCALLTYPE SetFormat( AM_MEDIA_TYPE *pmt );
45 HRESULT STDMETHODCALLTYPE GetFormat( AM_MEDIA_TYPE **ppmt );
46 HRESULT STDMETHODCALLTYPE GetNumberOfCapabilities(
int *piCount,
int *piSize );
47 HRESULT STDMETHODCALLTYPE GetStreamCaps(
int iIndex, AM_MEDIA_TYPE **pmt, BYTE *pSCC );
50 HRESULT STDMETHODCALLTYPE Set( REFGUID guidPropSet, DWORD dwID,
void *pInstanceData, DWORD cbInstanceData,
void *pPropData, DWORD cbPropData );
51 HRESULT STDMETHODCALLTYPE Get( REFGUID guidPropSet, DWORD dwPropID,
void *pInstanceData,DWORD cbInstanceData,
void *pPropData, DWORD cbPropData, DWORD *pcbReturned );
52 HRESULT STDMETHODCALLTYPE QuerySupported( REFGUID guidPropSet, DWORD dwPropID, DWORD *pTypeSupport );
58 HRESULT FillBuffer( IMediaSample *pms );
59 HRESULT DecideBufferSize( IMemAllocator *pIMemAlloc, ALLOCATOR_PROPERTIES *pProperties );
60 HRESULT CheckMediaType(
const CMediaType *pMediaType );
61 HRESULT GetMediaType(
int iPosition, CMediaType *pMediaType );
62 HRESULT SetMediaType(
const CMediaType *pmt );
64 HRESULT OnThreadCreate(
void );
65 HRESULT OnThreadDestroy(
void);
66 HRESULT OnThreadStartPlay(
void);
68 HRESULT StartAcquisition();
69 HRESULT StopAcquisition();
71 HRESULT Save(
PvString &aContent,
bool aBasic =
false );
72 HRESULT Load(
const PvString &aContent,
bool aBasic =
false );
73 HRESULT LoadDefault();
77 void CopyImage(
PvBuffer *aBuffer, BYTE *pData );
78 void DrawText( BYTE *pData,
const std::wstring &aText );
79 void OutputDiagnostics( BYTE *pData );
81 IVideoInfoHeader *AllocPVIFrom(
const CMediaType *aMediaType );
83 HRESULT GetRole(
int &aValue )
const { aValue = mRole;
return NOERROR; }
84 HRESULT SetRole(
int aValue ) { mRole = aValue;
return NOERROR; }
85 HRESULT GetUnicastPort(
int &aValue )
const { aValue = mUnicastPort;
return NOERROR; }
86 HRESULT SetUnicastPort(
int aValue ) { mUnicastPort = aValue;
return NOERROR; }
87 HRESULT GetMulticastIP( std::wstring &aValue )
const { aValue = mMulticastIP;
return NOERROR; }
88 HRESULT SetMulticastIP(
const std::wstring &aValue ) { mMulticastIP = aValue;
return NOERROR; }
89 HRESULT GetMulticastPort(
int &aValue )
const { aValue = mMulticastPort;
return NOERROR; }
90 HRESULT SetMulticastPort(
int aValue ) { mMulticastPort = aValue;
return NOERROR; }
91 HRESULT DisconnectDevice();
92 HRESULT ConnectIfNeeded();
94 HRESULT GetDiagnosticEnabled(
bool &aValue )
const { aValue = mDiagnosticEnabled;
return NOERROR; }
95 HRESULT SetDiagnosticEnabled(
bool aValue );
97 HRESULT GetDeviceID( std::wstring &aValue )
const { aValue = mDeviceID;
return NOERROR; }
98 HRESULT SetDeviceID(
const std::wstring &aValue );
99 HRESULT GetSourceCount(
int &aValue );
100 HRESULT GetSourceName(
int aIndex, std::wstring &aValue );
101 HRESULT GetSource( std::wstring &aValue )
const { aValue = mSource;
return NOERROR; }
102 HRESULT SetSource(
const std::wstring &aValue );
103 HRESULT GetChannel(
int &aValue )
const { aValue = mChannel;
return NOERROR; }
104 HRESULT SetChannel(
int aValue ) { mChannel = aValue;
return NOERROR; }
106 HRESULT GetBufferCount(
int &aValue )
const { aValue = mBufferCount;
return NOERROR; }
107 HRESULT SetBufferCount(
int aValue ) { mBufferCount = aValue;
return NOERROR; }
108 HRESULT GetDefaultBufferSize(
int &aValue )
const { aValue = mDefaultBufferSize;
return NOERROR; }
109 HRESULT SetDefaultBufferSize(
int aValue ) { mDefaultBufferSize = aValue;
return NOERROR; }
110 HRESULT GetDropThreshold(
int &aValue )
const { aValue = mDropThreshold;
return NOERROR; }
111 HRESULT SetDropThreshold(
int aValue ) { mDropThreshold = aValue;
return NOERROR; }
112 HRESULT GetWidth(
int &aValue )
const { aValue = mWidth;
return NOERROR; }
113 HRESULT SetWidth(
int aValue );
114 HRESULT GetHeight(
int &aValue )
const { aValue = mHeight;
return NOERROR; }
115 HRESULT SetHeight(
int aValue );
116 HRESULT GetAverageFPS(
int &aValue )
const { aValue = mAverageFPS;
return NOERROR; }
117 HRESULT SetAverageFPS(
int aValue );
119 HRESULT GetParametersSelector(
int &aValue )
const { aValue = mParameterSelector;
return NOERROR; }
120 HRESULT SetParametersSelector(
int aValue );
121 HRESULT GetParametersAvailable(
bool &aValue )
const;
122 HRESULT GetParameterCount(
int &aValue );
123 HRESULT GetParameterName(
int aIndex, std::wstring &aValue );
124 HRESULT GetParameterCategory(
const std::wstring &aName, std::wstring &aValue );
125 HRESULT GetParameterValue(
const std::wstring &aName, std::wstring &aValue );
126 HRESULT SetParameterValue(
const std::wstring &aName,
const std::wstring &aValue, std::wstring &aMessage );
127 HRESULT GetParameterType(
const std::wstring &aName, std::wstring &aType );
128 HRESULT GetParameterAccess(
const std::wstring &aName,
bool &aAvailable,
bool &aReadable,
bool &aWritable );
129 HRESULT ParameterExecute(
const std::wstring &aName, std::wstring &aMessage );
130 HRESULT GetParameterPossibleValueCount(
const std::wstring &aName,
int &aCount );
131 HRESULT GetParameterPossibleValue(
const std::wstring &aName,
int aIndex, std::wstring &aValue );
132 HRESULT GetParameterVisibility(
const std::wstring &aName,
int &aVisibility );
134 LONGLONG GetImageCount()
const {
return mImageCount; }
135 LONGLONG GetImageDroppedCount()
const {
return mImageDroppedCount; }
136 int GetLastImageSize()
const {
return mLastImageSize; }
138 HRESULT MakeDefault();
139 HRESULT ResetDefault();
140 HRESULT GetDefaultSummary( std::wstring &aSummary ) { aSummary = mDefaultSummary;
return NOERROR; }
150 std::wstring mActiveDeviceID;
151 std::wstring mActiveSource;
153 int mActiveUnicastPort;
154 std::wstring mActiveMulticastIP;
155 int mActiveMulticastPort;
160 int mLastImageHeight;
164 REFERENCE_TIME mReferenceTime;
165 REFERENCE_TIME mLastTime;
166 LONGLONG mImageCount;
167 LONGLONG mImageDroppedCount;
174 std::wstring mLastWarning;
178 std::wstring mMulticastIP;
180 bool mDiagnosticEnabled;
181 std::wstring mDeviceID;
182 std::wstring mSource;
185 int mDefaultBufferSize;
187 std::wstring mDefaultSummary;
189 int mParameterSelector;
193 PtUtilsLib::Logger *mLogger;
194 ULONG_PTR mGdiplusToken;
196 IReferenceClock *mClock;
198 bool mClearOutputFlag;
Receive data from a GigE Vision or USB3 Vision transmitter.
Definition: PvStream.h:38
Helper class for receiving data from a GigE Vision or USB3 Vision transmitter.
Definition: PvPipeline.h:22
Used to convert a PvBuffer to another pixel type.
Definition: PvBufferConverter.h:28
String class.
Definition: PvString.h:21
Result information.
Definition: PvResult.h:13
Definition: PvDeviceAdapter.h:16
Definition: PvDSStream.h:28
Represents a block of GigE Vision or USB3 Vision data in memory.
Definition: PvBuffer.h:37
GenICam feature array.
Definition: PvGenParameterArray.h:38
Definition: PvDSSource.h:12
Connect, configure and control a GigE Vision or USB3 Vision device.
Definition: PvDevice.h:31