Class VideoView
Video view for WPF.
Inheritance
Implements
Inherited Members
Namespace: VisioForge.Core.UI.WPF
Assembly: VisioForge.Core.dll
Syntax
public class VideoView : Grid, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild, IDisposable, INotifyPropertyChanged, IVideoView, IVideoViewPushFrame, IVideoViewNativeRendering
Constructors
VideoView()
Initializes a new instance of the VideoView class.
Declaration
public VideoView()
Properties
BackgroundImage_Source
Gets or sets background image.
Declaration
public BitmapSource BackgroundImage_Source { get; set; }
Property Value
| Type | Description |
|---|---|
| BitmapSource | The background image source. |
BackgroundImage_Stretch
Gets or sets background image stretch.
Declaration
public Stretch BackgroundImage_Stretch { get; set; }
Property Value
| Type | Description |
|---|---|
| Stretch | The background image stretch. |
Rotate
Gets or sets the rotate mode for WPF rendering.
Declaration
public RotateMode Rotate { get; set; }
Property Value
| Type | Description |
|---|---|
| RotateMode | The rotate. |
StatusOverlay
Gets or sets status overlay that is active after Start/StartAsync call but before actual video streaming. The overlay can be used for IP cameras connection progress. Use TextStatusOverlay to configure text overlay.
Declaration
public IStatusOverlay StatusOverlay { get; set; }
Property Value
| Type | Description |
|---|---|
| IStatusOverlay | The status overlay. |
Video_Renderer
Gets video renderer used for displaying video.
Declaration
public VideoRendererSettings Video_Renderer { get; }
Property Value
| Type | Description |
|---|---|
| VideoRendererSettings | The video renderer. |
Methods
Attach(IMPVCVECore)
Attaches parent.
Declaration
public void Attach(IMPVCVECore parent)
Parameters
| Type | Name | Description |
|---|---|---|
| IMPVCVECore | parent | Parent. |
CallInvoke(Delegate, params object[])
Calls the invoke.
Declaration
public void CallInvoke(Delegate method, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| Delegate | method | The method. |
| object[] | args | The arguments. |
CallRefresh()
Calls the refresh.
Declaration
public void CallRefresh()
ClearUI()
Clears the UI.
Declaration
public void ClearUI()
ColorConv(Color)
Converts color from WinForms to WPF.
Declaration
public static Color ColorConv(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | Source color. |
Returns
| Type | Description |
|---|---|
| Color | Returns WPF color. |
ColorConv(Color)
Converts color from WPF to WinForms.
Declaration
public static Color ColorConv(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | Source color. |
Returns
| Type | Description |
|---|---|
| Color | Returns WinForms color. |
Detach(IMPVCVECore)
Detaches the specified parent.
Declaration
public void Detach(IMPVCVECore parent)
Parameters
| Type | Name | Description |
|---|---|---|
| IMPVCVECore | parent | The parent. |
Dispose()
Dispose.
Declaration
public void Dispose()
Dispose(bool)
Dispose.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | Disposing parameter. |
~VideoView()
Finalizes an instance of the VideoView class.
Declaration
protected ~VideoView()
GetBackgroundColor()
Gets the color of the background.
Declaration
public SKColor GetBackgroundColor()
Returns
| Type | Description |
|---|---|
| SKColor | SKColor. |
GetHandle()
Gets window handle.
Declaration
public nint GetHandle()
Returns
| Type | Description |
|---|---|
| nint | Returns nint. |
GetImageLayer()
Gets the image layer. It can be used to apply WPF transforms.
Declaration
public Image GetImageLayer()
Returns
| Type | Description |
|---|---|
| Image | System.Windows.Controls.Image. |
GetInvokeRequired()
Gets the invoke required.
Declaration
public bool GetInvokeRequired()
Returns
| Type | Description |
|---|---|
| bool |
|
GetIsHandleCreated()
Gets the is handle created.
Declaration
public bool GetIsHandleCreated()
Returns
| Type | Description |
|---|---|
| bool |
|
GetSize()
Gets size.
Declaration
public Size GetSize()
Returns
| Type | Description |
|---|---|
| Size | Return Size. |
GetUIEngine()
Gets UI engine.
Declaration
public VideoViewUIEngine GetUIEngine()
Returns
| Type | Description |
|---|---|
| VideoViewUIEngine | Returns VideoViewUIEngine. |
InvokeStart()
Invokes Start/Play.
Declaration
public void InvokeStart()
InvokeStartComplete()
Invokes Start/Play.
Declaration
public void InvokeStartComplete()
InvokeStop()
Invokes Stop.
Declaration
public void InvokeStop()
InvokeVideoRendererUpdate()
Updates the screen settings.
Declaration
public void InvokeVideoRendererUpdate()
LogDialogClear()
Clears logs dialog.
Declaration
public void LogDialogClear()
LogDialogClose()
Closes logs dialog.
Declaration
public void LogDialogClose()
LogDialogError(string)
Logs the error in a custom dialog.
Declaration
public void LogDialogError(string msg)
Parameters
| Type | Name | Description |
|---|---|---|
| string | msg | The MSG. |
OnPropertyChanged(string)
OnPropertyChanged API.
Declaration
protected virtual void OnPropertyChanged(string propertyName = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | Property name. |
PictureBoxCreate(int, int)
Create the PictureBox.
Declaration
public void PictureBoxCreate(int width, int height)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width. |
| int | height | The height. |
PictureBoxDestroy()
Destroys the PictureBox.
Declaration
public void PictureBoxDestroy()
PictureBoxExists()
Is the PictureBox exists.
Declaration
public bool PictureBoxExists()
Returns
| Type | Description |
|---|---|
| bool |
|
PictureBoxGetImage()
Gets the PictureBox image.
Declaration
public Bitmap PictureBoxGetImage()
Returns
| Type | Description |
|---|---|
| Bitmap | Bitmap. |
PictureBoxSetImage(Bitmap)
Set the image on PictureBox.
Declaration
public void PictureBoxSetImage(Bitmap image)
Parameters
| Type | Name | Description |
|---|---|---|
| Bitmap | image | The image. |
PushFrame(VideoFrame)
Pushes the frame.
Declaration
public void PushFrame(VideoFrame frame)
Parameters
| Type | Name | Description |
|---|---|---|
| VideoFrame | frame | The frame. |
PushFrame(VideoFrameX)
Pushes the frame.
Declaration
public void PushFrame(VideoFrameX frame)
Parameters
| Type | Name | Description |
|---|---|---|
| VideoFrameX | frame | The frame. |
PushMouseButtonDown(int, int, MouseButton)
Pushes the mouse button down.
Declaration
public void PushMouseButtonDown(int x, int y, MouseButton button)
Parameters
| Type | Name | Description |
|---|---|---|
| int | x | The x. |
| int | y | The y. |
| MouseButton | button | The button. |
PushMouseButtonUp(int, int, MouseButton)
Pushes the mouse button up.
Declaration
public void PushMouseButtonUp(int x, int y, MouseButton button)
Parameters
| Type | Name | Description |
|---|---|---|
| int | x | The x. |
| int | y | The y. |
| MouseButton | button | The button. |
PushMouseMove(int, int)
Pushes the mouse move.
Declaration
public void PushMouseMove(int x, int y)
Parameters
| Type | Name | Description |
|---|---|---|
| int | x | The x. |
| int | y | The y. |
ResizeRoundTo(int)
Resizes the VideoView round to value.
Declaration
public void ResizeRoundTo(int round)
Parameters
| Type | Name | Description |
|---|---|---|
| int | round | The value. |
SetHandle(nint)
Sets the handle. Not implemented.
Declaration
public void SetHandle(nint handle)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | handle | The handle. |
SetNativeRendering(bool)
Sets the native rendering. Set true if you want to use native rendering instead WPF rendering. We suggest to enable it for GPU decoding or 4K/8K video.
Declaration
public void SetNativeRendering(bool native)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | native | if set to |
ShowMessage(string)
Shows the message.
Declaration
public MessageBoxResult ShowMessage(string message)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The message. |
Returns
| Type | Description |
|---|---|
| MessageBoxResult | MessageBoxResult. |
ShowMessageEx(string, string, MessageBoxDialogButtons)
Shows the message.
Declaration
public static MessageBoxResult ShowMessageEx(string message, string caption, MessageBoxDialogButtons buttons)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The message. |
| string | caption | The caption. |
| MessageBoxDialogButtons | buttons | The buttons. |
Returns
| Type | Description |
|---|---|
| MessageBoxResult | MessageBoxResult. |
Events
OnMouseButtonDown
Occurs when mouse button down.
Declaration
public event EventHandler<MouseButtonEventArgs> OnMouseButtonDown
Event Type
| Type | Description |
|---|---|
| EventHandler<MouseButtonEventArgs> |
OnMouseButtonUp
Occurs when mouse button up.
Declaration
public event EventHandler<MouseButtonEventArgs> OnMouseButtonUp
Event Type
| Type | Description |
|---|---|
| EventHandler<MouseButtonEventArgs> |
OnMouseMoved
Occurs when mouse moved.
Declaration
public event EventHandler<MouseMoveEventArgs> OnMouseMoved
Event Type
| Type | Description |
|---|---|
| EventHandler<MouseMoveEventArgs> |
PropertyChanged
Property changed event.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
| Type | Description |
|---|---|
| PropertyChangedEventHandler |