VideoOS.Platform.Client.ImageViewerControl Class Reference

This class is deprecated. Windows Forms controls are no longer supported. Use ImageViewerWpfControl instead. This class is available in the Smart Client and the .Net Library.
It embeds and manages one ImageViewerControl with the following key functions:
More...

Inheritance diagram for VideoOS.Platform.Client.ImageViewerControl:

Public Types

enum  FPSRate { High = 1 , Medium = 2 , Low = 3 }
 Defines how recorder should transcode video frames. Used on the SetVideoResolutionAndFPS method. More...
 

Public Member Functions

void ClearOverlay (int id)
 Clear a specific overlay placed earlier. The id used during the SetOverlay() call is used in this method for clearing that overlay again.
 
void Close ()
 Should be called for the underlaying controls to clean up entirely.
 
virtual bool ConfigureOverlayText (bool enable)
 Controls how overlayed text is displayed for built-in messages. All built-in text messages are configured.
 
virtual bool ConfigureOverlayText (OverlayTextId textId, bool enable)
 Controls how overleyed text is displayed for built-in messages. The textId identifies the text / message being configured.
 
virtual bool ConfigureOverlayTextAndImage (bool enable, bool blank)
 Controls how overleyed text is displayed for built-in messages. All built-in text messages are configured.
 
virtual bool ConfigureOverlayTextAndImage (OverlayTextId textId, bool enable, bool blank)
 Controls how overleyed text is displayed for built-in messages. The textId identifies the text / message being configured.
 
void Connect ()
 This method will connect the recording server owning the camera.
The CameraFQID property must have been set, and the Initialize() method called before this method can be called.
 
void Disconnect ()
 Disconnect current session to the recording server.
Following this call, the CameraFQID can be changed and a new session be established by a call to the Connect() method.
 
void FireImageDisplayed (ImageDisplayedEventArgs e)
 Reserved for use by MIP layer.
 
void FireImageOrMaintInfoChanged ()
 Reserved for internal use.
 
void FireLiveStreamInformationEvent (LiveStreamInformationEventArgs e)
 Internally used to call on event LiveStreamInformationEvent.
 
void FireRecordedImageReceivedEvent (RecordedImageReceivedEventArgs e)
 Internally used to call on event RecordedImageReceivedEvent.
 
virtual Bitmap GetCurrentDisplayedImageAsBitmap ()
 Get the latest displayed Image including the overlays and privacy mask.
Note that if no image has been received from the server, a null is returned.
Important: If the returned Bitmap is used in a UserControl, like a PictureBox, the control will hold to the original Bitmap. This can cause issues when the original source of the Bitmap attempts to dispose it.
Recommendation is to create another Bitmap directly upon calling this method, when passing it on to a PictureBox.
 
virtual Bitmap GetCurrentDisplayedImageAsBitmap (bool digitalZoomOnly)
 Overloaded method to control if the original or the digital zoomed image is requested.
 
 ImageViewerControl ()
 
void Initialize ()
 Issue this method after the cameraFQID has been set to initialize the control.
 
virtual void PtzCenter (int refWidth, int refHeight, int centerX, int centerY, int zoom)
 Perform PTZ Center in the current mode. Either Digital zoom, PanoramicLens (Fisheye), or physical camera move.
 
virtual void SetCameraXml (UserContext userContext, String xml)
 No longer supported.
 
virtual void SetImageQuality (int percent)
 Standalone SDK only. Tell the Recording Server how much to compress each JPEG.

The value can be a number between 1..100.
Or one of the special values:
SuperHigh = 101
High = 102
Medium = 103
Low = 104

 
void SetOverlay (Bitmap bitmap, int id, bool keepAspectRatio, bool scaleWithDigitalZoom, bool scaleOverlay, double scaleFactor, DockStyle verticalDock, DockStyle horizontalDock, double absolutePosX, double absolutePosY)
 Place a Bitmap on top of the video being showed.
After the bitmap has been set, it will remain on top of all following displayed video.
The size of the bitmap can be any size that makes sense, when taking the quality into consideration. If a bitmap of e.g. (320,280) is used for creating the overlay, it can via the parameters be scaled up to the actual size of the video being displayed.
Note: It is invalid set scale to true, while placing an overlay with absolute positions.
Note: SetOverlay does not dispose the bitmap. It is up to the caller to call dispose when appropiate.
 
virtual short SetPlaybackFadeImageTime (int msBeforeFading)
 Sets the minimum millisecond distance to the closest image (at-or-before) before the displayed image is faded in browse mode.
Default value is 0, e.g. no fading.
 
virtual bool SetRenderingOptions (String xmlParameters)
 Sets specific options for how to render video. The xmlParameter is forwarded to the ImageViewer presentation control.
The document must have as its top element "<RenderingOptions>".
 
virtual void SetVideoQuality (int percent)
 Please use SetImageQuality.
 
virtual void SetVideoQuality (int smoothBufferSize, int CPUsToUtilize)
 Configure how decoding and display should work. This call represent the same functionality as the VideoQuality slider setup for a CameraViewItem.
The change will take effect the next time a camera session is established. The smoothBufferSize parameter should have value in the range 1..100, where 1 is the lowest allowable quality and 100 is the highest allowable quality. The value represent how much of the maximum allocated buffer is used.
When the smoothBufferSize is 0 - buffering will be turned off, and values will be the original defaults.
 
virtual void SetVideoResolutionAndFPS (Size resolution, FPSRate fpsRate)
 Standalone SDK only. The FPSRate will be used to tell the server what to transmit to this client.
For H.264, values of Medium and Low will be key-frames only.
For H.265, values of Medium and Low will be key-frames only.
For JPEG, a normal framerate of 25, will give 25 for High, 4 or 5 for medium, and 1 for low.
 
virtual void SetVideoResolutionAndFPS (Size resolution, int FPS)
 Obsolete.
 
virtual Guid ShapesOverlayAdd (List< Shape > overlayShapes, ShapesOverlayRenderParameters renderParameters)
 Method to add overlay shapes.
 
virtual void ShapesOverlayRemove (Guid id)
 
virtual bool ShapesOverlayUpdate (Guid id, List< Shape > overlayShapes)
 
virtual bool ShapesOverlayUpdate (Guid id, List< Shape > overlayShapes, ShapesOverlayRenderParameters renderParameters)
 
virtual bool ShapesOverlayUpdate (Guid id, ShapesOverlayRenderParameters renderParameters)
 
void StartBrowse ()
 In the Smart Client and the .Net library the default implementation will ensure that a ImageViewerControl will follow the mode of the MIP environment, e.g. change mode to Live/Browse as this mode is changed by the user.
In the Smart Client this means that it follows the normal rule for the window it resides on. The method should therefore only be used in the Smart Client if the control does not reside in a ViewItem. If it resides in a ViewItem, the SmartClient.ModeChangeCommand message should be used with EnvironmentManager.Instance.PostMessage/> instead.
In the .Net library the mode is controlled by your application by setting the EnvironmentManager.Mode property.

 
void StartLive ()
 In the Smart Client and the .Net library the default implementation will ensure that a ImageViewerControl will follow the mode of the MIP environment, e.g. change mode to Live/Browse as this mode is changed by the user.
In the Smart Client this means that it follows the normal rule for the window it resides on. The method should therefore only be used in the Smart Client if the control does not reside in a ViewItem. If it resides in a ViewItem, the SmartClient.ModeChangeCommand message should be used with EnvironmentManager.Instance.PostMessage/> instead.
In the .Net library the mode is controlled by your application by setting the EnvironmentManager.Mode property.

 
void StartSetup ()
 This will set the ImageViewer in setup mode. Avoid using this, as it is normally controlled by the Mode set in the EnvironmentManager.
 
void UpdateStates ()
 When some of the 'Enabled' properties have been changed, this method will check for any changes and carry them out on the UI.
 

Public Attributes

EventHandler ImageOrPaintInfoChanged
 Is fired when one of the these field has been changed: ImageSize, PaintSize, PaintLocation.
 

Protected Member Functions

override void Dispose (bool disposing)
 Clean up any resources being used.
 
virtual void OnKeyUpEvent (KeyEventArgs e)
 Internally used to call on event KeyUpEvent.
 
virtual void OnMiddleClickEvent (MouseEventArgs e)
 Internally used to call on event MiddleClickEvent.
 
virtual void OnMouseHoverEvent ()
 Internally used to call on event MouseHoverEvent.
 
virtual void OnMouseLeaveEvent ()
 Internally used to call on event MouseLeaveEvent.
 
virtual void OnMouseMoveEvent (MouseEventArgs e)
 Internally used to call on event MouseMoveEvent.
 
virtual void OnMouseScrollWheel (System.Windows.Forms.MouseEventArgs e)
 Internally used to call on event MouseScrollWheel.
 

Properties

virtual bool AdaptiveStreaming [get, set]
 Determine the stream resolution should be adapted based on the view size.
Only applicable in standalone SDK. In Smart Client adaptive streaming is controlled by the general Smart Client settings.
 
FQID CameraFQID [get, set]
 Identifies the camera that is to be displayed in the control.
This property needs to be set before the Initialize() method is called.
 
bool EnableBrowseMode [set]
 Defines if this ImageViewerControl should be enabled in Browse (Playback) mode.
If this property is false, the UserControl becomes disabled during Browse (Playback) mode.
Default is true.
 
virtual bool EnableDigitalZoom [get, set]
 Defines if this ImageViewerControl allow the user to perform digital zoom operations.

 
virtual bool EnableLiveStreamInformation [set]
 If you wish to receive the live stream XML information packages, set the LiveStreamInformationEvent up correctly and set this property to true.
 
bool EnableMiddleButtonClick [set]
 Defines if a 3-button mouse can use the middle button as a zoom out completely command.
Default is false.
 
bool EnableMouseControlledPtz [set]
 Defines if mouse controlled PTZ should be possible. When set to true, the user can use click on video to do center-to-click, and the user can also right click and open a square of an area to zoom to.
Default is false.
 
virtual bool EnableMousePtzEmbeddedHandler [get, set]
 Defines if mouse controlled PTZ should be handled automatically by this component.
When set to true, the user actions will be handled automatically and no Messages or events will be issued to this class, but will be forwarded to the recording server that again will send to the camera.
When set to false, the user selection will be send to the MIP Plugin or application via MIP Messages. Default is true. (Note: This default was false in 2014 version).
 
virtual bool EnableNextImageReceivedEvent [set]
 Not implemented, see ImageDisplayedEvent.
 
bool EnableRecordedImageDisplayedEvent [set]
 If you want to receive an event when a recorded image is received, set the RecordedImageReceivedEvent correctly and set this property to true.
 
bool EnableScrollWheel [set]
 Defines is mouse wheel can control the zoom level for the camera.
Default is false.
 
bool EnableSetupMode [set]
 Defines if this ImageViewerControl should be enabled in Setup mode.
If this property is false, the UserControl becomes disabled during Setup mode.
Default is true.
 
bool EnableSmartSearch [set]
 Deprecated. Do not use.
 
virtual bool EnableVisibleCameraName [get, set]
 Defines if the name of the camera is displayed in the header line. Default is true.
 
virtual bool EnableVisibleHeader [get, set]
 Defines if the blue header is displayed or not. Default is true.
 
virtual bool EnableVisibleLiveIndicator [get, set]
 Defines if the blinking green live indicator and the red motion indicator is visible. Default is true.
 
virtual bool EnableVisibleTimeStamp [get, set]
 Defines if the timestamps should be shown in the top line during playback.
 
bool Hidden [get, set]
 When another ViewItem is maximized, this property is set to true.
 
Size ImageSize [get, set]
 Contains the size of the original image before it was scaled to available display area.
 
String InfoText [set]
 Used for displaying a text when the ImageViewer ImageViewer is NOT shown. When the ShowImageViewer is set to false, the text stored in the InfoText field will be displayed.
The text is displayed in Color.Black on a transparent background.
 
virtual bool MaintainImageAspectRatio [get, set]
 Flag to instruct the presentation of the video to be displayed with the original aspect ratio (Default), or to fill the entire viewable area.
 
bool Maximized [get, set]
 Defines if this ImageViewerControl is currently in a Maximized ViewItem.
This property cannot be used to maximize a ViewItem, use a SendMessage for that.
 
Point PaintLocation [get, set]
 Contains the location of actual image within this usercontrol.
 
Size PaintSize [get, set]
 Contains the size of the areas used for video.
 
virtual FQID PlaybackControllerFQID [get, set]
 Defines which PlaybackController is controlling this ImageViewer in Playback mode. The FQID used here is returned by the ClientControl.GeneratePlaybackController() method.

 
bool Selected [get, set]
 Define if this ImageViewerControl is in the currently selected ViewItem.
When set to true, the top bar of the ImageViewerControl will change color to a brighter color.
This property cannot be used in the SMart Client to select your own ImageViewerControl, use a SendMessage for that.
 
bool ShowImageViewer [get, set]
 This property can be used to control if the ImageViewer should be shown or not.
This can for example be used to hide the ImageViewer when there is no camera defined yet.
When the ImageViewer is not shown, the InfoText field is displayed instead.
 
virtual bool ShowInitialImage = true [get, set]
 Determine whether to send an initial image before the stream is started AND
control how the "Camera feed has stopped" message is displayed
Only applicable in standalone SDK.
 
virtual Guid StreamId [get, set]
 Identifies which stream to use.
Use the StreamDataSource class to get a list of available streams. Note that multiple stream support is obly available on some Milestone products.
 
bool SuppressUpdateOnMotionOnly [set]
 Reserved for future use.
 
virtual bool UsingMulticast [get, set]
 Indicates if the video is received from the recording server via multicast.
 

Events

EventHandler ClickEvent
 Register here to receive unused click events The args is MouseEventArgs (from version MIPSDK 5.1.1)
 
ConnectResponseEventHandler ConnectResponseEvent
 Register on this event to be called when a connection has completed.
 
EventHandler DoubleClickEvent
 Register here to receive unused double click events The args is MouseEventArgs (from version MIPSDK 5.1.1)
 
ImageDisplayedHandler ImageDisplayedEvent
 Called for every image being displayed, exactly when it is presented to the operator.
The method registered on this event MUST be VERY short.
 
EventHandler ImageReceivedEvent
 Not implemented, see ImageDisplayedEvent.
 
virtual KeyEventHandler KeyUpEvent
 Get the KeyUpEvent.
 
virtual LiveStreamInformationHandler LiveStreamInformationEvent
 Register on this event to be called when the live stream XML information is available.
Remember to also set the EnableLiveStreamInformation to true;.
 
virtual MouseEventHandler MiddleClickEvent
 Register here to receive unused middle click events The args is MouseEventArgs (from version MIPSDK 5.1.1)
 
virtual EventHandler MouseHoverEvent
 Is called when mouse is hovering over the control.
 
virtual EventHandler MouseLeaveEvent
 Is called when mouse is leaving the control.
 
virtual MouseEventHandler MouseMoveEvent
 Called continuously when mouse is over control and moving. The args is MouseEventArgs.
 
virtual MouseEventHandler MouseScrollWheelEvent
 Called continuously when mouse scroll wheel is used. Remember to set EnableScrollWheel to true. The args is MouseEventArgs.
 
virtual RecordedImageReceivedHandler RecordedImageReceivedEvent
 Register on this event to be called when a recorded image has been received.
Remember to also set the EnableRecordedImageDisplayedEvent to true;.
 
EventHandler RightClickEvent
 Register here to receive unused right click events The args is MouseEventArgs (from version MIPSDK 5.1.1)
 

Detailed Description

This class is deprecated. Windows Forms controls are no longer supported. Use ImageViewerWpfControl instead. This class is available in the Smart Client and the .Net Library.
It embeds and manages one ImageViewerControl with the following key functions:

  • separates the display component and version from your implementation
  • has built-in handling of digital zoom
  • Playback can be obtained by creating PlaybackController and assign imageViewerControl.PlaybackControllerFQID = playbackController.FQID. to link these classes together (Created via the ClientControl class).
  • From Smart Client 7.0 a Playback user control can be used, check out PlaybackUserControl (Created via the ClientControl class).

    A simple implementation just need these lines for initialization:
    imageViewerControl.CameraFQID = _selectedCameraItem.FQID;
    imageViewerControl.Initialize();
    imageViewerControl.Connect();
    The class to access Client relevant methods.
    Definition ClientControl.cs:37
    virtual ImageViewerControl GenerateImageViewerControl()
    This method is deprecated. Windows Forms controls are no longer supported. Use ImageViewerWpfControl ...
    Definition ClientControl.cs:286
    Definition AddUserControl.cs:12
    Definition AddUserControl.cs:12
    When the session is to terminated, issue the following statements:
    imageViewerControl.Disconnect();
    imageViewerControl.Close();
    In the Smart Client and the .Net Library the default implementation will ensure that a ImageViewerControl will follow the mode of the MIP Environment, e.g. change mode to Live/Browse/Setup as this mode is changed by the user.
    In the smart Client this means that it follow the normal rule for window it resides on, e.g. Smart Client mode in the main window and live mode in floating windows.
    In the .Net Library the mode is controlled by your application by setting the EnvironmentManager.Mode property.

Member Enumeration Documentation

◆ FPSRate

Defines how recorder should transcode video frames. Used on the SetVideoResolutionAndFPS method.

Enumerator
High 
Medium 
Low 

Constructor & Destructor Documentation

◆ ImageViewerControl()

VideoOS.Platform.Client.ImageViewerControl.ImageViewerControl ( )
inline

Member Function Documentation

◆ ClearOverlay()

void VideoOS.Platform.Client.ImageViewerControl.ClearOverlay ( int id)
abstract

Clear a specific overlay placed earlier. The id used during the SetOverlay() call is used in this method for clearing that overlay again.

Parameters
id

◆ Close()

void VideoOS.Platform.Client.ImageViewerControl.Close ( )
abstract

Should be called for the underlaying controls to clean up entirely.

◆ ConfigureOverlayText() [1/2]

virtual bool VideoOS.Platform.Client.ImageViewerControl.ConfigureOverlayText ( bool enable)
inlinevirtual

Controls how overlayed text is displayed for built-in messages. All built-in text messages are configured.

Parameters
enableWhen set to true, the text is displayed; when set to false the text is suppressed.
Returns
True if successful

◆ ConfigureOverlayText() [2/2]

virtual bool VideoOS.Platform.Client.ImageViewerControl.ConfigureOverlayText ( OverlayTextId textId,
bool enable )
inlinevirtual

Controls how overleyed text is displayed for built-in messages. The textId identifies the text / message being configured.

Parameters
textIdText id of the message to control,
enableWhen set to true, the text is displayed; when set to false the etxt is suppressed.
Returns
True if successful

◆ ConfigureOverlayTextAndImage() [1/2]

virtual bool VideoOS.Platform.Client.ImageViewerControl.ConfigureOverlayTextAndImage ( bool enable,
bool blank )
inlinevirtual

Controls how overleyed text is displayed for built-in messages. All built-in text messages are configured.

Parameters
enableWhen set to true, the text is displayed; when set to false the etxt is suppressed.
blankWhen set to false, the image is drawn; when set to true the image is not drawn.
Returns
True if successful

◆ ConfigureOverlayTextAndImage() [2/2]

virtual bool VideoOS.Platform.Client.ImageViewerControl.ConfigureOverlayTextAndImage ( OverlayTextId textId,
bool enable,
bool blank )
inlinevirtual

Controls how overleyed text is displayed for built-in messages. The textId identifies the text / message being configured.

Parameters
textIdText id of the message to control,
enableWhen set to true, the text is displayed; when set to false the etxt is suppressed.
blankWhen set to false, the image is drawn; when set to true the image is not drawn.
Returns
True if successful

◆ Connect()

void VideoOS.Platform.Client.ImageViewerControl.Connect ( )
abstract

This method will connect the recording server owning the camera.
The CameraFQID property must have been set, and the Initialize() method called before this method can be called.

◆ Disconnect()

void VideoOS.Platform.Client.ImageViewerControl.Disconnect ( )
abstract

Disconnect current session to the recording server.
Following this call, the CameraFQID can be changed and a new session be established by a call to the Connect() method.

◆ Dispose()

override void VideoOS.Platform.Client.ImageViewerControl.Dispose ( bool disposing)
inlineprotected

Clean up any resources being used.

Parameters
disposingtrue if managed resources should be disposed; otherwise, false.

◆ FireImageDisplayed()

void VideoOS.Platform.Client.ImageViewerControl.FireImageDisplayed ( ImageDisplayedEventArgs e)
inline

Reserved for use by MIP layer.

Parameters
e

◆ FireImageOrMaintInfoChanged()

void VideoOS.Platform.Client.ImageViewerControl.FireImageOrMaintInfoChanged ( )
inline

Reserved for internal use.

◆ FireLiveStreamInformationEvent()

void VideoOS.Platform.Client.ImageViewerControl.FireLiveStreamInformationEvent ( LiveStreamInformationEventArgs e)
inline

Internally used to call on event LiveStreamInformationEvent.

◆ FireRecordedImageReceivedEvent()

void VideoOS.Platform.Client.ImageViewerControl.FireRecordedImageReceivedEvent ( RecordedImageReceivedEventArgs e)
inline

Internally used to call on event RecordedImageReceivedEvent.

◆ GetCurrentDisplayedImageAsBitmap() [1/2]

virtual Bitmap VideoOS.Platform.Client.ImageViewerControl.GetCurrentDisplayedImageAsBitmap ( )
inlinevirtual

Get the latest displayed Image including the overlays and privacy mask.
Note that if no image has been received from the server, a null is returned.
Important: If the returned Bitmap is used in a UserControl, like a PictureBox, the control will hold to the original Bitmap. This can cause issues when the original source of the Bitmap attempts to dispose it.
Recommendation is to create another Bitmap directly upon calling this method, when passing it on to a PictureBox.

Bitmap bitmap = imageViewControl.GetCurrentDisplayedImageAsBitmap();
if (bitmap!=null)
{
myPictureBox.Image = newBitmap(bitmap, myPictureBox.Size()); // If you like to resize to picturebox size
bitmap.Dispose();
} else
{
// Clear the picturebox ...
}
Returns
A bitmap or null or no image is available.

◆ GetCurrentDisplayedImageAsBitmap() [2/2]

virtual Bitmap VideoOS.Platform.Client.ImageViewerControl.GetCurrentDisplayedImageAsBitmap ( bool digitalZoomOnly)
inlinevirtual

Overloaded method to control if the original or the digital zoomed image is requested.

Returns

◆ Initialize()

void VideoOS.Platform.Client.ImageViewerControl.Initialize ( )
abstract

Issue this method after the cameraFQID has been set to initialize the control.

◆ OnKeyUpEvent()

virtual void VideoOS.Platform.Client.ImageViewerControl.OnKeyUpEvent ( KeyEventArgs e)
inlineprotectedvirtual

Internally used to call on event KeyUpEvent.

◆ OnMiddleClickEvent()

virtual void VideoOS.Platform.Client.ImageViewerControl.OnMiddleClickEvent ( MouseEventArgs e)
inlineprotectedvirtual

Internally used to call on event MiddleClickEvent.

◆ OnMouseHoverEvent()

virtual void VideoOS.Platform.Client.ImageViewerControl.OnMouseHoverEvent ( )
inlineprotectedvirtual

Internally used to call on event MouseHoverEvent.

◆ OnMouseLeaveEvent()

virtual void VideoOS.Platform.Client.ImageViewerControl.OnMouseLeaveEvent ( )
inlineprotectedvirtual

Internally used to call on event MouseLeaveEvent.

◆ OnMouseMoveEvent()

virtual void VideoOS.Platform.Client.ImageViewerControl.OnMouseMoveEvent ( MouseEventArgs e)
inlineprotectedvirtual

Internally used to call on event MouseMoveEvent.

◆ OnMouseScrollWheel()

virtual void VideoOS.Platform.Client.ImageViewerControl.OnMouseScrollWheel ( System.Windows.Forms.MouseEventArgs e)
inlineprotectedvirtual

Internally used to call on event MouseScrollWheel.

◆ PtzCenter()

virtual void VideoOS.Platform.Client.ImageViewerControl.PtzCenter ( int refWidth,
int refHeight,
int centerX,
int centerY,
int zoom )
inlinevirtual

Perform PTZ Center in the current mode. Either Digital zoom, PanoramicLens (Fisheye), or physical camera move.

The zoom parameter can be -1 for no change, or a range from 0..1000, where 0 will zoom out completely. The other values are can be in any size and does not relate to the real resolution of the image.

_imageViewerControl1.PtzCenter(100, 100, 25, 50, 500);

Will zoom 50% and center around a point (25,50) to the left hand side of the image.

Parameters
refWidthReference width of center
refHeightReference height of center
centerX
centerY
zoom

◆ SetCameraXml()

virtual void VideoOS.Platform.Client.ImageViewerControl.SetCameraXml ( UserContext userContext,
String xml )
inlinevirtual

No longer supported.

Parameters
userContext
xmlThe XML describing the camera.

◆ SetImageQuality()

virtual void VideoOS.Platform.Client.ImageViewerControl.SetImageQuality ( int percent)
inlinevirtual

Standalone SDK only. Tell the Recording Server how much to compress each JPEG.

The value can be a number between 1..100.
Or one of the special values:
SuperHigh = 101
High = 102
Medium = 103
Low = 104

Note: Values below 100 are not supported.

Parameters
percent

◆ SetOverlay()

void VideoOS.Platform.Client.ImageViewerControl.SetOverlay ( Bitmap bitmap,
int id,
bool keepAspectRatio,
bool scaleWithDigitalZoom,
bool scaleOverlay,
double scaleFactor,
DockStyle verticalDock,
DockStyle horizontalDock,
double absolutePosX,
double absolutePosY )
abstract

Place a Bitmap on top of the video being showed.
After the bitmap has been set, it will remain on top of all following displayed video.
The size of the bitmap can be any size that makes sense, when taking the quality into consideration. If a bitmap of e.g. (320,280) is used for creating the overlay, it can via the parameters be scaled up to the actual size of the video being displayed.
Note: It is invalid set scale to true, while placing an overlay with absolute positions.
Note: SetOverlay does not dispose the bitmap. It is up to the caller to call dispose when appropiate.

Parameters
bitmap
id
keepAspectRatio
scaleWithDigitalZoom
scaleOverlay
scaleFactor
verticalDock
horizontalDock
absolutePosX
absolutePosY

◆ SetPlaybackFadeImageTime()

virtual short VideoOS.Platform.Client.ImageViewerControl.SetPlaybackFadeImageTime ( int msBeforeFading)
inlinevirtual

Sets the minimum millisecond distance to the closest image (at-or-before) before the displayed image is faded in browse mode.
Default value is 0, e.g. no fading.

Parameters
msBeforeFadingNumber of milliseconds from the previous image, before the displayed image is faded. 0 disables image fading. Negative numbers are ignored and make the function return 0
Returns

◆ SetRenderingOptions()

virtual bool VideoOS.Platform.Client.ImageViewerControl.SetRenderingOptions ( String xmlParameters)
inlinevirtual

Sets specific options for how to render video. The xmlParameter is forwarded to the ImageViewer presentation control.
The document must have as its top element "&lt;RenderingOptions>".

Example of a valid rendering options xml document:

"&lt;RenderingOptions>&lt;Deinterlacing>&lt;Method>BOB_TOP&lt;/Method>&lt;/Deinterlacing>&lt;/RenderingOptions>"

Deinterlacing options supported:

"&lt;Deinterlacing>&lt;Method>...&lt;/Method>&lt;/Deinterlacing>"

Where ... is one of

"DEFAULT": Set deinterlacing method to the legacy mode that may weave fields.

"BOB_TOP": Set deinterlacing method to bob. Preferently bob the top field.

"BOB_BOTTOM": Set deinterlacing method to bob. Preferently bob the bottom field.

"CONTENT_ADAPTIVE_VERTICAL_TEMPORAL": Set deinterlacing to content adaptive veritcal temportal (CAVT).
CAVT is a filter that suppresses interlacing artifacts by analysis of each frame (top + bottom field).
The CAVT deinterlacing variant accept a Threshold parameter in the range 0..255, eg.

"&lt;RenderingOptions>&lt;Deinterlacing>&lt;Method>CONTENT_ADAPTIVE_VERTICAL_TEMPORAL&lt;/Method>&lt;Threshold>20&lt;/Threshold>&lt;/Deinterlacing>&lt;/RenderingOptions>"

Threshold default (used if element is not present) is 12. The threshold determines the level of vertical variation that causes the filter to kick in. Furthermore CAVT accept a PreferredField parameter (either "TOP" (default) or "BOTTOM") that controls the field to bob for low resolution rendering, e.g.

"&lt;RenderingOptions>&lt;Deinterlacing>&lt;Method>CONTENT_ADAPTIVE_VERTICAL_TEMPORAL&lt;/Method>&lt;PreferredField>BOTTOM&lt;/PreferredField>&lt;/Deinterlacing>&lt;/RenderingOptions>"
Parameters
xmlParameters
Returns

◆ SetVideoQuality() [1/2]

virtual void VideoOS.Platform.Client.ImageViewerControl.SetVideoQuality ( int percent)
inlinevirtual

Please use SetImageQuality.

Parameters
percent

◆ SetVideoQuality() [2/2]

virtual void VideoOS.Platform.Client.ImageViewerControl.SetVideoQuality ( int smoothBufferSize,
int CPUsToUtilize )
inlinevirtual

Configure how decoding and display should work. This call represent the same functionality as the VideoQuality slider setup for a CameraViewItem.
The change will take effect the next time a camera session is established. The smoothBufferSize parameter should have value in the range 1..100, where 1 is the lowest allowable quality and 100 is the highest allowable quality. The value represent how much of the maximum allocated buffer is used.
When the smoothBufferSize is 0 - buffering will be turned off, and values will be the original defaults.

Parameters
smoothBufferSizeThe percent of buffer to utilize. A number of 100 will use all available buffer, e.g. 4 seconds
CPUsToUtilizeThe number of CPU cores to use during decoding

◆ SetVideoResolutionAndFPS() [1/2]

virtual void VideoOS.Platform.Client.ImageViewerControl.SetVideoResolutionAndFPS ( Size resolution,
FPSRate fpsRate )
inlinevirtual

Standalone SDK only. The FPSRate will be used to tell the server what to transmit to this client.
For H.264, values of Medium and Low will be key-frames only.
For H.265, values of Medium and Low will be key-frames only.
For JPEG, a normal framerate of 25, will give 25 for High, 4 or 5 for medium, and 1 for low.

Parameters
resolution
fpsRate

◆ SetVideoResolutionAndFPS() [2/2]

virtual void VideoOS.Platform.Client.ImageViewerControl.SetVideoResolutionAndFPS ( Size resolution,
int FPS )
inlinevirtual

Obsolete.

◆ ShapesOverlayAdd()

virtual Guid VideoOS.Platform.Client.ImageViewerControl.ShapesOverlayAdd ( List< Shape > overlayShapes,
ShapesOverlayRenderParameters renderParameters )
inlinevirtual

Method to add overlay shapes.

The returned Guid is used to later modify and remove the overlays.

Note: Valid from 2016 R3 when using the hardware accellerared ImageViewerControl.

Parameters
overlayShapes
renderParameters
Returns

◆ ShapesOverlayRemove()

virtual void VideoOS.Platform.Client.ImageViewerControl.ShapesOverlayRemove ( Guid id)
inlinevirtual
Parameters
id

◆ ShapesOverlayUpdate() [1/3]

virtual bool VideoOS.Platform.Client.ImageViewerControl.ShapesOverlayUpdate ( Guid id,
List< Shape > overlayShapes )
inlinevirtual
Parameters
id
overlayShapes
Returns

◆ ShapesOverlayUpdate() [2/3]

virtual bool VideoOS.Platform.Client.ImageViewerControl.ShapesOverlayUpdate ( Guid id,
List< Shape > overlayShapes,
ShapesOverlayRenderParameters renderParameters )
inlinevirtual
Parameters
id
overlayShapes
renderParameters
Returns

◆ ShapesOverlayUpdate() [3/3]

virtual bool VideoOS.Platform.Client.ImageViewerControl.ShapesOverlayUpdate ( Guid id,
ShapesOverlayRenderParameters renderParameters )
inlinevirtual
Parameters
id
renderParameters
Returns

◆ StartBrowse()

void VideoOS.Platform.Client.ImageViewerControl.StartBrowse ( )
abstract

In the Smart Client and the .Net library the default implementation will ensure that a ImageViewerControl will follow the mode of the MIP environment, e.g. change mode to Live/Browse as this mode is changed by the user.
In the Smart Client this means that it follows the normal rule for the window it resides on. The method should therefore only be used in the Smart Client if the control does not reside in a ViewItem. If it resides in a ViewItem, the SmartClient.ModeChangeCommand message should be used with EnvironmentManager.Instance.PostMessage/> instead.
In the .Net library the mode is controlled by your application by setting the EnvironmentManager.Mode property.

◆ StartLive()

void VideoOS.Platform.Client.ImageViewerControl.StartLive ( )
abstract

In the Smart Client and the .Net library the default implementation will ensure that a ImageViewerControl will follow the mode of the MIP environment, e.g. change mode to Live/Browse as this mode is changed by the user.
In the Smart Client this means that it follows the normal rule for the window it resides on. The method should therefore only be used in the Smart Client if the control does not reside in a ViewItem. If it resides in a ViewItem, the SmartClient.ModeChangeCommand message should be used with EnvironmentManager.Instance.PostMessage/> instead.
In the .Net library the mode is controlled by your application by setting the EnvironmentManager.Mode property.

◆ StartSetup()

void VideoOS.Platform.Client.ImageViewerControl.StartSetup ( )
abstract

This will set the ImageViewer in setup mode. Avoid using this, as it is normally controlled by the Mode set in the EnvironmentManager.

◆ UpdateStates()

void VideoOS.Platform.Client.ImageViewerControl.UpdateStates ( )
abstract

When some of the 'Enabled' properties have been changed, this method will check for any changes and carry them out on the UI.

Member Data Documentation

◆ ImageOrPaintInfoChanged

EventHandler VideoOS.Platform.Client.ImageViewerControl.ImageOrPaintInfoChanged

Is fired when one of the these field has been changed: ImageSize, PaintSize, PaintLocation.

Property Documentation

◆ AdaptiveStreaming

virtual bool VideoOS.Platform.Client.ImageViewerControl.AdaptiveStreaming
getset

Determine the stream resolution should be adapted based on the view size.
Only applicable in standalone SDK. In Smart Client adaptive streaming is controlled by the general Smart Client settings.

◆ CameraFQID

FQID VideoOS.Platform.Client.ImageViewerControl.CameraFQID
getsetabstract

Identifies the camera that is to be displayed in the control.
This property needs to be set before the Initialize() method is called.

◆ EnableBrowseMode

bool VideoOS.Platform.Client.ImageViewerControl.EnableBrowseMode
setabstract

Defines if this ImageViewerControl should be enabled in Browse (Playback) mode.
If this property is false, the UserControl becomes disabled during Browse (Playback) mode.
Default is true.

◆ EnableDigitalZoom

virtual bool VideoOS.Platform.Client.ImageViewerControl.EnableDigitalZoom
getset

Defines if this ImageViewerControl allow the user to perform digital zoom operations.

Note: When this flag is set to true, the EnableMousePtzEmbeddedHandler should also be true.

Default is false.

◆ EnableLiveStreamInformation

virtual bool VideoOS.Platform.Client.ImageViewerControl.EnableLiveStreamInformation
set

If you wish to receive the live stream XML information packages, set the LiveStreamInformationEvent up correctly and set this property to true.

◆ EnableMiddleButtonClick

bool VideoOS.Platform.Client.ImageViewerControl.EnableMiddleButtonClick
setabstract

Defines if a 3-button mouse can use the middle button as a zoom out completely command.
Default is false.

◆ EnableMouseControlledPtz

bool VideoOS.Platform.Client.ImageViewerControl.EnableMouseControlledPtz
setabstract

Defines if mouse controlled PTZ should be possible. When set to true, the user can use click on video to do center-to-click, and the user can also right click and open a square of an area to zoom to.
Default is false.

Related property: EnableMousePtzEmbeddedHandler

◆ EnableMousePtzEmbeddedHandler

virtual bool VideoOS.Platform.Client.ImageViewerControl.EnableMousePtzEmbeddedHandler
getset

Defines if mouse controlled PTZ should be handled automatically by this component.
When set to true, the user actions will be handled automatically and no Messages or events will be issued to this class, but will be forwarded to the recording server that again will send to the camera.
When set to false, the user selection will be send to the MIP Plugin or application via MIP Messages. Default is true. (Note: This default was false in 2014 version).

◆ EnableNextImageReceivedEvent

virtual bool VideoOS.Platform.Client.ImageViewerControl.EnableNextImageReceivedEvent
set

Not implemented, see ImageDisplayedEvent.

◆ EnableRecordedImageDisplayedEvent

bool VideoOS.Platform.Client.ImageViewerControl.EnableRecordedImageDisplayedEvent
setabstract

If you want to receive an event when a recorded image is received, set the RecordedImageReceivedEvent correctly and set this property to true.

◆ EnableScrollWheel

bool VideoOS.Platform.Client.ImageViewerControl.EnableScrollWheel
setabstract

Defines is mouse wheel can control the zoom level for the camera.
Default is false.

◆ EnableSetupMode

bool VideoOS.Platform.Client.ImageViewerControl.EnableSetupMode
setabstract

Defines if this ImageViewerControl should be enabled in Setup mode.
If this property is false, the UserControl becomes disabled during Setup mode.
Default is true.

◆ EnableSmartSearch

bool VideoOS.Platform.Client.ImageViewerControl.EnableSmartSearch
setabstract

Deprecated. Do not use.

◆ EnableVisibleCameraName

virtual bool VideoOS.Platform.Client.ImageViewerControl.EnableVisibleCameraName
getset

Defines if the name of the camera is displayed in the header line. Default is true.

◆ EnableVisibleHeader

virtual bool VideoOS.Platform.Client.ImageViewerControl.EnableVisibleHeader
getset

Defines if the blue header is displayed or not. Default is true.

◆ EnableVisibleLiveIndicator

virtual bool VideoOS.Platform.Client.ImageViewerControl.EnableVisibleLiveIndicator
getset

Defines if the blinking green live indicator and the red motion indicator is visible. Default is true.

Note: This flag was set as Obsolite in 2016R3, but has been re-instated from 2017R1

◆ EnableVisibleTimeStamp

virtual bool VideoOS.Platform.Client.ImageViewerControl.EnableVisibleTimeStamp
getset

Defines if the timestamps should be shown in the top line during playback.

◆ Hidden

bool VideoOS.Platform.Client.ImageViewerControl.Hidden
getsetabstract

When another ViewItem is maximized, this property is set to true.

◆ ImageSize

Size VideoOS.Platform.Client.ImageViewerControl.ImageSize
getset

Contains the size of the original image before it was scaled to available display area.

◆ InfoText

String VideoOS.Platform.Client.ImageViewerControl.InfoText
setabstract

Used for displaying a text when the ImageViewer ImageViewer is NOT shown. When the ShowImageViewer is set to false, the text stored in the InfoText field will be displayed.
The text is displayed in Color.Black on a transparent background.

◆ MaintainImageAspectRatio

virtual bool VideoOS.Platform.Client.ImageViewerControl.MaintainImageAspectRatio
getset

Flag to instruct the presentation of the video to be displayed with the original aspect ratio (Default), or to fill the entire viewable area.

◆ Maximized

bool VideoOS.Platform.Client.ImageViewerControl.Maximized
getsetabstract

Defines if this ImageViewerControl is currently in a Maximized ViewItem.
This property cannot be used to maximize a ViewItem, use a SendMessage for that.

◆ PaintLocation

Point VideoOS.Platform.Client.ImageViewerControl.PaintLocation
getset

Contains the location of actual image within this usercontrol.

◆ PaintSize

Size VideoOS.Platform.Client.ImageViewerControl.PaintSize
getset

Contains the size of the areas used for video.

Top line and black filler areas are not included in this size.

◆ PlaybackControllerFQID

virtual FQID VideoOS.Platform.Client.ImageViewerControl.PlaybackControllerFQID
getset

Defines which PlaybackController is controlling this ImageViewer in Playback mode. The FQID used here is returned by the ClientControl.GeneratePlaybackController() method.

◆ Selected

bool VideoOS.Platform.Client.ImageViewerControl.Selected
getsetabstract

Define if this ImageViewerControl is in the currently selected ViewItem.
When set to true, the top bar of the ImageViewerControl will change color to a brighter color.
This property cannot be used in the SMart Client to select your own ImageViewerControl, use a SendMessage for that.

◆ ShowImageViewer

bool VideoOS.Platform.Client.ImageViewerControl.ShowImageViewer
getsetabstract

This property can be used to control if the ImageViewer should be shown or not.
This can for example be used to hide the ImageViewer when there is no camera defined yet.
When the ImageViewer is not shown, the InfoText field is displayed instead.

◆ ShowInitialImage

virtual bool VideoOS.Platform.Client.ImageViewerControl.ShowInitialImage = true
getset

Determine whether to send an initial image before the stream is started AND
control how the "Camera feed has stopped" message is displayed
Only applicable in standalone SDK.

true to send an initial image before the camera feed has started and show the "Camera feed has stopped" message on a transparent overlay;
false to disable sending an initial image and show the message on black overlay

◆ StreamId

virtual Guid VideoOS.Platform.Client.ImageViewerControl.StreamId
getset

Identifies which stream to use.
Use the StreamDataSource class to get a list of available streams. Note that multiple stream support is obly available on some Milestone products.

◆ SuppressUpdateOnMotionOnly

bool VideoOS.Platform.Client.ImageViewerControl.SuppressUpdateOnMotionOnly
setabstract

Reserved for future use.

◆ UsingMulticast

virtual bool VideoOS.Platform.Client.ImageViewerControl.UsingMulticast
getset

Indicates if the video is received from the recording server via multicast.

Supported from 2016

Event Documentation

◆ ClickEvent

EventHandler VideoOS.Platform.Client.ImageViewerControl.ClickEvent
abstract

Register here to receive unused click events The args is MouseEventArgs (from version MIPSDK 5.1.1)

◆ ConnectResponseEvent

ConnectResponseEventHandler VideoOS.Platform.Client.ImageViewerControl.ConnectResponseEvent
abstract

Register on this event to be called when a connection has completed.

◆ DoubleClickEvent

EventHandler VideoOS.Platform.Client.ImageViewerControl.DoubleClickEvent
abstract

Register here to receive unused double click events The args is MouseEventArgs (from version MIPSDK 5.1.1)

◆ ImageDisplayedEvent

ImageDisplayedHandler VideoOS.Platform.Client.ImageViewerControl.ImageDisplayedEvent

Called for every image being displayed, exactly when it is presented to the operator.
The method registered on this event MUST be VERY short.

◆ ImageReceivedEvent

EventHandler VideoOS.Platform.Client.ImageViewerControl.ImageReceivedEvent
abstract

Not implemented, see ImageDisplayedEvent.

◆ KeyUpEvent

virtual KeyEventHandler VideoOS.Platform.Client.ImageViewerControl.KeyUpEvent

Get the KeyUpEvent.

Only implemented in .Net Library (as of MIPSDK v4.0b)

◆ LiveStreamInformationEvent

virtual LiveStreamInformationHandler VideoOS.Platform.Client.ImageViewerControl.LiveStreamInformationEvent

Register on this event to be called when the live stream XML information is available.
Remember to also set the EnableLiveStreamInformation to true;.

◆ MiddleClickEvent

virtual MouseEventHandler VideoOS.Platform.Client.ImageViewerControl.MiddleClickEvent

Register here to receive unused middle click events The args is MouseEventArgs (from version MIPSDK 5.1.1)

◆ MouseHoverEvent

virtual EventHandler VideoOS.Platform.Client.ImageViewerControl.MouseHoverEvent

Is called when mouse is hovering over the control.

◆ MouseLeaveEvent

virtual EventHandler VideoOS.Platform.Client.ImageViewerControl.MouseLeaveEvent

Is called when mouse is leaving the control.

◆ MouseMoveEvent

virtual MouseEventHandler VideoOS.Platform.Client.ImageViewerControl.MouseMoveEvent

Called continuously when mouse is over control and moving. The args is MouseEventArgs.

◆ MouseScrollWheelEvent

virtual MouseEventHandler VideoOS.Platform.Client.ImageViewerControl.MouseScrollWheelEvent

Called continuously when mouse scroll wheel is used. Remember to set EnableScrollWheel to true. The args is MouseEventArgs.

◆ RecordedImageReceivedEvent

virtual RecordedImageReceivedHandler VideoOS.Platform.Client.ImageViewerControl.RecordedImageReceivedEvent

Register on this event to be called when a recorded image has been received.
Remember to also set the EnableRecordedImageDisplayedEvent to true;.

◆ RightClickEvent

EventHandler VideoOS.Platform.Client.ImageViewerControl.RightClickEvent
abstract

Register here to receive unused right click events The args is MouseEventArgs (from version MIPSDK 5.1.1)