Pleora Technologies Inc. eBUS SDK v6.2.8.5877 API



IPvDSSource Class Reference

COM interface to the eBUS SDK DirectShow Source filter, PvDSSource. More...

Public Member Functions

HRESULT get_Role (int *role)
 Filter role read method. More...
 
HRESULT put_Role (int role)
 Filter role write method. More...
 
HRESULT get_UnicastPort (int *port)
 Filter unicast port read method. More...
 
HRESULT put_UnicastPort (int port)
 Filter unicast port write method. More...
 
HRESULT get_MulticastIP (BSTR *ip)
 Filter multicast group IP address read method. More...
 
HRESULT put_MulticastIP (BSTR ip)
 Filter multicast group IP address write method. More...
 
HRESULT get_MulticastPort (int *port)
 Filter multicast group port read method. More...
 
HRESULT put_MulticastPort (int port)
 Multicast group port to join where the streaming data from the GigE Vision device is received with the multicast role. More...
 
HRESULT get_DiagnosticEnabled (BOOL *enabled)
 Filter diagnostic enabled read method. More...
 
HRESULT put_DiagnosticEnabled (BOOL enabled)
 Filter diagnostic enabled write method. More...
 
HRESULT get_DeviceID (BSTR *deviceid)
 Filter device ID read method. More...
 
HRESULT put_DeviceID (BSTR deviceid)
 Device ID write method. More...
 
HRESULT DisconnectDevice ()
 Disconnects the filter from the device. More...
 
HRESULT ConnectIfNeeded ()
 Connects the filter to the device. More...
 
HRESULT get_SourceCount (int *sourcecount)
 The number of sources that are available on the device that is currently being controlled. More...
 
HRESULT get_SourceName (int aIndex, BSTR *sourcename)
 Name of one of the sources of the currently-controlled device. More...
 
HRESULT get_Source (BSTR *source)
 Name of the source currently selected on the device read method. More...
 
HRESULT put_Source (BSTR source)
 Name of the source currently selected on the device write method. More...
 
HRESULT get_Channel (int *channel)
 Streaming channel read method. More...
 
HRESULT put_Channel (int channel)
 Streaming channel write method. More...
 
HRESULT get_BufferCount (int *count)
 Buffer count read method. More...
 
HRESULT put_BufferCount (int count)
 Buffer count write method. More...
 
HRESULT get_DefaultBufferSize (int *size)
 Default buffer size read method. More...
 
HRESULT put_DefaultBufferSize (int size)
 Default buffer size write method. More...
 
HRESULT get_DropThreshold (int *threshold)
 Drop threshold read method. More...
 
HRESULT put_DropThreshold (int threshold)
 Drop threshold write method. More...
 
HRESULT get_Width (int *width)
 Device width read method. More...
 
HRESULT put_Width (int width)
 Device width write method. More...
 
HRESULT get_Height (int *height)
 Device height read method. More...
 
HRESULT put_Height (int height)
 Device height write method. More...
 
HRESULT get_ParametersSelector (int *selector)
 Currently active GenICam interface read method. More...
 
HRESULT put_ParametersSelector (int selector)
 Currently active GenICam interface write method. More...
 
HRESULT get_ParametersAvailable (BOOL *available)
 Currently active GenICam interface availability method. More...
 
HRESULT get_ParameterCount (int *count)
 Currently active GenICam interface parameter count method. More...
 
HRESULT get_ParameterName (int index, BSTR *name)
 Name of the parameter at a specific index in the currently-selected GenICam interface. More...
 
HRESULT get_ParameterCategory (BSTR name, BSTR *category)
 Category of a parameter identified by its name for the currently-selected GenICam interface. More...
 
HRESULT get_ParameterValue (BSTR name, BSTR *value)
 Method used to read the value of a specific parameter as a string for the currently-selected GenICam interface. More...
 
HRESULT put_ParameterValue (BSTR name, BSTR value, BSTR *message)
 Method used to write the value of a specific parameter as a string for the currently-selected GenICam interface. More...
 
HRESULT get_ParameterType (BSTR name, BSTR *type)
 Type of a parameter identified by its name for the currently-selected GenICam interface. More...
 
HRESULT get_ParameterAccess (THIS_ BSTR name, BOOL *available, BOOL *readable, BOOL *writable)
 Current access mode for a parameter identified by its name for the currently-selected GenICam interface. More...
 
HRESULT ParameterExecute (BSTR name, BSTR *message)
 Executes a command parameter identified by its name for the currently-selected GenICam interface. More...
 
HRESULT get_ParameterPossibleValueCount (BSTR name, int *count)
 Count of possible values for an enum or Boolean parameter identified by its name for the currently-selected GenICam interface. More...
 
HRESULT get_ParameterPossibleValue (BSTR name, int index, BSTR *value)
 One of the possible values for an enum or Boolean parameter identified by its name for the currently-selected GenICam interface. More...
 
HRESULT get_ParameterVisibility (BSTR name, int *visibility)
 Visibility of a parameter identified by its name for the currently-selected GenICam interface. More...
 
HRESULT get_OutputPixelType (int *value)
 Output pixel type read method. More...
 
HRESULT put_OutputPixelType (int value)
 Output pixel type write method. More...
 
HRESULT get_KernelSize (int *value)
 Kernel size for hot pixel correction read method. More...
 
HRESULT put_KernelSize (int value)
 Kernel size for hot pixel correction write method. More...
 
HRESULT get_ZoomValue (int *value)
 Zoom factor read method. More...
 
HRESULT put_ZoomValue (int value)
 Zoom factor read method. More...
 
HRESULT get_OutputResolution (int &width, int &height)
 Gets the output resolution. More...
 
HRESULT put_OutputResolution (int width, int height)
 Sets the output resolution. More...
 

Detailed Description

COM interface to the eBUS SDK DirectShow Source filter, PvDSSource.

When you have instantiated a PvDSSource DirectShow filter, you can retrieve the IPvDSSource configuration interface by using QueryInterface on any interface of the object. Remember to always release interfaces when finished with them to avoid resource leaks.

The documentation of this interface assumes that you have a good understanding of DirectShow.

To configure (and use) the PvDSSource filter, you typically perform the following tasks:

  • Create the PvDSSource filter
  • Retrieve an IPvDSSource configuration interface from the PvDSSource filter
  • Configure the filter (select the device, set parameters, connect the device)
  • Instantiate your other DirectShow filters
  • Add your DirectShow filters to a DirectShow graph
  • Connect your DirectShow filters
  • Run your DirectShow graph

From prototyping, you can interact with the filter using GraphEdit by performing the following tasks:

  • Create the PvDSSource filter
  • Open the property pages of the PvDSSource filter
  • Configure the filter (select the device, set parameters, connect the device)
  • Instantiate other filters (display, video compressor, file writer, etc.)
  • Connect the filters
  • Run your DirectShow graph

It is important to connect the PvDSSource filter to the device BEFORE connecting it to other DirectShow filters. Doing so will adjust the filter width, height, and other key parameters that are expected to stay fixed by filters that you connect to your PvDSSource filter.

While the PvDSSource filter supports pin reconfiguration when its configuration changes, some filters may not handle configuration changes on the fly very well. We recommend that you set up your design to change the width and height of the source when it is not connected to another filter.

If you are using unicast or multicast mode (supported for GigE Vision devices only) you should set the width and the height of the PvDSSource filter (either manually or programmatically) before connecting it to other filters.

The GUID of the filter is defined as IID_IPvDSSource {7D692BC5-05D4-4032-A581-B7FA1C202825}. You can include it in your project through PvDSSourceUIDs.h or redefine it from this GUID.

You can look at the eBUS SDK DirectShowDisplay samples (available for C++ and C#) for examples of how to use the PvDSSource filter to link GigE Vision or USB3 Vision image streams to a DirectShow display.

Roles

The filter can be used in three different modes, or roles.

Control and Data Receiver Mode

The filter takes control of the device and receives images from the same device. This mode can be used with GigE Vision and USB3 Vision devices. To configure the filter for this mode, assign the device ID. With this mode, the filter is responsible for controlling when the device starts and stops streaming.

Unicast Mode

The filter is a data receiver that receives images from a GigE Vision device. The device is typically controlled by a PvDeviceGEV which can exist in the same process, a different process, or even a different computer. Some devices in autonomous streaming mode could also be used. To configure the filter for this mode, assign the device ID and unicast port. Make sure your device is configured to stream to your local interface on this port. With this mode, you are responsible of making sure the device starts and stops streaming. The filter is a passive receiver.

Multicast Mode

Similar to unicast mode. But instead of the data being sent to a unique IP address/port, the data is multicast to a group joined by the filter. With this mode, more than one DirectShow filter or GigE Vision receiver can listen in on transmitted images. To use this mode, assign the device ID, multicast group address, and port. Make sure your device is configured to stream to this multicast group. Just like the unicast mode, the filter is just a passive receiver: you are responsible of making sure it starts and stops streaming.

Persistence

The PvDSSource filter implements the IPersistStream COM interface. This lets you save the filter configuration to a DirectShow graph persistence file. When the file is read back, the filter is automatically configured and connected to the device it was using when its state was persisted. All filter configuration parameters are persisted. GenICam interfaces (communication, control, and stream) are also persisted, if applicable.

This lets the user save a graph state from GraphEdit. This capability can also be used programmatically using the DirectShow graph COM interface.

GenICam Interfaces

The filter exposes the GenICam interfaces of some internal components: the controller communication parameters (control mode), the device parameters (control mode), and the stream parameters (all modes).

The API for these GenICam interfaces has been simplified. It should be enough for basic control and statistic monitoring.

The parameter selector property is used to select which GenICam interface is being interacted with. With one GenICam interface selected it is possible to enumerate all parameters, retrieve properties, and get/set the parameter values using simple strings. This is as you would expect from the PvGenParameter or GenApi "to string" and "from string" capabilities, where the value of various parameter types is abstracted to simple strings.

As an example of what can be achieved using the GenICam interface of IPvDSSource, you can refer to the simplified GenICam browser of the PvDSSource filter, which uses only this API.

Member Function Documentation

HRESULT IPvDSSource::ConnectIfNeeded ( )

Connects the filter to the device.

Call this method to connect the filter to the device. Also call the method if already connected device has different configuration than previously set configuration. If the device needs to be connected in a different way, the device is first disconnected and then the connection is re-established.

The device that is connected is defined using put_DeviceID. How the device is connected is defined by put_Role and role-related parameters, the streaming channel, and/or the selected source.

Whenever the filter configuration changes in a way that can affect which device is connected or how the device is connected, you should call this method to make sure the changes are applied. put_DeviceID, put_Source, put_Channel, put_Role, put_UnicastPort, put_MulticastIP, put_MulticastPort can affect connectivity.

Returns
NOERROR on success.
HRESULT IPvDSSource::DisconnectDevice ( )

Disconnects the filter from the device.

Returns
NOERROR on success.
HRESULT IPvDSSource::get_BufferCount ( int *  count)

Buffer count read method.

See put_BufferCount.

Parameters
[out]countBuffer count.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_Channel ( int *  channel)

Streaming channel read method.

See put_Channel.

Parameters
[out]channelStreaming channel.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_DefaultBufferSize ( int *  size)

Default buffer size read method.

See put_DefaultBufferSize.

Parameters
[out]sizeDefault buffer size.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_DeviceID ( BSTR *  deviceid)

Filter device ID read method.

See put_DiagnosticEnabled.

Parameters
[out]deviceidFilter device ID.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_DiagnosticEnabled ( BOOL *  enabled)

Filter diagnostic enabled read method.

See put_DiagnosticEnabled.

Parameters
[out]enabledFilter diagnostic enabled state.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_DropThreshold ( int *  threshold)

Drop threshold read method.

See put_DropThreshold.

Parameters
[out]thresholdDrop threshold.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_Height ( int *  height)

Device height read method.

See get_Width, put_Width.

Parameters
[out]height,heightset on the device.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_KernelSize ( int *  value)

Kernel size for hot pixel correction read method.

See put_KernelSize.

Parameters
[out]value: 0, 3, 5 0: Hot pixel correction is turned off. 3 or 5: Level of smoothness employed to correct the hot pixels.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_MulticastIP ( BSTR *  ip)

Filter multicast group IP address read method.

See put_MulticastIP.

Parameters
[out]ipFilter multicast IP address.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_MulticastPort ( int *  port)

Filter multicast group port read method.

See put_MulticastPort.

Parameters
[out]portFilter multicast port.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_OutputPixelType ( int *  value)

Output pixel type read method.

See put_OutputPixelType.

Parameters
[out]value: 0 - RGB , 1 - YUV
Returns
NOERROR on success.
HRESULT IPvDSSource::get_OutputResolution ( int &  width,
int &  height 
)

Gets the output resolution.

If the output resolution is set, it will be used to negotiate with other filters. Default values for the output resolution are the same as the device's resolution, unless changed.

see # set_OutputResolution.

Parameters
[out]widthWidth of the output resolution.
[out]heightHeight of the output resolution.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_ParameterAccess ( THIS_ BSTR  name,
BOOL *  available,
BOOL *  readable,
BOOL *  writable 
)

Current access mode for a parameter identified by its name for the currently-selected GenICam interface.

Parameters
[in]nameName of the parameter.
[out]availableTrue if the parameter is currently available.
[out]readableTrue if the parameter is currently readable.
[out]writableTrue if the parameter is currently writable.
Returns
NOERROR on success
  • E_UNEXPECTED if the parameters are not available.
  • E_INVALIDARG if the parameter name is not found.
HRESULT IPvDSSource::get_ParameterCategory ( BSTR  name,
BSTR *  category 
)

Category of a parameter identified by its name for the currently-selected GenICam interface.

See PvGenParameterArray::GetCategory for more information.

Parameters
[in]nameName of the parameter.
[out]categoryCategory of the parameter.
Returns
NOERROR on success
  • E_UNEXPECTED if the parameters are not available.
  • E_INVALIDARG if the parameter name is not found.
HRESULT IPvDSSource::get_ParameterCount ( int *  count)

Currently active GenICam interface parameter count method.

Use this method to obtain how many parameters are available in the currently-selected GenICam interface of the filter. This method can be used to iterate through all of the GenICam parameters using get_ParameterName.

Parameters
[out]countParameter count of the currently-selected GenICam interface.
Returns
NOERROR on success
  • E_UNEXPECTED if the parameters are not available.
HRESULT IPvDSSource::get_ParameterName ( int  index,
BSTR *  name 
)

Name of the parameter at a specific index in the currently-selected GenICam interface.

Parameters
[out]indexIndex of the parameter.
[out]nameName of the parameter.
Returns
NOERROR on success, E_UNEXPECTED if the parameters are not available, E_INVALIDARG if the index is out of range.
HRESULT IPvDSSource::get_ParameterPossibleValue ( BSTR  name,
int  index,
BSTR *  value 
)

One of the possible values for an enum or Boolean parameter identified by its name for the currently-selected GenICam interface.

See get_ParameterPossibleValueCount.

Parameters
[in]nameName of the parameter.
[in]indexIndex of the possible value.
[out]valueRequested possible value.
Returns
NOERROR on success
  • E_UNEXPECTED if the parameters are not available.
  • E_INVALIDARG if the index is not valid.
  • E_UNEXPECTED if the parameter is not found or has values that are not possible.
HRESULT IPvDSSource::get_ParameterPossibleValueCount ( BSTR  name,
int *  count 
)

Count of possible values for an enum or Boolean parameter identified by its name for the currently-selected GenICam interface.

This method only applies to enum and Boolean parameters. It is typically used with get_ParameterPossibleValue to populate a combo box with all of the possible values that the parameter can take.

Parameters
[in]nameName of the parameter.
[out]countPossible value count.
Returns
NOERROR on success
  • E_UNEXPECTED if the parameters are not available.
HRESULT IPvDSSource::get_ParametersAvailable ( BOOL *  available)

Currently active GenICam interface availability method.

If the active/selected GenICam interface is:

  • 0: Device controller communication parameters: Evaluates to true if the device controller is instantiated.
  • 1: Device controller device parameters: Evaluates to true if the device controller is instantiated and connected.
  • 2: Stream object parameters and statistics: Evaluates to true if the stream object is opened.
Parameters
[out]availableTrue if the currently-selected GenICam interface is active.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_ParametersSelector ( int *  selector)

Currently active GenICam interface read method.

See put_ParametersSelector.

Parameters
[out]selectorCurrently active GenICam interface.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_ParameterType ( BSTR  name,
BSTR *  type 
)

Type of a parameter identified by its name for the currently-selected GenICam interface.

Possible values:

  • Integer
  • Enum
  • Boolean
  • String
  • Command
  • Float
  • Register
Parameters
[in]nameName of the parameter.
[out]typeString representing the parameter type.
Returns
NOERROR on success
  • E_UNEXPECTED if the parameters are not available.
  • E_INVALIDARG if the parameter name is not found.
HRESULT IPvDSSource::get_ParameterValue ( BSTR  name,
BSTR *  value 
)

Method used to read the value of a specific parameter as a string for the currently-selected GenICam interface.

See PvGenParameterArray::FromString for more information.

Parameters
[in]nameName of the parameter.
[out]valueValue of the parameter.
Returns
NOERROR on success
  • E_UNEXPECTED if the parameters are not available.
  • E_INVALIDARG if the parameter name is not found.
HRESULT IPvDSSource::get_ParameterVisibility ( BSTR  name,
int *  visibility 
)

Visibility of a parameter identified by its name for the currently-selected GenICam interface.

The visibility of the parameter is expressed as an integer:

  • 0: Beginner
  • 1: Expert
  • 2: Guru
  • 3: Invisible

See get_ParameterPossibleValueCount.

Parameters
[in]nameName of the parameter.
[out]visibilityVisibility of the parameter.
Returns
NOERROR on success
  • E_UNEXPECTED if the parameters are not available.
  • E_INVALIDARG if the parameter name is not found.
HRESULT IPvDSSource::get_Role ( int *  role)

Filter role read method.

See put_Role.

Parameters
[out]roleFilter role.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_Source ( BSTR *  source)

Name of the source currently selected on the device read method.

See put_Source.

Parameters
[out]sourceName of the active source.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_SourceCount ( int *  sourcecount)

The number of sources that are available on the device that is currently being controlled.

This parameter and get_SourceName can be used to retrieve all available sources and present the user with a list or combo box that they can use to select the active source.

See put_Source.

Parameters
[out]sourcecountThe number of sources available on the currently-controlled device.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_SourceName ( int  aIndex,
BSTR *  sourcename 
)

Name of one of the sources of the currently-controlled device.

See put_Source.

Parameters
[in]aIndexZero-based index of the source.
[out]sourcenameName of the source.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_UnicastPort ( int *  port)

Filter unicast port read method.

See put_UnicastPort.

Parameters
[out]portFilter unicast port.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_Width ( int *  width)

Device width read method.

The user can set the image format width using put_Width but this value can be adjusted automatically when the controlled device is connected or when the width is being changed on the controlled device.

See put_Width.

Parameters
[out]width,widthset on the device.
Returns
NOERROR on success.
HRESULT IPvDSSource::get_ZoomValue ( int *  value)

Zoom factor read method.

See put_ZoomValue.

Parameters
[out]value0,1,2,3,4,5,6,7,8,9, 0 means no zoom is applied.
Returns
NOERROR on success.
HRESULT IPvDSSource::ParameterExecute ( BSTR  name,
BSTR *  message 
)

Executes a command parameter identified by its name for the currently-selected GenICam interface.

Parameters
[in]nameName of the parameter.
[out]messageOn failure, contains the GenICam/GenApi error message.
Returns
NOERROR on success, E_UNEXPECTED if the parameters are not available, E_INVALIDARG if the parameter name is not found, E_FAIL if executing the command failed.
HRESULT IPvDSSource::put_BufferCount ( int  count)

Buffer count write method.

This parameter controls how many image buffers are used internally by the eBUS SDK PvDSSource filter when receiving data.

Setting the buffer count changes the effective buffer count immediately. ConnectIfNeeded must be called to apply the change.

Parameters
[in]countbuffer count.
Returns
NOERROR on success.
HRESULT IPvDSSource::put_Channel ( int  channel)

Streaming channel write method.

This parameter controls which streaming channel is used when receiving data with the unicast or multicast roles. It is not applicable with the controller and data receiver role when it is automatically configured.

We strongly recommended that you set this parameter when using the unicast or multicast roles. Streaming will still work if not defined, but packet resends may not work as expected if the channel is different than 0.

Setting the channel makes the new channel active immediately. ConnectIfNeeded must be called to apply the change.

Parameters
[in]channelStreaming channel.
Returns
NOERROR on success.
HRESULT IPvDSSource::put_DefaultBufferSize ( int  size)

Default buffer size write method.

This parameter defines the default buffer size used to allocate the internal image buffers when the filter cannot read the effective payload size on the device. This can happen if the device does not properly implement the GigE Vision standard (unexpected) or if the role is set to unicast or multicast and the device is not being controlled by the filter.

This parameter is used if the effective payload size cannot be obtained, every time the DirectShow filter graph is started.

If the buffers cannot be properly allocated and the default buffer size is not large enough to accommodate incoming images, the filter will automatically resize its internal buffers accordingly. However, some BUFFER_TOO_SMALL errors will be recorded and the first few images coming from the device will never be delivered.

Parameters
[in]sizeDefault buffer size.
Returns
NOERROR on success.
HRESULT IPvDSSource::put_DeviceID ( BSTR  deviceid)

Device ID write method.

The device ID is used to connect the device. For a GigE Vision device, provide the MAC or IP address of the device. For a USB3 Vision device, provide the GUID of the device. You can also use the PvDeviceInfo::GetConnectionID method if you are using PvSystem or PvDeviceFinderWnd to detect and select the device of interest.

The device is connected when the ConnectIfNeeded method is called. Changing the device ID does not connect the filter to a device, it is just stored for the next ConnectIfNeeded operation.

Parameters
[in]deviceidFilter device ID.
Returns
NOERROR on success.
HRESULT IPvDSSource::put_DiagnosticEnabled ( BOOL  enabled)

Filter diagnostic enabled write method.

When the diagnostic mode is enabled, statistics and other information about the state of the filter are drawn over the images output by the filter. This can help you diagnose why you are not getting images or why the images are not formatted as expected.

When the advanced "HotPixelCorrection" feature is enabled, diagnostic images for the hot pixel will be saved in the same binary folder as your application.

The images will be saved in a folder called "HotPixelDiagnostic". It contains compare_before_and_after.png and visual_map.png.

compare_before_and_after.png provides a comparison of the image, before and after hot pixel correction. visual_map.png provides a map of the corrected pixels. The white pixels indicate how many pixels have been corrected. This feature is impacted by the lighting in the room. In settings with lower lighting, you can get closer to the camera's actual hot pixels.

A "Pixel variation score" in percentage will be displayed on the screen. This value is calculated by subtracting the original image and the corrected image and applying a threshold. This score roughly predicts the number of pixels that got corrected in the final image.

The diagnostic is based on the resolution of the device, not the output resolution. To determine a suitable diagnostic, set the camera to a lower resolution (for example, 640 width and 480 height).

Parameters
[in]enabledFilter diagnostic enabled state.
Returns
NOERROR on success.
HRESULT IPvDSSource::put_DropThreshold ( int  threshold)

Drop threshold write method.

Threshold used by the filter to internally drop incoming images. The upstream filter(s) ask the source filter to deliver data at their own pace. If buffers keep arriving from the device to the PvDSSource filter, they accumulate without being delivered to the connected filters.

This parameter defines the threshold of ready images above which the filter will drop images until delivering an image when asked for one by the downstream filter.

Example: If you set the threshold to 4 and the downstream filter (display, compressor, etc.) asks for an image, but 7 images are available, the filter will drop the 3 oldest images before delivering.

While it is not ideal to drop images, when we use DirectShow as a source filter we do not control the rate at which the downstream filter asks for images. This parameter can be used to minimize latency.

Setting this parameter to 0 disables image dropping at the filter level.

If the filter runs out of available image buffer, images may be dropped internally at the acquisition pipeline level. It is also possible that if the device is not able to transmit images quickly enough, that images may be dropped at the device/grabber level as well. Counters on these three "drop" gates are available in the filter diagnostics.

Parameters
[in]thresholdDrop threshold.
Returns
NOERROR on success.
HRESULT IPvDSSource::put_Height ( int  height)

Device height write method.

See get_Width, put_Width.

Parameters
[in]height,heightset on the device.
Returns
NOERROR on success.
HRESULT IPvDSSource::put_KernelSize ( int  value)

Kernel size for hot pixel correction write method.

This parameter controls the kernel size of the hot pixel correction feature. Possible values are 0, 3, and 5. Setting this value to 0 disables hot pixel correction. Setting this value to 3 or 5 selects the level of smoothness for the correction.

Parameters
[in]value0, 3, 5.
Returns
NOERROR on success *E_INVALIDARG on setting values other than expected values.
HRESULT IPvDSSource::put_MulticastIP ( BSTR  ip)

Filter multicast group IP address write method.

Multicast group IP address to join where the streaming data from the GigE Vision device is received with the multicast role.

The user has to make sure the GigE Vision device is configured to send data to that multicast group. This is typically performed using the eBUS Player multicast mode (Tools > Setup) or the PvDeviceGEV::SetStreamDestination method.

The filter multicast group IP address is only considered when connecting the device with the role defined as multicast receiver for GigE Vision devices. The device is connected when the ConnectIfNeeded method is called.

This parameter is usually set in pair with put_MulticastPort.

Parameters
[in]ipFilter multicast IP address.
Returns
NOERROR on success.
HRESULT IPvDSSource::put_MulticastPort ( int  port)

Multicast group port to join where the streaming data from the GigE Vision device is received with the multicast role.

The user has to make sure the GigE Vision device is configured to send data to that multicast group. This is typically performed using the eBUS Player multicast mode (Tools > Setup) or the PvDeviceGEV::SetStreamDestination method.

The filter multicast group port is only considered when connecting the device with the role defined as multicast receiver for GigE Vision devices. The device is connected when the ConnectIfNeeded method is called.

This parameter is usually set in pair with put_MulticastIP.

Parameters
[in]portFilter unicast port.
Returns
NOERROR on success.
HRESULT IPvDSSource::put_OutputPixelType ( int  value)

Output pixel type write method.

This parameter controls the output pixel type from the source filter. 0: RGB 1: YUV

Parameters
[in]value0(RGB) or 1(YUV).
Returns
NOERROR on success *E_INVALIDARG on setting values other than expected values.
HRESULT IPvDSSource::put_OutputResolution ( int  width,
int  height 
)

Sets the output resolution.

If the output resolution is set, it will be used to negotiate with other filters. Default values for the output resolution are the same as device's resolution, unless changed.

see # get_OutputResolution.

Parameters
[in]widthWidth of the output resolution.
[in]heightHeight of the output resolution. Width and height values must be greater than 0.
Returns
NOERROR on success. *E_FAIL on setting values other than expected values.
HRESULT IPvDSSource::put_ParametersSelector ( int  selector)

Currently active GenICam interface write method.

This method selects the active GenICam interface for the internal filter objects:

  • 0: The device controller communication parameters (controller and data receiver mode only).
  • 1: The device controller device parameters (controller and data receiver mode only).
  • 2: The stream object parameters and statistics.

All of the GenICam parameter operations are performed on the currently active/selected GenICam interface. The active GenICam interface is selecting using this method.

Parameters
[in]selectorCurrently active GenICam interface.
Returns
NOERROR on success
  • E_FAIL if out of range.
HRESULT IPvDSSource::put_ParameterValue ( BSTR  name,
BSTR  value,
BSTR *  message 
)

Method used to write the value of a specific parameter as a string for the currently-selected GenICam interface.

See PvGenParameterArray::ToString for more information.

Parameters
[in]nameName of the parameter.
[in]valueNew value of the parameter.
[out]messageOn failure, contains the GenICam/GenApi error message.
Returns
NOERROR on success
  • E_UNEXPECTED if the parameters are not available.
  • E_INVALIDARG if the parameter name is not found.
  • E_FAIL if the write operation failed.
HRESULT IPvDSSource::put_Role ( int  role)

Filter role write method.

The role of the filter can be:

  • 0: Controller and data receiver (supports GigE Vision and USB3 Vision)
  • 1: Unicast receiver (GigE Vision only)
  • 2: Multicast receiver (GigE Vision only)

The filter role is only considered when connecting the device. The device is connected when the ConnectIfNeeded method is called.

Parameters
[in]roleFilter role.
Returns
NOERROR on success.
HRESULT IPvDSSource::put_Source ( BSTR  source)

Name of the source currently selected on the device write method.

This parameter only applies to multi-sources devices. It should be left blank on devices that have a single source.

Setting the source makes the source active immediately. ConnectIfNeeded must be called to apply the change.

Parameters
[in]sourceName of the active source.
Returns
NOERROR on success.
HRESULT IPvDSSource::put_UnicastPort ( int  port)

Filter unicast port write method.

Unicast port where the streaming data from the GigE Vision device is received with the unicast role. A socket bound to the network interface that can reach the device is configured to listen for incoming images on that port.

The user has to make sure that the GigE Vision device is configured to send data to the IP address of that local interface and at that unicast port. This is typically performed using the eBUS Player unicast mode (Tools > Setup) or the PvDeviceGEV::SetStreamDestination method.

The filter unicast port is only considered when connecting the device with the role defined as a unicast receiver for GigE Vision devices. The device is connected when the ConnectIfNeeded method is called.

Parameters
[in]portFilter unicast port.
Returns
NOERROR on success.
HRESULT IPvDSSource::put_Width ( int  width)

Device width write method.

The width and height are usually managed automatically by the filter when connecting to a device that is being controlled (when the role is set to controller and data receiver).

If the filter is being used in a data receiver role (unicast or multicast) the width and height must be set by the user before using the filter. We strongly recommend that you set the width and height before connecting the PvDSSource filter to other filters.

Width/height mismatches can be debugged using the filter diagnostics. Typically if the configured image size is larger than what is received, the image data will be provided to the downstream filter in the upper-left corner with black bands on the right and bottom. If the configured image size is too small, black images will be output by the filter.

Parameters
[in]width,widthto be set on the device.
Returns
NOERROR on success.
HRESULT IPvDSSource::put_ZoomValue ( int  value)

Zoom factor read method.

Parameters
[in]value0,1,2,3,4,5,6,7,8,9, 0 means no zoom is applied. Any value > 9 will be ignored.
Returns
NOERROR on success.

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

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