Class MediaPlayerCore
- Namespace
- VisioForge.Core.MediaPlayer
- Assembly
- VisioForge.Core.dll
Provides comprehensive Windows-based media playback functionality using DirectShow technology. This is the core class of the VisioForge Media Player SDK for Windows platforms.
public class MediaPlayerCore : IMediaPlayerControls, IVideoEffectsControls, IDisposable, IMediaPlayerCore, IMPVCVECore, INotifyPropertyChanged, IAsyncDisposableInheritance
Implements
Inherited Members
Remarks
MediaPlayerCore is a Windows-specific implementation that uses DirectShow (and optionally Media Foundation or FFMPEG) for media playback. It supports a wide range of media formats, codecs, and playback scenarios including:
- Local file playback (video and audio files)
- DVD playback with full menu and chapter navigation
- Network streaming (RTSP, RTMP, HTTP, UDP, TCP)
- Playlist management for sequential playback
- Real-time video and audio effects processing
- Hardware-accelerated decoding (GPU decode support)
- Multiple audio/video stream selection
- On-screen display (OSD) and text overlay
- Picture-in-picture (PIP) support
- Motion detection and video analysis
- Audio VU meters and spectrum analysis
The class is implemented as a partial class split across multiple files for better organization. It provides both synchronous and asynchronous APIs for most operations.
Platform Requirements: Windows 7 or later, DirectShow filters installed, appropriate codecs for target media formats.
Constructors
MediaPlayerCore(IVideoView, bool)
Initializes a new instance of the VisioForge.Core.MediaPlayer.MediaPlayerCore class with a video view and optional automatic initialization.
public MediaPlayerCore(IVideoView videoView, bool initialize = true)Parameters
videoViewIVideoView-
The IVideoView implementation for video display. Pass null for audio-only playback.
initializebool-
If true (default), immediately initializes all components. If false, you must call Init() or InitAsync() manually before use.
Remarks
Deferred initialization (initialize=false) is useful when you need to configure properties before the player infrastructure is created.
MediaPlayerCore()
Initializes a new instance of the VisioForge.Core.MediaPlayer.MediaPlayerCore class with default settings.
public MediaPlayerCore()Remarks
Creates a player without a video view and immediately initializes all components. For video playback, attach a video view using appropriate methods before playing. This constructor is suitable for simple audio playback scenarios.
MediaPlayerCore(bool)
Initializes a new instance of the VisioForge.Core.MediaPlayer.MediaPlayerCore class with control over automatic initialization.
public MediaPlayerCore(bool initialize)Parameters
initializebool-
If true, immediately initializes all components. If false, initialization is deferred until Init() or InitAsync() is called.
Remarks
Use deferred initialization when you need to set properties that affect initialization behavior, such as custom redistributable paths or specific renderer modes.
Properties
Audio_Channel_Mapper
Gets or sets audio channel mapping configuration for custom channel routing.
public AudioChannelMapperSettings Audio_Channel_Mapper { get; set; }Property Value
Remarks
Use channel mapping to reroute audio channels (e.g., swap left/right, extract specific channels, or create custom surround configurations). Useful for multi-language content or correcting channel misalignment.
Audio_Effects_Enabled
Gets or sets a value indicating whether audio effect processing is enabled.
public bool Audio_Effects_Enabled { get; set; }Property Value
Remarks
This is the master switch for all audio effects. Individual effects must also be configured and enabled. Disabling this improves performance when effects aren't needed. Effects include EQ, dynamics, reverb, and custom DSP.
Audio_Effects_Tempo_Enabled
Gets or sets a value indicating whether tempo/pitch control effect is enabled.
public bool Audio_Effects_Tempo_Enabled { get; set; }Property Value
Remarks
When enabled, use Audio_Effects_Tempo_Value to adjust playback speed while maintaining original pitch. Useful for language learning, music practice, or time-stretching. Disabling this also resets playback speed to 1.0x. Requires Audio_Effects_Enabled to be true.
Audio_Effects_Tempo_Value
Gets or sets the tempo adjustment value for time-stretching audio.
public int Audio_Effects_Tempo_Value { get; set; }Property Value
Remarks
This adjusts playback speed without changing pitch. Examples:
- 500 = 0.5x speed (slower)
- 1000 = 1.0x speed (normal)
- 1500 = 1.5x speed (faster)
- 2000 = 2.0x speed (double) Requires Audio_Effects_Tempo_Enabled to be true.
Audio_Enhancer_Enabled
Gets or sets a value indicating whether the audio enhancement processor is enabled.
public bool Audio_Enhancer_Enabled { get; set; }Property Value
Remarks
The audio enhancer provides professional audio processing including normalization, auto-gain control, and multi-band dynamics. Configure individual enhancement parameters using Audio_Enhancer methods. Useful for improving audio quality or matching levels across different content.
Audio_OutputDevice
Gets or sets the audio output device name for playback.
public string Audio_OutputDevice { get; set; }Property Value
Remarks
Set this property before calling Play() to route audio to a specific device. Requires Audio_PlayAudio to be true. Use Audio_OutputDevice_GetList() to enumerate available devices. The device name must match exactly.
Audio_PlayAudio
Gets or sets a value indicating whether audio output is enabled during playback.
public bool Audio_PlayAudio { get; set; }Property Value
Remarks
Disabling audio output doesn't affect audio processing - effects, level meters, and audio sample events still function. Use this for video-only playback or when processing audio without audible output.
Audio_Sample_Grabber_Enabled
Gets or sets a value indicating whether raw audio sample capture is enabled.
public bool Audio_Sample_Grabber_Enabled { get; set; }Property Value
Remarks
When enabled, the OnAudioFrameBuffer event provides raw audio samples for custom processing, analysis, or recording. Has minimal performance impact but should be disabled when not needed. Audio format details are provided in the event arguments.
Audio_VUMeter_Enabled
Gets or sets a value indicating whether basic audio level metering is enabled.
public bool Audio_VUMeter_Enabled { get; set; }Property Value
Remarks
When enabled, the OnAudioVUMeter event provides real-time audio levels for creating visual meters. For more advanced metering with FFT and professional features, use Audio_VUMeter_Pro_Enabled instead.
Audio_VUMeter_Pro_Enabled
Gets or sets a value indicating whether professional audio metering and analysis is enabled.
public bool Audio_VUMeter_Pro_Enabled { get; set; }Property Value
Remarks
VU Meter Pro provides professional audio monitoring features:
- High-precision level metering with true peak detection
- FFT spectrum analysis (OnAudioVUMeterProFFTCalculated)
- Maximum sample tracking (OnAudioVUMeterProMaximumCalculated)
- Volume level events (OnAudioVUMeterProVolume) Has higher CPU usage than basic VU meter.
Audio_VUMeter_Pro_Volume
Gets or sets the reference volume level for VU Meter Pro calculations.
public int Audio_VUMeter_Pro_Volume { get; set; }Property Value
Remarks
This affects the sensitivity of the VU meter display. Lower values make the meter more sensitive to quiet signals. The value is applied to the VU Meter Pro filter immediately if it's already initialized.
Barcode_Reader_Enabled
Gets or sets a value indicating whether barcode and QR code detection is enabled.
public bool Barcode_Reader_Enabled { get; set; }Property Value
Remarks
When enabled, video frames are analyzed for barcodes and QR codes. Detected codes trigger the OnBarcodeDetected event with decoded data. Configure barcode types to detect via Barcode_Reader_Type property. Detection has CPU overhead; enable only when needed. The internal barcode reader is updated immediately when changed.
Barcode_Reader_Type
Gets or sets which types of barcodes to detect in video frames.
public BarcodeType Barcode_Reader_Type { get; set; }Property Value
Remarks
Common types include:
- QR codes (2D)
- Code128, Code39 (1D barcodes)
- EAN/UPC (retail barcodes)
- DataMatrix, PDF417 (2D codes) Limiting types improves performance. Detection accuracy depends on video quality, barcode size, and lighting conditions.
ChromaKey
Gets or sets chroma key (green/blue screen) removal configuration.
public ChromaKeySettings ChromaKey { get; set; }Property Value
Remarks
Chroma key removes a specific color (typically green or blue) from video, making it transparent. Used for:
- Green screen effects
- Virtual backgrounds
- Compositing multiple video sources Configure key color, similarity tolerance, and blend settings. Requires GPU effects to be enabled. Settings apply immediately.
ConsoleUsage
Gets or sets a value indicating whether the SDK is being used in a console application.
public bool ConsoleUsage { get; set; }Property Value
Remarks
Enable this when using the SDK in console applications, Windows services, or other non-GUI environments. This adjusts internal behavior to avoid UI dependencies and message pumping requirements. Some features requiring UI interaction may be limited.
CustomParameters
Gets or sets custom key-value parameters for advanced SDK configuration.
public Dictionary<string, string> CustomParameters { get; set; }Property Value
Remarks
Used for advanced scenarios and experimental features not exposed through standard properties. Parameters may include:
- Undocumented performance tuning
- Beta feature flags
- Vendor-specific options Consult VisioForge support for available parameters. Invalid parameters are ignored.
CustomRedist_Auto
Gets or sets whether to automatically detect and use redistributable filters in the application folder.
public bool CustomRedist_Auto { get; set; }Property Value
Remarks
When enabled, the SDK automatically searches for filter files in:
- Application folder
- x86/x64 subfolders (based on process architecture)
- Common codec folder names This simplifies deployment by allowing filters to be copied with your app. Disable for full control over filter loading.
CustomRedist_DisableDialog
Gets or sets a value indicating whether to suppress the missing codec warning dialog.
public bool CustomRedist_DisableDialog { get; set; }Property Value
Remarks
By default, the SDK shows a dialog when required codecs aren't found during initialization. Enable this for:
- Automated/unattended applications
- Custom error handling
- Embedded scenarios You should implement your own codec detection if disabling this dialog.
CustomRedist_Path
Gets or sets the custom path for redistributable DirectShow filters and codecs.
public string CustomRedist_Path { get; set; }Property Value
Remarks
Use this to specify where the SDK should load filters from:
- Portable installations
- Isolated codec sets
- Version-specific filters The path should contain LAV Filters, ffdshow, or other required codecs. Files are loaded from this path before system-registered filters.
Custom_Audio_Decoder
Gets or sets the name of a custom audio decoder filter to use instead of the default.
public string Custom_Audio_Decoder { get; set; }Property Value
Remarks
Override the default audio decoder for specific codec support or processing features. Examples: "LAV Audio Decoder", "ffdshow Audio Decoder", "AC3Filter". The decoder must support the audio format in your media files. Use Audio_CustomFilter_ListAll() to enumerate available filters.
Custom_Splitter
Gets or sets the name of a custom splitter/demuxer filter for parsing media containers.
public string Custom_Splitter { get; set; }Property Value
Remarks
Override the default splitter for specific container formats or features. Splitters parse container formats (AVI, MP4, MKV) and separate audio/video streams. Examples: "LAV Splitter", "Haali Media Splitter", "AVI Splitter". Must be compatible with your media format.
Custom_Video_Decoder
Gets or sets the name of a custom video decoder filter to use instead of the default.
public string Custom_Video_Decoder { get; set; }Property Value
Remarks
Override the default video decoder selection for specific codec requirements or hardware decoders. The filter must be installed and registered on the system. Common examples: "LAV Video Decoder", "ffdshow Video Decoder", "Microsoft DTV-DVD Video Decoder". Use Audio_CustomFilter_ListAll() to see available filters.
Debug_Dir
Gets or sets debug directory.
public string Debug_Dir { get; set; }Property Value
Debug_DisableMessageDialogs
Gets or sets a value indicating whether message dialog will be shown in case of error if OnError event is not implemented.
public bool Debug_DisableMessageDialogs { get; set; }Property Value
Debug_Mode
Gets or sets a value indicating whether debug mode enabled.
public bool Debug_Mode { get; set; }Property Value
Debug_Telemetry
Gets or sets a value indicating whether sending telemetry enabled (only during debugging in Visual Studio).
public bool Debug_Telemetry { get; set; }Property Value
Remarks
Only anonymous data will be send.
Encryption_Key
Sets the encryption key for playing protected media files.
public object Encryption_Key { get; set; }Property Value
Remarks
Used for playing encrypted media files. The key format and encryption method must match how the file was encrypted. Common uses:
- DRM-protected content
- Secure media distribution
- Private video archives Set both Encryption_Key and Encryption_KeyType before playback.
Encryption_KeyType
Gets or sets how to interpret the Encryption_Key value.
public EncryptionKeyType Encryption_KeyType { get; set; }Property Value
Remarks
Determines how the Encryption_Key property is processed:
- String: Key is a text string
- Binary: Key is a byte array
- File: Key is a file path to read the key from Set this before playing encrypted content.
Face_Tracking
Gets or sets face detection and tracking configuration.
public FaceTrackingSettings Face_Tracking { get; set; }Property Value
Remarks
Face tracking detects and follows human faces in video:
- Face detection with bounding boxes
- Multiple face tracking
- Optional facial landmark detection
- Face recognition capabilities The OnFaceDetected event fires when faces are found. Requires significant CPU/GPU resources depending on settings.
Info_UseLibMediaInfo
Gets or sets a value indicating whether to use the MediaInfo library for detailed file analysis.
public bool Info_UseLibMediaInfo { get; set; }Property Value
Remarks
MediaInfo provides extensive metadata including codecs, bitrates, frame rates, audio channels, subtitles, and container details. Disable this for faster file loading if detailed metadata isn't needed.
Loop
Gets or sets a value indicating whether media playback should automatically restart when reaching the end.
public bool Loop { get; set; }Property Value
Remarks
When enabled, the OnLoop event fires each time playback restarts. For playlists, this loops the entire playlist, not individual files.
Loop_DoNotSeekToBeginning
Gets or sets a value indicating whether to skip seeking to the beginning when loop mode restarts playback.
public bool Loop_DoNotSeekToBeginning { get; set; }Property Value
Remarks
This property only affects behavior when Loop is true. Use this for seamless looping of content that doesn't require position reset, improving performance and avoiding visual glitches during loop transitions.
MIDI_Renderer
Gets or sets the MIDI synthesizer device for playing MIDI files.
public string MIDI_Renderer { get; set; }Property Value
Remarks
Selects which MIDI synthesizer to use for .mid and .kar file playback. Options typically include "Microsoft GS Wavetable Synth" (default) and any hardware MIDI devices or software synthesizers installed. Better synthesizers provide higher quality instrument sounds.
MaximalSpeedPlayback
Gets or sets a value indicating whether to play media as fast as possible without timing constraints.
public bool MaximalSpeedPlayback { get; set; }Property Value
Remarks
Maximal speed mode is useful for:
- Rapid file analysis or scanning
- Batch processing or transcoding
- Testing and benchmarking Audio is typically disabled in this mode. Actual speed depends on decoding complexity and system performance.
Motion_Detection
Gets or sets motion detection configuration for detecting movement in video.
public MotionDetectionSettings Motion_Detection { get; set; }Property Value
Remarks
Motion detection analyzes video frames to detect movement and can trigger the OnMotion event. Configure sensitivity, detection zones, and algorithms in the settings object. Useful for security, automation, or activity monitoring. Processing overhead depends on algorithm and frame size. Settings are applied immediately to the motion detector if active.
Motion_DetectionEx
Gets or sets advanced motion and object detection configuration.
public MotionDetectionExSettings Motion_DetectionEx { get; set; }Property Value
Remarks
Motion Detection Ex provides advanced detection capabilities:
- Object classification (person, vehicle, animal)
- Object tracking across frames
- Zone-based detection with multiple areas
- Reduced false positives using AI Requires more processing power than basic motion detection. Settings are applied immediately if detection is active.
MultiScreen_Enabled
Gets or sets a value indicating whether multi-monitor video display is enabled.
public bool MultiScreen_Enabled { get; set; }Property Value
Remarks
When enabled, video can be displayed on multiple monitors simultaneously. Configure additional screens using MultiScreen_AddScreen() method. Each screen can have independent size and position settings. Useful for video walls, multi-monitor workstations, or presentation systems. Requires appropriate video renderer (typically VMR9).
NDI_Output
Gets or sets NDI (Network Device Interface) output configuration for network video streaming.
public NDIOutput NDI_Output { get; set; }Property Value
Remarks
NDI enables low-latency video streaming over IP networks for professional workflows. When configured, video is sent to the network instead of screen display. Configure the NDI source name, groups, and other settings in the NDIOutput object. OnVideoFrame events remain available. Requires NDI runtime to be installed.
OSD_Enabled
Gets or sets whether On-Screen Display (OSD) overlay system is enabled.
public bool OSD_Enabled { get; set; }Property Value
Remarks
Must be set before calling Play(). When enabled, you can add text, images, and graphics overlays using OSD_Layers methods. OSD is useful for:
- Watermarks and logos
- Subtitles and captions
- Time/date stamps
- Custom graphics Requires compatible video renderer (EVR or VMR9).
Play_DelayEnabled
Gets or sets a value indicating whether delayed start mode is enabled for synchronized playback.
public bool Play_DelayEnabled { get; set; }Property Value
Remarks
Delayed start allows precise synchronization of multiple players:
- Set Play_DelayEnabled = true
- Call Play() to build the graph and prepare playback
- Call Play_DelayedStart() on all players simultaneously
This minimizes startup lag when synchronizing multiple video streams, as all time-consuming initialization is done in advance.
Play_PauseAtFirstFrame
Gets or sets a value indicating whether to automatically pause after displaying the first frame.
public bool Play_PauseAtFirstFrame { get; set; }Property Value
Remarks
Useful for preview scenarios where you want to show the first frame without playing. The player enters Paused state after the first frame is rendered. Call Resume() to continue playback. This provides a visual preview while keeping the player ready for immediate playback.
ReversePlayback_CacheSize
Gets or sets the number of frames to cache for reverse playback performance.
public int ReversePlayback_CacheSize { get; set; }Property Value
Remarks
Reverse playback requires caching decoded frames because most video codecs only decode forward efficiently. Optimal cache size depends on:
- Video resolution (HD needs more memory)
- Available RAM
- Desired smoothness Typical values: 30-60 for HD, 100+ for SD video.
ReversePlayback_Enabled
Gets or sets a value indicating whether reverse (backwards) playback mode is enabled.
public bool ReversePlayback_Enabled { get; set; }Property Value
Remarks
Reverse playback plays video backwards from current position. This feature:
- Requires Professional edition
- Uses frame caching (configure with ReversePlayback_CacheSize)
- Works best with keyframe-based codecs
- May have performance limitations with high-resolution video When disabled while paused, clears the frame cache and resumes forward playback.
Selection_Active
Gets or sets a value indicating whether playback range selection is active.
public bool Selection_Active { get; set; }Property Value
Remarks
When active, playback is constrained between Selection_Start and Selection_Stop. Useful for playing specific segments, creating clips, or loop points. The player automatically stops or loops when reaching Selection_Stop.
Selection_Start
Gets or sets the start position for range-based playback.
public TimeSpan Selection_Start { get; set; }Property Value
Remarks
Only used when Selection_Active is true. Set this before or during playback to define the beginning of a playback range. The player automatically seeks to this position when starting if beyond it.
Selection_Stop
Gets or sets the end position for range-based playback.
public TimeSpan Selection_Stop { get; set; }Property Value
Remarks
Only used when Selection_Active is true. When playback reaches this position, it stops (or loops if Loop is enabled). Use TimeSpan.Zero to play to the end of the media file.
Source_Custom_CLSID
Gets or sets the CLSID of a custom DirectShow source filter.
public string Source_Custom_CLSID { get; set; }Property Value
Remarks
Use this to specify a custom DirectShow source filter for specialized media formats or hardware devices. The filter must be registered on the system and compatible with IFileSourceFilter or similar interfaces. Only used when Source_Mode is set to appropriate custom mode.
Source_GPU_Mode
Gets or sets the GPU decoder type when using hardware acceleration.
public LAVGPUDecoder Source_GPU_Mode { get; set; }Property Value
Remarks
Hardware decoding offloads video decoding to GPU, reducing CPU usage:
- DXVA2: DirectX Video Acceleration 2 (Windows)
- D3D11: Direct3D 11 (Windows 8+)
- NVIDIA: NVIDIA CUVID/NVDEC
- Intel: Intel Quick Sync Video Only applies when using LAV source mode. The system falls back to software decoding if the selected GPU decoder isn't available.
Source_MemoryStream
Gets or sets the memory stream source for playing media from memory buffers.
[JsonIgnore]
public MemoryStreamSource Source_MemoryStream { get; set; }Property Value
Remarks
Used only when Source_Mode is set to MediaPlayerSourceMode.Memory. Implement the MemoryStreamSource interface to provide media data from memory buffers, encrypted sources, or custom storage. The source must provide data in a format DirectShow can parse (container with headers).
Source_Mode
Gets or sets the media source type determining which playback engine to use.
public MediaPlayerSourceMode Source_Mode { get; set; }Property Value
Remarks
Different source modes offer different capabilities:
- LAV: Best codec support, hardware acceleration, recommended for most uses
- MediaFoundation: Native Windows, good for DRM content
- FFMPEG: Cross-platform, good for streaming protocols
- Memory_DS: For playing from memory buffers
- HTTP_RTSP_VLC: VLC engine for network streams Set before calling Play().
VideoView
Gets or sets the video display surface for rendering video output.
[JsonIgnore]
public IVideoView VideoView { get; set; }Property Value
Remarks
The video view determines where video frames are displayed. Different UI frameworks provide different implementations. Setting this automatically attaches the player to the view. Set to null for audio-only playback or when using Virtual Camera or NDI output modes.
Video_Crop
Gets or sets video cropping configuration to remove unwanted areas.
public VideoCropSettings Video_Crop { get; set; }Property Value
Remarks
Use cropping to:
- Remove black bars (letterboxing/pillarboxing)
- Focus on specific regions of interest
- Change aspect ratio by removing content Crop values are in pixels from each edge. Applied after scaling but before other video effects.
Video_Effects_Enabled
Gets or sets a value indicating whether CPU-based video effects processing is enabled.
public bool Video_Effects_Enabled { get; set; }Property Value
Remarks
This is the master switch for CPU-based video effects (brightness, contrast, deinterlacing, etc.). Individual effects must also be configured via Video_Effects_Add(). For GPU-accelerated effects, use Video_Effects_GPU_Enabled. Enabling effects increases CPU usage and may impact performance.
Video_Effects_GPU_Enabled
Gets or sets a value indicating whether GPU-accelerated video effects are enabled.
public bool Video_Effects_GPU_Enabled { get; set; }Property Value
Remarks
GPU effects provide hardware-accelerated processing for better performance with effects like color correction, denoising, and transitions. Requires compatible graphics hardware (DirectX 11). Configure individual GPU effects via Video_Effects_GPU_Add(). Can be used alongside CPU effects.
Video_Renderer
Gets or sets video renderer configuration including renderer type and display options.
public VideoRendererSettings Video_Renderer { get; set; }Property Value
Remarks
The renderer type affects compatibility and features:
- EVR: Enhanced Video Renderer (Windows 7+) - recommended
- VMR9: Video Mixing Renderer 9 - legacy, supports PiP
- VMR7: Older systems only
- Custom: For special rendering scenarios Changes apply immediately during playback.
Video_Resize
Gets or sets video resizing and scaling configuration.
public IVideoResizeSettings Video_Resize { get; set; }Property Value
Remarks
Configure video scaling for output size different from source:
- VideoResizeSettings: Standard scaling with quality/performance options
- MaxineUpscaleSettings: NVIDIA Maxine AI-powered upscaling (requires RTX GPU)
- MaxineSuperResSettings: Advanced super-resolution (requires capable GPU) Applied before video effects for optimal quality.
Video_Sample_Grabber_UseForVideoEffects
Gets or sets a value indicating whether to use sample grabber for video effects processing.
public bool Video_Sample_Grabber_UseForVideoEffects { get; set; }Property Value
Remarks
Sample grabber mode provides more control over effect processing and ensures effects work with all video formats, but may have slight performance impact. In-place mode is faster but may not support all combinations of codecs and effects. Generally, leave this enabled unless you have specific performance requirements.
Virtual_Camera_Output_AlternativeAudioFilterName
Gets or sets the name of an alternative audio filter to use with Virtual Camera output.
public string Virtual_Camera_Output_AlternativeAudioFilterName { get; set; }Property Value
Remarks
When using Virtual Camera output, you may need to route audio through a specific filter for compatibility or features. The filter can be:
- Audio renderer (e.g., "Default DirectSound Device")
- Audio processor (e.g., "Audio Resampler") This overrides normal audio routing when Virtual_Camera_Output_Enabled is true.
Virtual_Camera_Output_Enabled
Gets or sets a value indicating whether video output is redirected to Virtual Camera SDK.
public bool Virtual_Camera_Output_Enabled { get; set; }Property Value
Remarks
When enabled, video is sent to VisioForge Virtual Camera instead of the display. This allows the media player output to appear as a webcam in other applications. Screen rendering is disabled, but OnVideoFrame events still work for monitoring. Requires Virtual Camera SDK to be installed and licensed.
Virtual_Camera_Output_LicenseKey
Gets or sets the license key for Virtual Camera SDK output functionality.
public string Virtual_Camera_Output_LicenseKey { get; set; }Property Value
Remarks
Required when Virtual_Camera_Output_Enabled is true and using licensed features. Without a valid key, output may include watermarks or time limitations. Contact VisioForge for licensing. The key is validated when starting playback.
IMediaPlayerControls.State
Gets the current playback state of the media player.
PlaybackState IMediaPlayerControls.State { get; }Property Value
Methods
Audio_AdditionalStreams_Add(string)
Add additional audio stream.
public void Audio_AdditionalStreams_Add(string filename)Parameters
filenamestring-
File name.
Audio_AdditionalStreams_Clear()
Clears additional audio streams.
public void Audio_AdditionalStreams_Clear()Audio_AdditionalStreams_GetCount()
Gets the number of external audio files that have been added for playback.
public int Audio_AdditionalStreams_GetCount()Returns
- int
-
The count of additional audio files. Returns 0 if no external audio files have been added. Does not include audio tracks embedded in the main media file.
Remarks
Use this method to verify how many external audio tracks are configured before playback or when building audio track selection UI.
Audio_Effects_Add(int, AudioEffectType, string, bool, TimeSpan, TimeSpan)
Adds a new audio effect to the specified audio stream with timing control. Effects can be enabled/disabled and configured to activate only during specific time intervals of playback.
public void Audio_Effects_Add(int streamIndex, AudioEffectType effectType, string name, bool enabled, TimeSpan startTime, TimeSpan stopTime)Parameters
streamIndexint-
Index of the audio stream to apply the effect to (0-3 for individual streams, -1 for all streams). Use -1 to apply the same effect to all available audio streams simultaneously.
effectTypeAudioEffectType-
Type of audio effect to add (e.g., Amplify, Equalizer, Reverb, etc.). See AudioEffectType enumeration for all available effect types.
namestring-
Unique identifier name for this effect instance. Used to reference this specific effect when modifying parameters or removing it. Must be unique within the stream.
enabledbool-
Initial enabled state of the effect. Set to true to immediately activate the effect, or false to add it in a disabled state (can be enabled later using Audio_Effects_Enable).
startTimeTimeSpan-
Time offset from the beginning of playback when the effect should automatically activate. Use TimeSpan.Zero to start immediately.
stopTimeTimeSpan-
Time offset from the beginning of playback when the effect should automatically deactivate. Use TimeSpan.MaxValue to keep the effect active until the end of playback.
Remarks
Effects are processed in the order they are added to the stream.
Example: Add a reverb effect that activates 10 seconds into playback:
player.Audio_Effects_Add(0, AudioEffectType.Reverb, "myReverb", true,
TimeSpan.FromSeconds(10), TimeSpan.MaxValue);
Audio_Effects_Amplify(int, string, int, bool)
Configures the amplification (volume boost) effect for the specified audio stream. This effect allows precise control over audio volume levels with support for per-channel amplification.
public void Audio_Effects_Amplify(int streamIndex, string name, int volume, bool separate)Parameters
streamIndexint-
Index of the audio stream to configure (0-3 for individual streams, -1 for all streams).
namestring-
The unique identifier name of the amplify effect to configure. This must match the name used when adding the effect with Audio_Effects_Add.
volumeint-
Amplification level where 10000 = 1.0x (no change), 20000 = 2.0x (double volume), 5000 = 0.5x (half volume).
Valid range: 0 to 100000 (0x to 10x amplification)
Common values:
- 10000 - Original volume (1.0x)
- 15000 - 50% louder (1.5x)
- 20000 - Double volume (2.0x)
- 5000 - Half volume (0.5x)
separatebool-
When true, each audio channel can have its own amplification value. When false, all channels use the same amplification value (from channel 0). Use separate=true for stereo effects or multi-channel audio processing.
Remarks
Be careful with high amplification values as they can cause audio clipping and distortion.
Example: Boost volume by 50%:
// First add the effect
player.Audio_Effects_Add(0, AudioEffectType.Amplify, "volumeBoost", true, TimeSpan.Zero, TimeSpan.MaxValue);
// Then configure it
player.Audio_Effects_Amplify(0, "volumeBoost", 15000, false);
Audio_Effects_BandPass(int, string, float, float, bool)
Configures a band-pass filter effect that allows only frequencies within a specified range to pass through while attenuating frequencies outside this range. Useful for isolating specific frequency bands in audio.
public void Audio_Effects_BandPass(int streamIndex, string name, float cutOffHigh, float cutOffLow, bool separate)Parameters
streamIndexint-
Index of the audio stream to configure (0-3 for individual streams, -1 for all streams).
namestring-
The unique identifier name of the band-pass effect to configure. This must match the name used when adding the effect with Audio_Effects_Add.
cutOffHighfloat-
Upper frequency limit in Hz. Frequencies above this value will be attenuated.
Typical range: 100 Hz to 20000 Hz
Common values: 8000 Hz (voice), 15000 Hz (most instruments)
cutOffLowfloat-
Lower frequency limit in Hz. Frequencies below this value will be attenuated.
Typical range: 20 Hz to 10000 Hz
Common values: 80 Hz (remove rumble), 300 Hz (voice fundamentals)
separatebool-
When true, each audio channel can have different cutoff frequencies. When false, all channels use the same frequency range. Use separate=true for creative stereo effects.
Remarks
Band-pass filters are commonly used for:
- Voice isolation (300 Hz - 3000 Hz)
- Instrument isolation in mixing
- Removing unwanted noise outside a frequency range
- Creating "telephone" or "radio" voice effects
Example: Create a "telephone voice" effect:
// Add band-pass effect
player.Audio_Effects_Add(0, AudioEffectType.BandPass, "phoneVoice", true, TimeSpan.Zero, TimeSpan.MaxValue);
// Configure for typical telephone frequency range
player.Audio_Effects_BandPass(0, "phoneVoice", 3400, 300, false);
Audio_Effects_ChannelOrderEx(int, string, byte[,])
Configures channel routing/remapping for multi-channel audio. This effect allows you to rearrange, duplicate, or swap audio channels, useful for fixing incorrect channel mappings or creating special effects.
public void Audio_Effects_ChannelOrderEx(int streamIndex, string name, byte[,] orders)Parameters
streamIndexint-
Index of the audio stream to configure (0-3 for individual streams, -1 for all streams).
namestring-
The unique identifier name of the channel order effect to configure. This must match the name used when adding the effect with Audio_Effects_Add.
ordersbyte[,]-
A 2-dimensional byte array defining the channel mapping. Each row contains a pair: [target_channel, source_channel].
Array structure: orders[n,2] where n is the number of mappings
Example mappings:
- [0,1] - Route source channel 1 to target channel 0
- [1,0] - Route source channel 0 to target channel 1 (swap stereo)
- [0,0] and [1,0] - Duplicate channel 0 to both outputs (mono to stereo)
Remarks
Common use cases:
- Swap left/right stereo channels
- Convert mono to stereo by duplicating
- Extract single channel from multi-channel audio
- Fix 5.1/7.1 surround sound channel mappings
Example: Swap left and right stereo channels:
// Add channel order effect
player.Audio_Effects_Add(0, AudioEffectType.ChannelOrder, "stereoSwap", true, TimeSpan.Zero, TimeSpan.MaxValue);
// Configure to swap channels
byte[,] swapOrder = new byte[,] { {0, 1}, {1, 0} }; // L→R, R→L
player.Audio_Effects_ChannelOrderEx(0, "stereoSwap", swapOrder);
Audio_Effects_Clear(int)
Removes all audio effects from the specified audio stream. This completely clears the effects chain and restores the original unprocessed audio signal.
public void Audio_Effects_Clear(int streamIndex)Parameters
streamIndexint-
Index of the audio stream to clear (0-3 for individual streams, -1 for all streams). Use -1 to remove all effects from all audio streams simultaneously.
Remarks
This method immediately removes all effects including:
- All DSP effects (reverb, echo, chorus, etc.)
- All filters (equalizer, band-pass, etc.)
- All dynamic processors (compressor, limiter, etc.)
- Any custom effects added via CLSIDs
Note: This action cannot be undone. To temporarily disable effects, use Audio_Effects_Enable instead.
Example:
// Clear all effects from stream 0
player.Audio_Effects_Clear(0);
// Clear all effects from all streams
player.Audio_Effects_Clear(-1);
Audio_Effects_Count(int)
Returns the total number of audio effects currently applied to the specified audio stream. Useful for monitoring the effects chain or implementing effect limits.
public int Audio_Effects_Count(int streamIndex)Parameters
streamIndexint-
Index of the audio stream to query (0-3). Note: This method does not support -1 for all streams; you must query each stream individually.
Returns
- int
-
The number of effects currently in the effects chain for the specified stream. Returns 0 if no effects are applied or if the stream index is invalid.
Remarks
The count includes all effect types: built-in effects, DirectSound effects, and custom effects.
Example: Check if effects are applied before clearing:
int effectCount = player.Audio_Effects_Count(0);
if (effectCount > 0)
{
Console.WriteLine($"Stream 0 has {effectCount} effects applied");
player.Audio_Effects_Clear(0);
}
Audio_Effects_DS_Chorus(int, string, float, float, float, float, DSChorusPhase, DSChorusWaveForm, float)
Configures a DirectSound Chorus effect that creates a richer, fuller sound by simulating multiple voices or instruments playing in unison. The effect works by mixing the original signal with slightly delayed and pitch-modulated copies.
public void Audio_Effects_DS_Chorus(int streamIndex, string name, float delay, float depth, float feedback, float frequency, DSChorusPhase phase, DSChorusWaveForm waveformTriangle, float wetDryMix)Parameters
streamIndexint-
Index of the audio stream to configure (0-3 for individual streams, -1 for all streams).
namestring-
The unique identifier name of the chorus effect to configure.
delayfloat-
Base delay time in milliseconds (0.0 - 20.0). Controls the time offset of the chorus voices.
Typical values: 10-25 ms for subtle chorus, 40-60 ms for pronounced effect
depthfloat-
Modulation depth as percentage (0.0 - 100.0). Controls how much the delay time varies.
Higher values create more dramatic pitch variations and "warbling"
feedbackfloat-
Feedback percentage (-99.0 to 99.0). Controls how much of the output is fed back to the input.
Positive values create resonant effects, negative values create hollow effects
frequencyfloat-
LFO (Low Frequency Oscillator) rate in Hz (0.0 - 10.0). Controls the speed of delay modulation.
Lower values (0.1-2.0) create slow, sweeping effects; higher values create vibrato
phaseDSChorusPhase-
Phase relationship between channels (DSChorusPhase enum). Controls stereo width:
- Phase_Neg180 - Wide stereo image
- Phase_Neg90 - Moderate stereo spread
- Phase_Zero - Mono chorus
- Phase_90 - Moderate stereo spread
- Phase_180 - Wide stereo image (inverted)
waveformTriangleDSChorusWaveForm-
LFO waveform shape (DSChorusWaveForm enum). Triangle waves sound smoother, sine waves sound more natural.
wetDryMixfloat-
Balance between processed (wet) and original (dry) signal (0.0 - 100.0).
0 = dry only, 50 = equal mix, 100 = wet only
Remarks
Common chorus settings:
- Subtle thickening: delay=15, depth=10, feedback=0, frequency=1.1, wetDryMix=30
- Classic chorus: delay=30, depth=25, feedback=25, frequency=1.5, wetDryMix=50
- Extreme effect: delay=40, depth=100, feedback=50, frequency=5.0, wetDryMix=70
// Add and configure a classic chorus effect
player.Audio_Effects_Add(0, AudioEffectType.DSChorus, "chorus", true, TimeSpan.Zero, TimeSpan.MaxValue);
player.Audio_Effects_DS_Chorus(0, "chorus", 30.0f, 25.0f, 25.0f, 1.5f,
DSChorusPhase.Phase_90, DSChorusWaveForm.Triangle, 50.0f);
Audio_Effects_DS_Compressor(int, string, float, float, float, float, float, float)
Configures a DirectSound Compressor effect that reduces the dynamic range of audio by automatically lowering the volume of loud sounds while keeping quiet sounds unchanged. Essential for professional audio processing, broadcast limiting, and preventing clipping.
public void Audio_Effects_DS_Compressor(int streamIndex, string name, float attack, float gain, float preDelay, float ratio, float release, float threshold)Parameters
streamIndexint-
Index of the audio stream to configure (0-3 for individual streams, -1 for all streams).
namestring-
The unique identifier name of the compressor effect to configure.
attackfloat-
Attack time in milliseconds (0.01 - 500.0). How quickly the compressor responds to signals exceeding the threshold.
Fast attack (0.1-10 ms): Catches transients but may sound unnatural
Slow attack (10-100 ms): Preserves transients but may miss peaks
gainfloat-
Output gain in dB (-60.0 to 60.0). Compensates for volume reduction caused by compression.
Typically set to restore perceived loudness after compression
preDelayfloat-
Look-ahead time in milliseconds (0.0 - 4.0). Allows the compressor to "see" incoming peaks.
Helps prevent transients from passing through uncompressed
ratiofloat-
Compression ratio (1.0 - 100.0). Determines how much signals above threshold are reduced.
- 1:1 = No compression
- 2:1 = Gentle compression (2 dB input = 1 dB output above threshold)
- 4:1 = Moderate compression
- 10:1 = Heavy compression
- 20:1+ = Limiting
releasefloat-
Release time in milliseconds (50.0 - 3000.0). How quickly compression stops after signal drops below threshold.
Fast release (50-100 ms): Responsive but may cause "pumping"
Slow release (200-1000 ms): Smooth but may over-compress quiet passages
thresholdfloat-
Threshold level in dB (-60.0 to 0.0). Signal level at which compression begins.
0 dB = Compress everything
-10 dB = Compress only loud peaks
-20 to -30 dB = Typical for general compression
Remarks
Common compressor presets:
- Vocal: attack=5, gain=3, preDelay=0, ratio=3, release=100, threshold=-15
- Master bus: attack=10, gain=2, preDelay=0.5, ratio=2, release=200, threshold=-12
- Limiting: attack=0.1, gain=0, preDelay=1, ratio=20, release=50, threshold=-3
- Bass: attack=10, gain=4, preDelay=0, ratio=4, release=200, threshold=-20
// Add and configure compressor for vocals
player.Audio_Effects_Add(0, AudioEffectType.DSCompressor, "vocalComp", true, TimeSpan.Zero, TimeSpan.MaxValue);
player.Audio_Effects_DS_Compressor(0, "vocalComp", 5.0f, 3.0f, 0.0f, 3.0f, 100.0f, -15.0f);
Audio_Effects_DS_Distortion(int, string, float, float, float, float, float)
Configures a DirectSound Distortion effect that adds harmonic content and "grit" to audio by clipping and shaping the waveform. Commonly used for electric guitar, bass, and creative sound design to add aggression, warmth, or lo-fi character to audio.
public void Audio_Effects_DS_Distortion(int streamIndex, string name, float edge, float gain, float postEQBandwidth, float postEQCenterFrequency, float preLowpassCutOff)Parameters
streamIndexint-
Index of the audio stream to configure (0-3 for individual streams, -1 for all streams).
namestring-
The unique identifier name of the distortion effect to configure.
edgefloat-
Distortion intensity/hardness (0.0 - 100.0). Controls the sharpness of clipping.
- 0-20: Soft clipping, warm overdrive
- 20-50: Moderate distortion, tube-like
- 50-80: Hard distortion, aggressive
- 80-100: Extreme clipping, fuzz effect
gainfloat-
Pre-distortion gain in dB (-60.0 to 0.0). Input level before distortion.
Higher values drive the distortion harder, creating more harmonics
Typical: -20 to -10 dB for moderate distortion
postEQBandwidthfloat-
Post-distortion EQ bandwidth in Hz (100.0 - 8000.0). Width of frequency boost/cut.
Narrow (100-500): Focused tone shaping
Wide (1000-8000): Broad tonal changes
postEQCenterFrequencyfloat-
Post-distortion EQ center frequency in Hz (100.0 - 8000.0). Frequency to boost/cut after distortion.
- 200-500 Hz: Adds body and warmth
- 1000-2000 Hz: Adds presence and bite
- 3000-5000 Hz: Adds brightness and edge
preLowpassCutOfffloat-
Pre-distortion low-pass filter cutoff in Hz (100.0 - 8000.0). Removes high frequencies before distortion.
Lower values (500-2000) create smoother, warmer distortion
Higher values (4000-8000) preserve brightness and create harsher tones
Remarks
The signal flow is: Input → Low-pass filter → Gain → Distortion → EQ → Output
Common distortion presets:
- Warm overdrive: edge=15, gain=-15, postEQBandwidth=1000, postEQCenterFrequency=800, preLowpassCutOff=3000
- Rock distortion: edge=50, gain=-10, postEQBandwidth=2000, postEQCenterFrequency=2000, preLowpassCutOff=5000
- Fuzz bass: edge=80, gain=-5, postEQBandwidth=500, postEQCenterFrequency=250, preLowpassCutOff=1000
- Lo-fi effect: edge=30, gain=-20, postEQBandwidth=3000, postEQCenterFrequency=1500, preLowpassCutOff=2000
// Add and configure rock guitar distortion
player.Audio_Effects_Add(0, AudioEffectType.DSDistortion, "rockDist", true, TimeSpan.Zero, TimeSpan.MaxValue);
player.Audio_Effects_DS_Distortion(0, "rockDist", 50.0f, -10.0f, 2000.0f, 2000.0f, 5000.0f);
Audio_Effects_DS_Echo(int, string, float, float, float, int, float)
Configures a DirectSound Echo effect that creates delayed repetitions of the audio signal. Unlike reverb, echo produces distinct, audible repetitions that can create spatial depth, rhythmic patterns, or psychedelic effects.
public void Audio_Effects_DS_Echo(int streamIndex, string name, float feedback, float leftDelay, float rightDelay, int panDelay, float wetDryMix)Parameters
streamIndexint-
Index of the audio stream to configure (0-3 for individual streams, -1 for all streams).
namestring-
The unique identifier name of the echo effect to configure.
feedbackfloat-
Feedback percentage (0.0 - 100.0). Controls how much of the echo output is fed back into the input.
- 0-30: Single or few echoes that fade quickly
- 30-60: Multiple echoes with moderate decay
- 60-90: Many echoes with slow decay
- 90-100: Near-infinite echoes (use carefully to avoid feedback loops)
leftDelayfloat-
Left channel delay in milliseconds (1.0 - 2000.0). Time between original sound and echo.
Common values:
- 50-150 ms: Slapback echo (rockabilly vocals)
- 200-400 ms: Quarter/eighth note echoes at typical tempos
- 500-1000 ms: Long echoes for ambient effects
rightDelayfloat-
Right channel delay in milliseconds (1.0 - 2000.0). Can differ from left for stereo effects.
Set equal to leftDelay for mono echo, or vary for ping-pong effects
panDelayint-
Stereo ping-pong mode (0 or 1). When enabled, echoes alternate between left and right channels.
0 = Normal stereo echo, 1 = Ping-pong echo effect
wetDryMixfloat-
Balance between processed (wet) and original (dry) signal (0.0 - 100.0).
0 = dry only, 50 = equal mix, 100 = wet only
Typical: 20-40 for subtle echo, 50-70 for prominent effect
Remarks
Echo vs Reverb: Echo creates distinct repetitions, while reverb creates a wash of reflections.
Common echo presets:
- Slapback: leftDelay=120, rightDelay=120, feedback=15, panDelay=0, wetDryMix=30
- Stereo spread: leftDelay=250, rightDelay=375, feedback=40, panDelay=0, wetDryMix=35
- Ping-pong: leftDelay=500, rightDelay=500, feedback=50, panDelay=1, wetDryMix=40
- Ambient: leftDelay=1000, rightDelay=1500, feedback=70, panDelay=0, wetDryMix=60
// Add and configure ping-pong echo
player.Audio_Effects_Add(0, AudioEffectType.DSEcho, "pingPong", true, TimeSpan.Zero, TimeSpan.MaxValue);
player.Audio_Effects_DS_Echo(0, "pingPong", 50.0f, 500.0f, 500.0f, 1, 40.0f);
Audio_Effects_DS_Flanger(int, string, float, float, float, float, int, DSFlangerWaveForm, float)
Sets the parameters for the DS Flanger effect.
public void Audio_Effects_DS_Flanger(int streamIndex, string name, float delay, float depth, float feedback, float frequency, int phase, DSFlangerWaveForm waveform, float wetDryMix)Parameters
streamIndexint-
Stream index.
namestring-
The name.
delayfloat-
Specifies the delay of the filter (0.0 - 4.0).
depthfloat-
Specifies the depth of the filter (0.0 - 100.0).
feedbackfloat-
Specifies the feedback of the filter (-99.0 - 99.0).
frequencyfloat-
Specifies the frequency of the filter (0.0 - 10.0).
phaseint-
Specifies the phase angle.
waveformDSFlangerWaveForm-
Specifies the waveform type of the filter.
wetDryMixfloat-
Specifies the wet and dry mix of the filter (0.0 - 100.0).
Remarks
Flange, also called flanger, is an echo effect in which the delay between the original signal and its echo is very short and varies over time. The result is sometimes referred to as a sweeping sound. The term flange originated with the practice of grabbing the flanges of a tape reel to change the speed.
Audio_Effects_DS_Gargle(int, string, int, DSGargleWaveForm)
Sets the parameters for the DS Gargle effect.
public void Audio_Effects_DS_Gargle(int streamIndex, string name, int rateHz, DSGargleWaveForm waveForm)Parameters
streamIndexint-
Stream index.
namestring-
The name.
rateHzint-
Specifies the frequency of the gargle filter (1 - 1000).
waveFormDSGargleWaveForm-
Specifies the waveform type of the filter.
Remarks
The gargle effect modulates the amplitude of the signal.
Audio_Effects_DS_ParamEQ(int, string, float, float, float)
Sets the parameters for the DS ParamEQ effect.
public void Audio_Effects_DS_ParamEQ(int streamIndex, string name, float bandwidth, float center, float gain)Parameters
streamIndexint-
Stream index.
namestring-
The name.
bandwidthfloat-
Specifies the bandwidth of the equalizer (1.0 - 36.0).
centerfloat-
Specifies the center frequency of the equalizer (80.0 - 16000.0).
gainfloat-
Specifies the gain of the equalizer (-15.0 - 15.0).
Remarks
A parametric equalizer amplifies or attenuates signals of a given frequency. Parametric equalizer effects for different pitches can be applied in parallel by setting multiple instances of the effect on the same buffer. In this way, the application can have tone control similar to that provided by a hardware equalizer.
Audio_Effects_DS_Reverb(int, string, float, float, float, float, float, DSI3DL2ReverbPreset, int, int, float, int, float, int, int, float)
Sets the parameters for the DS Reverb effect.
public void Audio_Effects_DS_Reverb(int streamIndex, string name, float decayHFRatio, float decayTime, float density, float diffusion, float HFReference, DSI3DL2ReverbPreset preset, int quality, int reflections, float reflectionsDelay, int reverbValue, float reverbDelay, int room, int roomHF, float roomRollOffFactor)Parameters
streamIndexint-
Stream index.
namestring-
The name.
decayHFRatiofloat-
Specifies the decay HF ratio for the filter (0.1 - 2.0, 0.83 by default).
decayTimefloat-
Specifies the decay time for the filter (0.1 - 20.0, 1.49 by default).
densityfloat-
Specifies the density value for the filter (0 - 100.0, 100.0 by default).
diffusionfloat-
Specifies the diffusion value for the filter (0 - 100.0, 100.0 by default).
HFReferencefloat-
Specifies the HF reference for the filter (20.0 - 20000.0, 5000.0 by default).
presetDSI3DL2ReverbPreset-
Specifies the preset name.
qualityint-
Specifies the quality of the filter (0 - 3, 2 by default).
reflectionsint-
Specifies the reflections value for the filter (-10000 - -1000, -2602 by default).
reflectionsDelayfloat-
Specifies the reflections delay for the filter (0.0 - 0.3, 0.007 by default).
reverbValueint-
Specifies the reverb value for the filter (-10000 - 2000, 200 by default).
reverbDelayfloat-
Specifies the reverb delay for the filter (0.0 - 0.1, 0.011 by default).
roomint-
Specifies the room value for the filter (-10000 - 0, -1000 by default).
roomHFint-
Specifies the room HF value of the filter (-10000 - 0, -100 by default).
roomRollOffFactorfloat-
Specifies the room roll off factor for the filter (0.0 - 10.0, 0.0 by default).
Remarks
Environmental Reverberation filter.
Audio_Effects_DS_WavesReverb(int, string, float, float, float, float)
Sets the parameters for the DS Waves Reverb effect.
public void Audio_Effects_DS_WavesReverb(int streamIndex, string name, float highFreqRTRatio, float inGain, float reverbMix, float reverbTime)Parameters
streamIndexint-
Stream index.
namestring-
The name.
highFreqRTRatiofloat-
Specifies the high frequency ratio (0.001 - 0.999, 0.001 by default).
inGainfloat-
Specifies in-gain of the filter (-96.0 - 0.0, 0.0 by default).
reverbMixfloat-
Specifies the reverb mix of the filter (-96.0 - 0.0, 0.0 by default).
reverbTimefloat-
Specifies the reverb time of the filter (0.001 - 3000.0, 1000.0 by default).
Remarks
The waves reverberation effect is intended for use with music. The waves reverberation DirectX Media Object (DMO) is based on the Waves MaxxVerb technology, which is licensed to Microsoft.
Audio_Effects_DynamicAmplify(int, string, int, int, int)
Sets the parameters for the Dynamic Amplify effect.
public void Audio_Effects_DynamicAmplify(int streamIndex, string name, int attackTime, int maxAmplification, int releaseTime)Parameters
streamIndexint-
Stream index.
namestring-
The name.
attackTimeint-
Specifies the amplification value than will be used when amplifying.
maxAmplificationint-
Sets the amplification for a channel. Default value is 10000, which means that no amplification occurs. A value of 20000 raises the amplification by 2.
releaseTimeint-
Specifies the time in milliseconds that the DSP will wait to continue amplification, after the maximum has been reached.
Remarks
DSP Filter to automatically keep the volume eat a specific maximum value.
Audio_Effects_DynamicAmplify_GetCurrentAmp(int, string)
Gets the value for the current amplification level.
public double Audio_Effects_DynamicAmplify_GetCurrentAmp(int streamIndex, string name)Parameters
Returns
- double
-
System.Double.
Audio_Effects_Enable(int, string, bool)
Enables or disables a specific audio effect without removing it from the effects chain. This allows you to temporarily bypass effects while preserving their configuration.
public void Audio_Effects_Enable(int streamIndex, string name, bool enable)Parameters
streamIndexint-
Index of the audio stream containing the effect (0-3 for individual streams, -1 for all streams).
namestring-
The unique identifier name of the effect to enable/disable. Must match the name used when the effect was added with Audio_Effects_Add.
enablebool-
True to enable (activate) the effect, false to disable (bypass) it. Disabled effects remain in the chain but do not process audio.
Remarks
This method is useful for:
- A/B testing effects by toggling them on/off
- Creating effect presets that can be enabled on demand
- Temporarily bypassing CPU-intensive effects
- Building effect automation systems
Example: Toggle reverb on/off during playback:
// Add reverb but start disabled
player.Audio_Effects_Add(0, AudioEffectType.Reverb, "reverb", false, TimeSpan.Zero, TimeSpan.MaxValue);
// Configure reverb parameters...
// Later, enable reverb
player.Audio_Effects_Enable(0, "reverb", true);
// Disable reverb again
player.Audio_Effects_Enable(0, "reverb", false);
Audio_Effects_Equalizer(int, string, bool, float)
Configures a multi-band graphic equalizer effect for precise frequency control. This professional-grade equalizer supports up to 4096 frequency bands, allowing detailed spectral shaping of audio.
public void Audio_Effects_Equalizer(int streamIndex, string name, bool separate, float maxGainDB = 20)Parameters
streamIndexint-
Index of the audio stream to configure (0-3 for individual streams, -1 for all streams).
namestring-
The unique identifier name of the equalizer effect to configure.
separatebool-
When true, each audio channel can have independent EQ settings. When false, all channels use the same EQ curve (from channel 0). Use separate=true for creative stereo effects or correcting channel imbalances.
maxGainDBfloat-
Maximum gain/attenuation range in decibels (default: 20.0 dB).
Common ranges:
- 6 dB: Subtle adjustments, mastering
- 12 dB: Moderate control, mixing
- 20 dB: Full control, corrective EQ
- 30 dB: Extreme adjustments, special effects
Remarks
The equalizer uses FFT-based processing with these band options:
- 10 bands: Basic tone control (typical graphic EQ)
- 31 bands: Professional 1/3 octave equalizer
- 128+ bands: Surgical precision for mastering
- Up to 4096 bands: Ultra-precise spectral control
After adding the equalizer, use Audio_Effects_Equalizer_Band_Set to adjust individual bands, or Audio_Effects_Equalizer_Preset_Set to apply standard presets.
// Add and configure 10-band equalizer
player.Audio_Effects_Add(0, AudioEffectType.Equalizer, "eq10", true, TimeSpan.Zero, TimeSpan.MaxValue);
player.Audio_Effects_Equalizer(0, "eq10", false, 12.0f);
// Boost bass and treble (smile curve)
player.Audio_Effects_Equalizer_Band_Set(0, "eq10", 0, 60); // +6dB at low freq
player.Audio_Effects_Equalizer_Band_Set(0, "eq10", 9, 40); // +4dB at high freq
Audio_Effects_Equalizer_Band_Get(int, string, int)
Gets the current level of audio volume for the selected equalizer band in % (slider).
public int Audio_Effects_Equalizer_Band_Get(int streamIndex, string name, int index)Parameters
Returns
- int
-
System.Int32.
Audio_Effects_Equalizer_Band_Set(int, string, int, int)
Sets the current level of audio volume for the selected equalizer band (slider).
public void Audio_Effects_Equalizer_Band_Set(int streamIndex, string name, int index, int value)Parameters
streamIndexint-
Stream index.
namestring-
The name.
indexint-
Band index.
valueint-
Gain value (in dB).
Audio_Effects_Equalizer_Preset_Set(int, string, EqualizerPreset)
Sets the equalizer preset value.
public void Audio_Effects_Equalizer_Preset_Set(int streamIndex, string name, EqualizerPreset preset)Parameters
streamIndexint-
Stream index.
namestring-
The name.
presetEqualizerPreset-
Preset.
Audio_Effects_Equalizer_Presets()
Gets equalizer presets list.
public ObservableCollection<string> Audio_Effects_Equalizer_Presets()Returns
- ObservableCollection<string>
-
ObservableCollection<System.String>.
Audio_Effects_Fades(int, string, int, int, TimeSpan, TimeSpan, bool)
Sets the parameters for the Fade effect.
public void Audio_Effects_Fades(int streamIndex, string name, int startVolume, int stopVolume, TimeSpan startTime, TimeSpan stopTime, bool separate)Parameters
streamIndexint-
Stream index.
namestring-
The name.
startVolumeint-
Start volume.
stopVolumeint-
Stop volume.
startTimeTimeSpan-
Start time.
stopTimeTimeSpan-
Stop time.
separatebool-
Enables or Disables separate fades. If Enabled every channel will be faded by it's own fade value. If Disabled every channel will be faded with the fade value of channel 0.
Audio_Effects_Flanger(int, string, float, float, bool, bool)
Sets the parameters for the Flanger effect.
public void Audio_Effects_Flanger(int streamIndex, string name, float delay, float frequency, bool phaseInvert, bool separate)Parameters
streamIndexint-
Stream index.
namestring-
The name.
delayfloat-
Specifies the delay time in seconds.
frequencyfloat-
Specifies the flanger frequency.
phaseInvertbool-
Specifies whether the added signal should be inverted.
separatebool-
Enables or Disables separate amplification. If Enabled every channel will be amplified by it's own amplification value. If Disabled every channel will be amplified with the amplification value of channel 0.
Remarks
Filter to flange audio data. Every channel can be controlled separately.
Audio_Effects_HighPass(int, string, int, bool)
Sets the parameters for the High Pass effect.
public void Audio_Effects_HighPass(int streamIndex, string name, int cutOff, bool separate)Parameters
streamIndexint-
Stream index.
namestring-
The name.
cutOffint-
The cut Off.
separatebool-
Enables or Disables separate cutoff. If Enabled every channel will be processed by it's own cutoff value. If Disabled every channel will be processed with the cutoff value of channel 0.
Remarks
Filter that cuts Frequencies from a specified frequency to half of the sampling rate. Each channel can be separate processed with different cutoff values.
Audio_Effects_LowPass(int, string, int, bool)
Sets the parameters for the Low Pass effect.
public void Audio_Effects_LowPass(int streamIndex, string name, int cutOff, bool separate)Parameters
streamIndexint-
The stream Index.
namestring-
The name.
cutOffint-
Specifies the cutoff frequency for a specific channel at which the cutoff will end.
separatebool-
Enables or Disables separate cutoff. If Enabled every channel will be processed by it's own cutoff value. If Disabled every channel will be processed with the cutoff value of channel 0.
Remarks
Filter that cuts frequencies from 0 to a specified frequency. Each channel can be separate processed with different cutoff values.
Audio_Effects_Notch(int, string, int, bool)
Sets the parameters for the Notch effect.
public void Audio_Effects_Notch(int streamIndex, string name, int cutOff, bool separate)Parameters
streamIndexint-
Stream index.
namestring-
The name.
cutOffint-
Specifies the cutoff frequency for a specific channel at which the cutoff will have it's maximum amplification.
separatebool-
Enables or Disables separate cutoff. If Enabled every channel will be processed by it's own cutoff value. If Disabled every channel will be processed with the cutoff value of channel 0.
Remarks
Filter that cuts frequency's in a wide range of specified frequency. Each channel can be separate processed with different cutoff values.
Audio_Effects_ParametricEQ(int, string, float, float, float, bool)
Sets the parameters for the ParametricEQ effect.
public void Audio_Effects_ParametricEQ(int streamIndex, string name, float frequency, float gain, float q, bool separate)Parameters
streamIndexint-
Stream index.
namestring-
The name.
frequencyfloat-
Specifies the center frequency of the filter.
gainfloat-
Specifies the gain in DB of the filter.
qfloat-
Specifies the Q (bandwidth) of the filter.
separatebool-
Enables or Disables separate amplification. If Enabled every channel will be amplified by it's own amplification value. If Disabled every channel will be amplified with the amplification value of channel 0.
Remarks
Parametric equalizer filter. Every channel can be controlled separately.
Audio_Effects_PhaseInvert(int, string, bool, bool)
Sets the parameters for the Phase Invert effect.
public void Audio_Effects_PhaseInvert(int streamIndex, string name, bool invert, bool separate)Parameters
streamIndexint-
Stream index.
namestring-
The name.
invertbool-
Enables and Disables phase invert for a specific channel.
separatebool-
Enables or Disables separate invert. If Enabled every channel will be inverted by it's own invert value. If Disabled every channel will be inverted by the value of channel 0.
Remarks
Phase invert component that inverts specific channels.
Audio_Effects_Phaser(int, string, byte, byte, byte, float, bool, byte, float)
Sets the parameters for the Phaser effect.
public void Audio_Effects_Phaser(int streamIndex, string name, byte depth, byte dryWetRatio, byte feedback, float frequency, bool separate, byte stages, float startPhase)Parameters
streamIndexint-
Stream index.
namestring-
The name.
depthbyte-
Sets Phaser depth (0 - 255).
dryWetRatiobyte-
Sets dry-wet mix ratio. 0 - dry, 255 - wet (0 - 255).
feedbackbyte-
Sets phaser feedback. 0 - no feedback, 100 = 100% feedback, -100 = -100% feedback (-100 - 100).
frequencyfloat-
Sets phaser's LFO frequency.
separatebool-
Enables or Disables separate phasing. If Enabled every channel will be phased by it's own phasing value. If Disabled every channel will be phased with the phasing value of channel 0.
stagesbyte-
Sets phaser stages. Recommended from 2 to 24.
startPhasefloat-
Sets phaser's LFO start phase in radians. Needed for stereo phasers.
Remarks
Class for phasing amplify audio data. Phasing can be done separate on each channel.
Audio_Effects_PitchShift(int, string, float)
Sets the parameters for the Pitch Shift effect.
public void Audio_Effects_PitchShift(int streamIndex, string name, float pitch)Parameters
streamIndexint-
Stream index.
namestring-
The name.
pitchfloat-
Specifies the pitch. Default value is 1.0f, which means that no pitch is done.
Remarks
Pitch shift filter to increase speed and pitch of audio data.
Audio_Effects_SetCurrentChannel(int, string, sbyte)
Sets the current audio channel for the audio effects.
public void Audio_Effects_SetCurrentChannel(int streamIndex, string name, sbyte channel)Parameters
streamIndexint-
Stream index.
namestring-
The name.
channelsbyte-
Channel. -1 to process all channels.
Audio_Effects_Sound3D(int, string, int)
Sets the parameters for the Sound3D effect.
public void Audio_Effects_Sound3D(int streamIndex, string name, int volume)Parameters
streamIndexint-
Stream index.
namestring-
The name.
volumeint-
Sets the 3D amplification value. A value of 1000 is the same as disabling the filter. Values smaller then 1000 is the same as doing a downmix (mono) of the 2 channels. Values higher then 10000 will distort the sound.
Remarks
3D Sound amplification filter that works on 2 channels only. The difference between left and right channel is calculated and added to the main signal.
Audio_Effects_TrebleEnhancer(int, string, int, bool, int)
Sets the parameters for the Treble Enhancer effect.
public void Audio_Effects_TrebleEnhancer(int streamIndex, string name, int frequency, bool separate, int volume)Parameters
streamIndexint-
Stream index.
namestring-
The name.
frequencyint-
Specifies the frequency range that will be used to amplify. Range is frequency to (sample rate div 2).
separatebool-
Enables or Disables separate amplification. If Enabled every channel will be amplified by it's own amplification value. If Disabled every channel will be amplified with the amplification value of channel 0.
volumeint-
Sets the amplification for a channel. Default value is 0, which means that no amplification occurs. The value shouldn't go over 10000. If separate is True, then every channel will be amplified by its own channel amplification value. If separate is False, then every channel is amplified with the value of channel 0.
Remarks
Filter to amplify high frequency's of audio data. The frequency range can be adjusted.
Audio_Effects_TrueBass(int, string, int, bool, int)
Sets the parameters for the True Bass effect.
public void Audio_Effects_TrueBass(int streamIndex, string name, int frequency, bool separate, int volume)Parameters
streamIndexint-
Stream index.
namestring-
The name.
frequencyint-
Specifies the frequency range that will be used to amplify. Range is 0 to frequency.
separatebool-
Enables or Disables separate amplification. If Enabled every channel will be amplified by it's own amplification value. If Disabled every channel will be amplified with the amplification value of channel 0.
volumeint-
Sets the amplification for a channel. Default value is 0, which means that no amplification occurs. The value shouldn't go over 10000. If separate is True, then every channel will be amplified by its own channel amplification value. If separate is False, then every channel is amplified with the value of channel 0.
Remarks
Filter to amplify low frequency's of audio data. The frequency range can be adjusted.
Audio_Effects_UseCustomAudioEffectsFilters(List<Guid>)
Registers custom audio effect filters for use in the media player by providing their CLSIDs (Class Identifiers). This method allows integration of third-party or custom DirectShow audio filters that are not built into the SDK.
public void Audio_Effects_UseCustomAudioEffectsFilters(List<Guid> clsidList)Parameters
clsidListList<Guid>-
List of CLSIDs (GUIDs) for custom audio filters. Each CLSID corresponds to a registered DirectShow filter. The number of CLSIDs should match the number of audio streams you want to apply custom effects to.
Remarks
Use this method when you need to apply specialized audio processing that is not available through the built-in effects.
Example usage:
var customFilters = new List<Guid>
{
new Guid("12345678-1234-1234-1234-123456789012"), // Custom filter for stream 0
new Guid("87654321-4321-4321-4321-210987654321") // Custom filter for stream 1
};
player.Audio_Effects_UseCustomAudioEffectsFilters(customFilters);
Exceptions
- NullReferenceException
-
Thrown when clsidList is null.
Audio_Enhancer_AutoGain(int, bool)
Applies audio auto gain enhancement.
public void Audio_Enhancer_AutoGain(int streamIndex, bool enabled)Parameters
Audio_Enhancer_AutoGainAsync(int, bool)
Applies audio auto gain enhancement (async).
public Task Audio_Enhancer_AutoGainAsync(int streamIndex, bool enabled)Parameters
Returns
- Task
-
Task.
Audio_Enhancer_AutoGainIntl(int, bool)
Applies audio auto gain enhancement.
public void Audio_Enhancer_AutoGainIntl(int streamIndex, bool enabled)Parameters
Audio_Enhancer_InputGains(int, AudioEnhancerGains)
Applies audio input gains enhancement.
public void Audio_Enhancer_InputGains(int streamIndex, AudioEnhancerGains gains)Parameters
streamIndexint-
Stream index. -1 for all streams.
gainsAudioEnhancerGains-
Gains.
Audio_Enhancer_InputGainsAsync(int, AudioEnhancerGains)
Applies audio input gains enhancement (async).
public Task Audio_Enhancer_InputGainsAsync(int streamIndex, AudioEnhancerGains gains)Parameters
streamIndexint-
Stream index. -1 for all streams.
gainsAudioEnhancerGains-
Gains.
Returns
- Task
-
Task.
Audio_Enhancer_InputGainsIntl(int, AudioEnhancerGains)
Applies audio input gains enhancement.
public void Audio_Enhancer_InputGainsIntl(int streamIndex, AudioEnhancerGains gains)Parameters
streamIndexint-
Stream index. -1 for all streams.
gainsAudioEnhancerGains-
Gains.
Audio_Enhancer_Normalize(int, bool)
Applies audio normalize enhancement.
public void Audio_Enhancer_Normalize(int streamIndex, bool enabled)Parameters
Audio_Enhancer_NormalizeAsync(int, bool)
Applies audio normalize enhancement (async).
public Task Audio_Enhancer_NormalizeAsync(int streamIndex, bool enabled)Parameters
Returns
- Task
-
Task.
Audio_Enhancer_NormalizeIntl(int, bool)
Applies audio normalize enhancement.
public void Audio_Enhancer_NormalizeIntl(int streamIndex, bool enabled)Parameters
Audio_Enhancer_OutputGains(int, AudioEnhancerGains)
Applies audio output gains enhancement.
public void Audio_Enhancer_OutputGains(int streamIndex, AudioEnhancerGains gains)Parameters
streamIndexint-
Stream index. -1 for all streams.
gainsAudioEnhancerGains-
Gains.
Audio_Enhancer_OutputGainsAsync(int, AudioEnhancerGains)
Applies audio output gains enhancement (async).
public Task Audio_Enhancer_OutputGainsAsync(int streamIndex, AudioEnhancerGains gains)Parameters
streamIndexint-
Stream index. -1 for all streams.
gainsAudioEnhancerGains-
Gains.
Returns
- Task
-
Task.
Audio_Enhancer_OutputGainsIntl(int, AudioEnhancerGains)
Applies audio output gains enhancement.
public void Audio_Enhancer_OutputGainsIntl(int streamIndex, AudioEnhancerGains gains)Parameters
streamIndexint-
Stream index. -1 for all streams.
gainsAudioEnhancerGains-
Gains.
Audio_Enhancer_Timeshift(int, int)
Applies audio delay.
public void Audio_Enhancer_Timeshift(int streamIndex, int timeshift)Parameters
streamIndexint-
Stream index. -1 for all streams.
timeshiftint-
Time shift delay (milliseconds). Range is [-2000; 2000].
Audio_Enhancer_TimeshiftAsync(int, int)
Applies audio delay (async).
public Task Audio_Enhancer_TimeshiftAsync(int streamIndex, int timeshift)Parameters
streamIndexint-
Stream index. -1 for all streams.
timeshiftint-
Time shift delay (milliseconds). Range is [-2000; 2000].
Returns
- Task
-
Task.
Audio_Enhancer_TimeshiftIntl(int, int)
Applies audio delay.
public void Audio_Enhancer_TimeshiftIntl(int streamIndex, int timeshift)Parameters
streamIndexint-
Stream index. -1 for all streams.
timeshiftint-
Time shift delay (milliseconds). Range is [-2000; 2000].
Audio_OutputDevice_Balance_Get(int)
Gets current balance value for selected audio output device.
public int Audio_OutputDevice_Balance_Get(int streamIndex)Parameters
streamIndexint-
Stream index.
Returns
- int
-
System.Int32.
Audio_OutputDevice_Balance_Set(int, int)
Sets current balance value for selected audio output device.
public void Audio_OutputDevice_Balance_Set(int streamIndex, int balance)Parameters
Audio_OutputDevice_Volume_Get(int)
Gets current volume value for selected audio output device.
public int Audio_OutputDevice_Volume_Get(int streamIndex)Parameters
streamIndexint-
Stream index.
Returns
- int
-
System.Int32.
Audio_OutputDevice_Volume_Set(int, int)
Sets current volume value for selected audio output device.
public void Audio_OutputDevice_Volume_Set(int streamIndex, int volume)Parameters
Audio_OutputDevices()
Gets audio output device list.
public ObservableCollection<string> Audio_OutputDevices()Returns
- ObservableCollection<string>
-
ObservableCollection<System.String>.
Audio_Streams_AllInOne()
Returns true if splitter have one pin for all audio streams and only one stream can be used at the same time.
public bool Audio_Streams_AllInOne()Returns
Audio_Streams_Count()
Gets audio streams count (if playback started already).
public int Audio_Streams_Count()Returns
Audio_Streams_Set(int, bool)
Enables/disables audio stream.
public bool Audio_Streams_Set(int streamIndex, bool enabled)Parameters
Returns
- bool
-
trueif successful,falseotherwise.
Audio_Streams_SetAsync(int, bool)
Enables/disables audio stream (async).
public Task<bool> Audio_Streams_SetAsync(int streamIndex, bool enabled)Parameters
Returns
CallVideoRendererUpdate(int, int, bool)
Calls the video renderer update.
public void CallVideoRendererUpdate(int width, int height, bool updateHandle)Parameters
ConvertHexStringToByteArray(string)
Converts a hexadecimal string representation to its equivalent byte array. Useful for processing color values, binary data, or filter parameters.
public byte[] ConvertHexStringToByteArray(string hexString)Parameters
hexStringstring-
Hexadecimal string to convert. Can include spaces between hex pairs. Supports formats like "FF00FF", "FF 00 FF", or "0xFF0xFF". Must contain an even number of hex digits.
Returns
- byte[]
-
Byte array containing the converted values. Returns null if the input string is invalid or contains non-hexadecimal characters.
Remarks
This utility method is used internally for:
- Converting color values from string configuration
- Processing binary filter parameters
- Handling custom codec data
Example usage:
// Convert color value
byte[] colorBytes = player.ConvertHexStringToByteArray("FF0080");
// Results in: [255, 0, 128]
// Convert with spaces
byte[] data = player.ConvertHexStringToByteArray("01 02 03 04");
// Results in: [1, 2, 3, 4]
CreateAsync(IVideoView)
Asynchronously creates a new MediaPlayerCore instance with a specified video view.
public static Task<MediaPlayerCore> CreateAsync(IVideoView videoView)Parameters
videoViewIVideoView-
The IVideoView implementation that will display video output. Can be a WPF, WinForms, MAUI, or other supported UI control.
Returns
- Task<MediaPlayerCore>
-
A task that returns a fully initialized MediaPlayerCore instance ready for use.
Remarks
This factory method is recommended for UI applications to prevent blocking during initialization. The video view is automatically attached and configured for optimal rendering based on the UI framework.
CreateAsync()
Asynchronously creates a new MediaPlayerCore instance without a video view.
public static Task<MediaPlayerCore> CreateAsync()Returns
- Task<MediaPlayerCore>
-
A task that returns a fully initialized MediaPlayerCore instance ready for use.
Remarks
Use this factory method for audio-only playback, background processing, or when you'll set the video view later. The player is fully functional but won't display video until a video view is attached.
CustomRedist_Enable(bool)
Enables or disables the use of custom redistributable filters.
public void CustomRedist_Enable(bool enabled)Parameters
enabledbool-
true to load filters from CustomRedist_Path; false to use only system-registered filters.
Remarks
Call this before initializing playback. When enabled, filters from the custom path take precedence over system filters. Useful for ensuring consistent behavior across different systems or using specific filter versions.
CustomRedist_IsEnabled()
Gets whether custom redistributable filter loading is currently enabled.
public bool CustomRedist_IsEnabled()Returns
- bool
-
true if loading filters from custom path; false if using system filters only.
Remarks
Use this to verify the current filter loading configuration, especially when troubleshooting codec issues or verifying deployment settings.
DVD_Chapter_GetCurrent()
Gets the current chapter number being played in the active DVD title.
public int DVD_Chapter_GetCurrent()Returns
- int
-
Zero-based index of the current chapter. Returns -1 if no chapter is playing or DVD is not loaded. For example, if playing chapter 3, this returns 2.
Remarks
DVD chapters are segments within a title (movie). Most DVDs organize content into titles and chapters for easy navigation, similar to chapters in a book.
Use DVD_Chapter_GetCurrent in combination with chapter navigation methods like DVD_Chapter_Next or DVD_Chapter_Select to implement custom DVD navigation controls.
DVD_Chapter_Next()
Navigates to and plays the next chapter in the current DVD title.
public bool DVD_Chapter_Next()Returns
- bool
-
True if navigation was successful, false if failed (e.g., already at last chapter, DVD not playing, or navigation error).
Remarks
This is the synchronous version. For async operations, use DVD_Chapter_NextAsync.
Common usage scenario for implementing "Next Chapter" button:
private void btnNextChapter_Click(object sender, EventArgs e)
{
if (!player.DVD_Chapter_Next())
{
MessageBox.Show("Cannot skip to next chapter");
}
}
DVD_Chapter_NextAsync()
Asynchronously navigates to and plays the next chapter in the current DVD title.
public Task<bool> DVD_Chapter_NextAsync()Returns
- Task<bool>
-
A task that represents the asynchronous operation. The task result contains true if navigation was successful, false if failed (e.g., already at last chapter or DVD error).
Remarks
This method is for use with async/await patterns. For synchronous operation, use DVD_Chapter_Next.
If currently playing the last chapter of a title, this method will return false and playback continues.
Example usage:
bool success = await player.DVD_Chapter_NextAsync();
if (!success)
{
Console.WriteLine("Cannot skip to next chapter - possibly at end of title");
}
DVD_Chapter_Prev()
Navigates to and plays the previous chapter in the current DVD title.
public bool DVD_Chapter_Prev()Returns
- bool
-
True if navigation was successful, false if failed (e.g., already at first chapter, DVD not playing, or navigation error).
Remarks
This is the synchronous version. For async operations, use DVD_Chapter_PrevAsync.
If currently at the beginning of a chapter, this will jump to the start of the previous chapter. If at the first chapter, the method returns false and playback continues.
Example implementation of chapter navigation controls:
private void btnPrevChapter_Click(object sender, EventArgs e)
{
if (!player.DVD_Chapter_Prev())
{
MessageBox.Show("Already at first chapter");
}
}
DVD_Chapter_PrevAsync()
Play previous chapter (async).
public Task<bool> DVD_Chapter_PrevAsync()Returns
DVD_Chapter_Replay()
Restarts playback from the beginning of the current chapter.
public bool DVD_Chapter_Replay()Returns
- bool
-
True if the chapter was successfully restarted, false if the operation failed (e.g., DVD not playing or navigation error).
Remarks
This is useful for implementing a "replay chapter" feature or returning to the start of a chapter after seeking within it.
The playback position will jump to the beginning of the current chapter and continue playing.
Example usage:
// Replay current chapter when user presses a hotkey
private void OnReplayHotkey()
{
if (player.DVD_Chapter_Replay())
{
statusLabel.Text = "Chapter restarted";
}
}
DVD_Chapter_ReplayAsync()
Replay current chapter (async).
public Task<bool> DVD_Chapter_ReplayAsync()Returns
DVD_Chapter_Select(int)
Jumps to and starts playback from a specific chapter within the current DVD title.
public void DVD_Chapter_Select(int index)Parameters
indexint-
Zero-based chapter index to play. For example, 0 for first chapter, 1 for second chapter, etc. Must be a valid chapter index within the current title.
Remarks
This method allows direct chapter access, useful for implementing chapter selection menus or bookmarking functionality.
If the specified chapter index is invalid (out of range), the DVD navigator may ignore the request or generate an error event.
Example: Create a chapter selection menu:
// Populate chapter list (assuming you know the chapter count)
for (int i = 0; i < chapterCount; i++)
{
listBoxChapters.Items.Add($"Chapter {i + 1}");
}
// Handle chapter selection
private void listBoxChapters_SelectedIndexChanged(object sender, EventArgs e)
{
player.DVD_Chapter_Select(listBoxChapters.SelectedIndex);
}
DVD_Chapter_SelectAsync(int)
Starts playback from the specified chapter in the current title (async).
public Task DVD_Chapter_SelectAsync(int index)Parameters
indexint-
Chapter index.
Returns
DVD_Menu_ResumePlayback()
Replay current chapter.
public bool DVD_Menu_ResumePlayback()Returns
DVD_Menu_ResumePlaybackAsync()
Replay current chapter (async).
public Task<bool> DVD_Menu_ResumePlaybackAsync()Returns
DVD_Menu_Show(DVDMenu)
Displays the specified DVD menu (main menu, chapter selection, audio options, etc.) if available on the disc.
public bool DVD_Menu_Show(DVDMenu menuType)Parameters
menuTypeDVDMenu-
The type of DVD menu to display (DVDMenu enumeration). Common types include:
- Title - Main/Top menu of the DVD
- Root - Root menu (often same as Title)
- Chapter - Chapter selection menu
- Audio - Audio track selection menu
- Subpicture - Subtitle selection menu
- Angle - Camera angle selection (for multi-angle DVDs)
Returns
- bool
-
True if the menu was successfully displayed, false if the menu is not available on this DVD or if navigation failed.
Remarks
Not all DVDs contain all menu types. Calling this method for an unavailable menu will return false.
When a menu is displayed, use mouse clicks or DVD navigation commands to interact with it.
Example: Implement DVD menu buttons:
private void btnMainMenu_Click(object sender, EventArgs e)
{
if (!player.DVD_Menu_Show(DVDMenu.Title))
{
MessageBox.Show("Main menu not available on this DVD");
}
}
private void btnChapterMenu_Click(object sender, EventArgs e)
{
player.DVD_Menu_Show(DVDMenu.Chapter);
}
DVD_Menu_ShowAsync(DVDMenu)
Displays the specified menu, if available (async).
public Task<bool> DVD_Menu_ShowAsync(DVDMenu menuType)Parameters
menuTypeDVDMenu-
Menu type.
Returns
DVD_Select_AudioStream(int)
Selects which audio stream (language track) to play from the available audio streams on the DVD.
public void DVD_Select_AudioStream(int streamIndex)Parameters
streamIndexint-
Zero-based index of the audio stream to activate. The number and type of available streams depends on the DVD content. Common examples:
- 0 - Primary language (often English)
- 1 - Secondary language (e.g., Spanish, French)
- 2+ - Additional languages or commentary tracks
Remarks
DVDs often contain multiple audio tracks for different languages, commentary tracks, or different audio formats (stereo, 5.1 surround, etc.).
Use the DVD info methods to query available audio streams before selection.
The change takes effect immediately during playback.
Example: Create an audio track selector:
// Get available audio streams (pseudo-code - use actual DVD info methods)
var audioStreams = GetDVDAudioStreams();
// Populate audio menu
for (int i = 0; i < audioStreams.Count; i++)
{
comboAudio.Items.Add($"{audioStreams[i].Language} - {audioStreams[i].Format}");
}
// Handle selection
private void comboAudio_SelectedIndexChanged(object sender, EventArgs e)
{
player.DVD_Select_AudioStream(comboAudio.SelectedIndex);
}
DVD_Select_AudioStreamAsync(int)
Selects the audio stream to play (async).
public Task DVD_Select_AudioStreamAsync(int streamIndex)Parameters
streamIndexint-
The stream index.
Returns
DVD_Select_SubpictureStream(int)
Selects which subpicture (subtitle) stream to display, or disables subtitles entirely.
public void DVD_Select_SubpictureStream(int streamIndex)Parameters
streamIndexint-
Zero-based index of the subtitle stream to display, or -1 to disable all subtitles. Common subtitle streams include:
- 0 - Primary subtitle language
- 1+ - Additional subtitle languages
- -1 - Turn off all subtitles
Remarks
DVD subpictures include subtitles, captions, and sometimes karaoke lyrics or director's notes.
Not all DVDs include subtitle streams. The availability and languages depend on the disc.
Subtitles are overlaid on the video during playback and can be turned on/off at any time.
Example: Implement subtitle controls:
// Turn off subtitles
player.DVD_Select_SubpictureStream(-1);
// Enable first subtitle stream (usually primary language)
player.DVD_Select_SubpictureStream(0);
// Create subtitle menu
private void PopulateSubtitleMenu()
{
comboSubtitles.Items.Add("Off");
comboSubtitles.Items.Add("English");
comboSubtitles.Items.Add("Spanish");
comboSubtitles.Items.Add("French");
}
private void comboSubtitles_SelectedIndexChanged(object sender, EventArgs e)
{
player.DVD_Select_SubpictureStream(comboSubtitles.SelectedIndex - 1);
}
DVD_Select_SubpictureStreamAsync(int)
Method sets the subpicture stream to display (async).
public Task DVD_Select_SubpictureStreamAsync(int streamIndex)Parameters
streamIndexint-
The stream index.
Returns
DVD_SetDisplayMode(DVDDisplayMode)
Sets the video display mode for DVD playback, controlling how widescreen content is displayed on different aspect ratio screens.
public void DVD_SetDisplayMode(DVDDisplayMode mode)Parameters
modeDVDDisplayMode-
The display mode to use (DVDDisplayMode enumeration):
- FullScreen - Stretches video to fill the entire display (may distort aspect ratio)
- LetterBox - Preserves aspect ratio with black bars on top/bottom for widescreen content on 4:3 displays
- PanScan - Crops sides of widescreen content to fill 4:3 display (may lose picture information)
- Original - Uses the DVD's default display mode
Remarks
This setting affects how anamorphic (widescreen) DVDs are displayed. The actual result depends on both this setting and the DVD's encoding.
Modern displays are typically 16:9, but older content may be 4:3. This method helps adapt content to different display aspect ratios.
Example: Let users choose their preferred display mode:
private void RadioButtonDisplayMode_CheckedChanged(object sender, EventArgs e)
{
if (radioLetterbox.Checked)
player.DVD_SetDisplayMode(DVDDisplayMode.LetterBox);
else if (radioPanScan.Checked)
player.DVD_SetDisplayMode(DVDDisplayMode.PanScan);
else if (radioFullScreen.Checked)
player.DVD_SetDisplayMode(DVDDisplayMode.FullScreen);
}
DVD_SetDisplayModeAsync(DVDDisplayMode)
Sets the specified video mode display (wide screen, letterbox, or pan-scan) for playback (async).
public Task DVD_SetDisplayModeAsync(DVDDisplayMode mode)Parameters
modeDVDDisplayMode-
Display mode.
Returns
DVD_SetSpeed(double, bool)
Controls DVD playback speed and direction, allowing fast forward, slow motion, and reverse playback.
public bool DVD_SetSpeed(double speed, bool backward)Parameters
speeddouble-
Playback speed multiplier. Common values:
- 0.5 - Half speed (slow motion)
- 1.0 - Normal speed
- 2.0 - Double speed (2x fast forward)
- 4.0 - 4x fast forward
- 8.0 - 8x fast forward
backwardbool-
False for forward playback, true for reverse/backward playback. Note: Not all DVDs or decoders support reverse playback.
Returns
- bool
-
True if the speed change was successful, false if the requested speed/direction is not supported or if an error occurred.
Remarks
DVD players typically support specific speed increments (1x, 2x, 4x, 8x, 16x, 32x). Requesting unsupported speeds may result in the nearest supported speed being used.
Audio is typically muted during fast forward/rewind operations.
Example: Implement transport controls:
// Fast forward
private void btnFastForward_Click(object sender, EventArgs e)
{
currentSpeed *= 2;
if (currentSpeed > 32) currentSpeed = 32;
player.DVD_SetSpeed(currentSpeed, false);
}
// Rewind
private void btnRewind_Click(object sender, EventArgs e)
{
player.DVD_SetSpeed(4.0, true);
}
// Resume normal playback
private void btnPlay_Click(object sender, EventArgs e)
{
player.DVD_SetSpeed(1.0, false);
currentSpeed = 1.0;
}
DVD_SetSpeedAsync(double, bool)
Plays forward / backward at the specified speed from the current location (async).
public Task<bool> DVD_SetSpeedAsync(double speed, bool backward)Parameters
Returns
DVD_Title_GetCurrent()
Gets the current DVD title number being played.
public int DVD_Title_GetCurrent()Returns
- int
-
Zero-based index of the current title. Returns -1 if no title is playing or DVD is not loaded. For example, if playing title 1 (the main movie), this returns 0.
Remarks
DVD titles are major sections of content on a disc. Typically:
- Title 1 (index 0) - Main feature film
- Title 2+ - Special features, trailers, deleted scenes, etc.
Each title can contain multiple chapters for navigation within that content.
Use this with DVD_Title_Play to implement title selection features.
DVD_Title_GetDuration()
Gets the total duration/length of the current DVD title.
public TimeSpan DVD_Title_GetDuration()Returns
- TimeSpan
-
A TimeSpan representing the total duration of the current title. Returns TimeSpan.Zero if no title is playing, duration cannot be determined, or an error occurs.
Remarks
This returns the full duration of the entire title, not just the current chapter.
Duration information may not be available immediately after starting playback. Wait for the DVD to fully initialize before querying duration.
Example: Display title duration in UI:
private void UpdateDurationDisplay()
{
TimeSpan duration = player.DVD_Title_GetDuration();
if (duration != TimeSpan.Zero)
{
labelDuration.Text = $"Duration: {duration:hh\\:mm\\:ss}";
}
else
{
labelDuration.Text = "Duration: Unknown";
}
}
DVD_Title_GetDurationAsync()
Returns current title duration (async).
public Task<TimeSpan> DVD_Title_GetDurationAsync()Returns
DVD_Title_Play(int)
Starts DVD playback from the beginning of the specified title (e.g., main movie, special features).
public void DVD_Title_Play(int titleIndex)Parameters
titleIndexint-
Zero-based index of the title to play. Common titles:
- 0 - Usually the main feature film
- 1+ - Special features, deleted scenes, trailers, etc.
Remarks
This method jumps directly to a title, bypassing any menus. Playback begins at chapter 1 of the selected title.
To get available titles, use DVD info methods to enumerate title count and information.
If the specified title doesn't exist, the DVD navigator may play the default title or generate an error.
Example: Create a title selection menu:
// Populate title list
private void PopulateTitleList()
{
int titleCount = GetDVDTitleCount(); // Use actual DVD info method
listBoxTitles.Items.Clear();
listBoxTitles.Items.Add("Main Movie");
for (int i = 1; i < titleCount; i++)
{
listBoxTitles.Items.Add($"Special Feature {i}");
}
}
// Play selected title
private void btnPlayTitle_Click(object sender, EventArgs e)
{
if (listBoxTitles.SelectedIndex >= 0)
{
player.DVD_Title_Play(listBoxTitles.SelectedIndex);
}
}
DVD_Title_PlayAsync(int)
Starts playback from the first chapter in the specified title (async).
public Task DVD_Title_PlayAsync(int titleIndex)Parameters
titleIndexint-
Title index.
Returns
DirectShow_Filters()
Gets DirectShow filter list.
public ObservableCollection<string> DirectShow_Filters()Returns
- ObservableCollection<string>
-
ObservableCollection<System.String>.
DirectShow_Filters_Blacklist_Add(string)
Adds the DirectShow filter to the black list. Sets the name(s) of filters that will be unavailable in use with Media Player SDK. For instance, you can use this method from preventing user to use some filters that is not functional correctly with Media Player SDK.
public void DirectShow_Filters_Blacklist_Add(string filter)Parameters
filterstring-
The filter.
DirectShow_Filters_Blacklist_Clear()
Clears the filters black list. All available filters will be available for use.
public void DirectShow_Filters_Blacklist_Clear()Dispose()
Dispose.
public void Dispose()Dispose(bool)
Dispose.
protected virtual void Dispose(bool disposing)Parameters
disposingbool-
Disposing parameter.
DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
public ValueTask DisposeAsync()Returns
- ValueTask
-
A task that represents the asynchronous dispose operation.
Duration_Frames()
Gets number of frames.
public long Duration_Frames()Returns
Duration_Time()
Retrieves the total duration of the currently loaded media.
public TimeSpan Duration_Time()Returns
- TimeSpan
-
The total media duration as a TimeSpan. Returns TimeSpan.Zero if duration cannot be determined, no media is loaded, or the media type doesn't support duration queries (e.g., live streams, some network protocols).
Remarks
This is the synchronous version. For async operations, use Duration_TimeAsync.
Duration availability and accuracy vary by source type:
- Local files: Typically accurate and available immediately
- DVD playback: Duration of current title only
- Network streams: May not be available or may be an estimate
- Live streams: Usually returns zero
Use this to display total time, calculate progress percentages, or implement time-based features.
Duration_TimeAsync()
Asynchronously retrieves the total duration of the currently loaded media.
public Task<TimeSpan> Duration_TimeAsync()Returns
- Task<TimeSpan>
-
A task that represents the asynchronous operation. The task result contains the total media duration as a TimeSpan. Returns TimeSpan.Zero if duration cannot be determined or no media is loaded.
Remarks
Duration may not be available immediately after loading, especially for network streams. For live streams, duration is typically zero or unavailable. For DVD playback, this returns the duration of the current title, not the entire disc.
~MediaPlayerCore()
Finalizes an instance of the VisioForge.Core.MediaPlayer.MediaPlayerCore class.
protected ~MediaPlayerCore()Frame_GetCurrent()
Captures the current video frame from the sample grabber, including any applied video effects.
public Bitmap Frame_GetCurrent()Returns
- Bitmap
-
A Bitmap containing the current processed video frame, or null if capture failed, no video is playing, or sample grabbing is not enabled. The caller is responsible for disposing the returned Bitmap.
Remarks
Prerequisites:
- Video_Sample_Grabber_Enabled must be true (set before Play)
- Video must be currently playing or paused
- Valid video stream must be present
This method captures frames after video effects processing, so the returned frame includes any applied effects like:
- Color adjustments (brightness, contrast, etc.)
- Geometric transforms (rotation, flip)
- Filters and overlays
- Text/image overlays
Performance note: Enabling sample grabber may impact playback performance, especially for high-resolution video.
Example usage:
// Enable sample grabber before playback
player.Video_Sample_Grabber_Enabled = true;
player.Source_FileName = "video.mp4";
player.Play();
// Capture frame during playback
using (var frame = player.Frame_GetCurrent())
{
if (frame != null)
{
pictureBox1.Image = new Bitmap(frame);
}
}
Frame_GetCurrentAsBuffer(out int, out int)
Gets the current video frame.
public byte[] Frame_GetCurrentAsBuffer(out int width, out int height)Parameters
Returns
- byte[]
-
System.Byte[].
Frame_GetCurrentAsBuffer(ref byte[], out int, out int)
Gets the current video frame (RGB24).
public void Frame_GetCurrentAsBuffer(ref byte[] buffer, out int width, out int height)Parameters
Frame_GetCurrentFromRenderer(out TimeSpan)
Captures the currently displayed video frame directly from the video renderer with timestamp information.
public Bitmap Frame_GetCurrentFromRenderer(out TimeSpan timestamp)Parameters
timestampTimeSpan-
When this method returns, contains the timestamp of the captured frame relative to the start of the media. Only accurate when using EVR renderer; returns TimeSpan.Zero for other renderers.
Returns
- Bitmap
-
A Bitmap containing the current video frame, or null if capture failed or no video is playing. The caller is responsible for disposing the returned Bitmap.
Remarks
This method captures frames directly from the video renderer, which means:
- Works with EVR (Enhanced Video Renderer) and VMR-9 renderers
- Captures the frame as displayed (including any renderer-level effects)
- More efficient than sample grabber for single frame capture
- Timestamp accuracy depends on renderer (EVR provides best accuracy)
For continuous frame capture or when using effects, use Frame_GetCurrent() instead.
Example:
TimeSpan frameTime;
using (var frame = player.Frame_GetCurrentFromRenderer(out frameTime))
{
if (frame != null)
{
frame.Save($"frame_at_{frameTime.TotalSeconds}s.jpg", ImageFormat.Jpeg);
}
}
Frame_Save(string, ImageFormat, int, int, int)
Saves the current frame in one of the available formats.
public bool Frame_Save(string filename, ImageFormat format, int jpegQuality = 85, int customWidth = 0, int customHeight = 0)Parameters
filenamestring-
Output file name.
formatImageFormat-
Image format.
jpegQualityint-
JPEG quality.
customWidthint-
Custom width.
customHeightint-
Custom height.
Returns
Frame_SaveAsync(string, ImageFormat, int, int, int)
Saves the current frame in one of the available formats (async).
public Task<bool> Frame_SaveAsync(string filename, ImageFormat format, int jpegQuality = 85, int customWidth = 0, int customHeight = 0)Parameters
filenamestring-
Output file name.
formatImageFormat-
Image format.
jpegQualityint-
JPEG quality.
customWidthint-
Custom width.
customHeightint-
Custom height.
Returns
GetContext()
Gets the DirectShow context containing logger instances and shared resources.
public DSContext GetContext()Returns
- DSContext
-
The DSContext instance used by this MediaPlayerCore.
Remarks
The context provides access to the logger for external components that need to log messages through the same logging infrastructure.
GetCore()
Gets core.
public MediaPlayerCore GetCore()Returns
- MediaPlayerCore
-
The VisioForge.Core.MediaPlayer.MediaPlayerCore.
GetDVDControl()
Gets the DVD control.
public IDvdControl2 GetDVDControl()Returns
- IDvdControl2
-
IDvdControl2.
GetDVDInfo()
Gets the DVD information.
public IDvdInfo2 GetDVDInfo()Returns
- IDvdInfo2
-
IDvdInfo2.
GetSourceMode()
Gets the source mode.
public MediaPlayerSourceMode GetSourceMode()Returns
- MediaPlayerSourceMode
-
MediaPlayerSourceMode.
GetVideoRenderer()
Gets the video renderer.
public VideoRendererSettings GetVideoRenderer()Returns
- VideoRendererSettings
-
VideoRendererSettings.
GetVideoRendererCore()
Gets the underlying video renderer interface for advanced video rendering control.
public IVideoRendererBase GetVideoRendererCore()Returns
- IVideoRendererBase
-
An IVideoRendererBase interface providing direct access to the active video renderer, or null if no renderer is currently initialized (e.g., before playback starts or for audio-only content).
Remarks
This method provides low-level access to the video rendering subsystem for advanced scenarios:
- Direct manipulation of rendering properties not exposed through high-level APIs
- Custom OSD (On-Screen Display) operations
- Integration with custom video processing pipelines
- Advanced performance tuning
The actual renderer type depends on the Video_Renderer configuration: EVR (Enhanced Video Renderer), VMR9 (Video Mixing Renderer 9), or legacy renderers. Use this interface carefully as direct manipulation may bypass SDK safety checks.
GetVideoResolution()
Gets the video resolution.
public Size GetVideoResolution()Returns
- Size
-
Types.Size.
Helpful_GetFrameFromFile(string, TimeSpan, bool, MediaPlayerSourceMode)
Gets frame from the file.
public Bitmap Helpful_GetFrameFromFile(string filename, TimeSpan timestamp, bool oldWay, MediaPlayerSourceMode engine)Parameters
filenamestring-
File name.
timestampTimeSpan-
Timestamp.
oldWaybool-
If true - old way (using IMediaDet interface), if false - Sample Grabber will be used.
engineMediaPlayerSourceMode-
Engine. LAV and DirectShow are supported.
Returns
- Bitmap
-
Bitmap.
Helpful_GetFrameFromFileAsync(string, TimeSpan, bool, MediaPlayerSourceMode)
Gets frame from the file (async).
public Task<Bitmap> Helpful_GetFrameFromFileAsync(string filename, TimeSpan timestamp, bool oldWay, MediaPlayerSourceMode engine)Parameters
filenamestring-
File name.
timestampTimeSpan-
Timestamp.
oldWaybool-
If true - old way (using IMediaDet interface), if false - Sample Grabber will be used.
engineMediaPlayerSourceMode-
Engine. LAV and DirectShow are supported.
Returns
Helpful_SecondsToTimeFormatted(int)
Gets formatted time.
public string Helpful_SecondsToTimeFormatted(int seconds)Parameters
secondsint-
Time in seconds.
Returns
- string
-
System.String.
Info_Read(string, bool, object, EncryptionKeyType, bool)
Reads file info.
public bool Info_Read(string filename, bool encryptedFile, object encryptionKey, EncryptionKeyType encryptionKeyType, bool allowLibMediaInfoUsage)Parameters
filenamestring-
File name.
encryptedFilebool-
True if file is encrypted.
encryptionKeyobject-
Encryption key.
encryptionKeyTypeEncryptionKeyType-
Encryption key type.
allowLibMediaInfoUsagebool-
True to allow LibMediaInfo usage.
Returns
Info_Read(string, bool)
Reads file info.
public bool Info_Read(string filename, bool allowLibMediaInfoUsage)Parameters
Returns
Info_ReadDVD(string)
Reads DVD info.
public bool Info_ReadDVD(string path)Parameters
pathstring-
DVD path.
Returns
- bool
-
trueif successful,falseotherwise.
IsAsync()
Determines whether this instance is asynchronous.
public bool IsAsync()Returns
- bool
-
trueif this instance is asynchronous; otherwise,false.
IsFileCrypted(string, string, bool)
Checks if the file is encrypted.
public bool IsFileCrypted(string filename, string password, bool v9 = false)Parameters
Returns
- bool
-
trueif file is crypted; otherwise,false.
IsFileCrypted(string, EncryptionKeyType, object, bool)
Checks if file is encrypted.
public bool IsFileCrypted(string filename, EncryptionKeyType keyType, object key, bool v9)Parameters
filenamestring-
File name.
keyTypeEncryptionKeyType-
Key type.
keyobject-
Key. string if password or filename, byte[] if binary data.
v9bool-
v9 SDK used.
Returns
- bool
-
trueif file is crypted; otherwise,false.
IsSourceConnected()
Always returns true: a media player has no capture source to wait on, so
consumers (such as VideoView) must not draw a "no signal" overlay over it.
Implements VisioForge.Core.Types.IMPVCVECore.IsSourceConnected.
public bool IsSourceConnected()Returns
MIDI_Renderers()
Gets MIDI renderer list.
public ObservableCollection<string> MIDI_Renderers()Returns
- ObservableCollection<string>
-
ObservableCollection<System.String>.
MotionDetection_Update()
Updates and applies the current motion detection configuration to the active video stream. Call this method after changing any motion detection properties to apply the new settings.
public void MotionDetection_Update()Remarks
Motion detection analyzes video frames to detect movement in specified regions.
This method refreshes settings for:
- Detection zones and exclusion areas
- Sensitivity thresholds
- Detection algorithms (simple difference, background modeling, etc.)
- Motion highlighting visualization
- Alert triggers and callbacks
Call this method after modifying properties like:
- Motion_Detection_Enabled
- Motion_Detection_Sensitivity
- Motion_Detection_Zones
- Motion_Detection_HighlightMotionRegions
Example:
// Configure motion detection
player.Motion_Detection_Enabled = true;
player.Motion_Detection_Sensitivity = 85;
player.Motion_Detection_HighlightMotionRegions = true;
// Apply the settings
player.MotionDetection_Update();
MultiScreen_AddScreen(nint, int, int)
Adds additional screen.
public void MultiScreen_AddScreen(nint screenHandle, int width, int height)Parameters
MultiScreen_Clear()
Clears the additional screens.
public void MultiScreen_Clear()MultiScreen_SetParameters(int, VideoRendererStretchMode, bool, bool)
Sets the additional parameters for the selected screen.
public void MultiScreen_SetParameters(int id, VideoRendererStretchMode stretch, bool flipHorizontal, bool flipVertical)Parameters
idint-
Screen ID.
stretchVideoRendererStretchMode-
Stretch mode.
flipHorizontalbool-
true to flip screen horizontally.
flipVerticalbool-
true to flip screen vertically.
MultiScreen_SetZoom(int, int, int, int)
Sets zoom properties for the additional screen.
public void MultiScreen_SetZoom(int id, int ratio, int shiftX, int shiftY)Parameters
idint-
Screen ID.
ratioint-
Zoom ratio value, in percents, starting from 0.
shiftXint-
Shift X coordinate. Shifts screen capture to the left or to the right (horizontally) by certain value.
shiftYint-
Shift Y coordinate. Shifts screen capture to the bottom or to the top (vertically) by certain value.
MultiScreen_UpdateSize(int, int, int)
Sets the new size for the additional screen.
public void MultiScreen_UpdateSize(int id, int width, int height)Parameters
Multiple_Video_Streams_Mappings_Add(int, nint, int, int)
Adds mapping video stream index - screen handle, for video files with multiple video streams.
public void Multiple_Video_Streams_Mappings_Add(int streamIndex, nint screenHandle, int screenWidth, int screenHeight)Parameters
streamIndexint-
Stream index.
screenHandlenint-
Screen handle.
screenWidthint-
Screen width.
screenHeightint-
Screen height.
Multiple_Video_Streams_Mappings_Clear()
Clears mappings for multiple video streams.
public void Multiple_Video_Streams_Mappings_Clear()NextFrame()
Shows the next frame.
public bool NextFrame()Returns
- bool
-
trueif successful,falseotherwise.
NextFrameOld()
Shows next frame (old implementation, useful for some decoders).
public bool NextFrameOld()Returns
- bool
-
trueif successful,falseotherwise.
OSD_Layers_Clear()
Removes all OSD layers and clears the overlay from the video surface.
public void OSD_Layers_Clear()Remarks
This method deletes all layer objects and their associated resources, then updates the video renderer to remove any visible overlay. Use this for complete OSD cleanup or when switching between different OSD configurations.
OSD_Layers_Clear(int)
Clears the content of a specific OSD layer while preserving the layer itself.
public void OSD_Layers_Clear(int id)Parameters
idint-
Zero-based index of the layer to clear. Must be less than the total layer count.
Remarks
This method resets the layer's bitmap to transparent, removing all drawn content while maintaining the layer's size, position, and other properties. The graphics context is recreated with high-quality rendering settings. After clearing, the video overlay is updated to reflect the change.
OSD_Layers_Create(int, int, int, int, bool)
Creates a new OSD layer with specified dimensions and position.
public bool OSD_Layers_Create(int left, int top, int width, int height, bool enabled)Parameters
leftint-
Horizontal position in pixels from the left edge of the video surface.
topint-
Vertical position in pixels from the top edge of the video surface.
widthint-
Width of the layer in pixels. Should not exceed video width.
heightint-
Height of the layer in pixels. Should not exceed video height.
enabledbool-
true to immediately enable the layer for rendering; false to create it disabled.
Returns
- bool
-
true if the layer was successfully created; false if creation failed.
Remarks
The new layer is added to the end of the layer list, giving it the highest z-order (rendered on top). The layer is initialized with a transparent background and high-quality graphics settings. Use the returned layer index (count-1) for subsequent operations on this layer.
OSD_Layers_Delete(int)
Deletes a specific OSD layer and removes it from the display.
public bool OSD_Layers_Delete(int id)Parameters
idint-
Zero-based index of the layer to delete. Must be less than the total layer count.
Returns
- bool
-
true if the layer was successfully deleted; false if deletion failed or invalid ID.
Remarks
Deleting a layer removes it from the layer list and updates the video overlay. Layer indices above the deleted layer are shifted down by one. The layer's resources are automatically disposed. Consider using OSD_Layers_Enable(false) if you need to temporarily hide a layer without losing its content.
OSD_Layers_Draw_Image(int, string, int, int, bool, Color)
Draws an image from a file onto the specified OSD layer at the given position.
public bool OSD_Layers_Draw_Image(int id, string filename, int left, int top, bool useColorKey = false, Color colorKey = default)Parameters
idint-
Zero-based index of the target layer. Must be less than the total layer count.
filenamestring-
Full path to the image file. Supports common formats: BMP, PNG, JPG, GIF, etc.
leftint-
Horizontal position within the layer to draw the image, in pixels.
topint-
Vertical position within the layer to draw the image, in pixels.
useColorKeybool-
true to treat the specified color as transparent; false to draw the image as-is.
colorKeyColor-
Color to treat as transparent when useColorKey is true. Typically used for logos with solid color backgrounds.
Returns
- bool
-
true if the image was successfully drawn; false if the operation failed.
Remarks
The image is drawn at its original size. For scaling or cropping, use the overload that accepts source and destination rectangles. Color key transparency is useful for logos and graphics with solid backgrounds that should appear transparent.
OSD_Layers_Draw_Image(int, string, Rectangle, Rectangle, bool, Color)
Draws an image from a file onto the specified OSD layer with source cropping and destination scaling.
public bool OSD_Layers_Draw_Image(int id, string filename, Rectangle srcRect, Rectangle destRect, bool useColorKey = false, Color colorKey = default)Parameters
idint-
Zero-based index of the target layer. Must be less than the total layer count.
filenamestring-
Full path to the image file. Supports common formats: BMP, PNG, JPG, GIF, etc.
srcRectRectangle-
Rectangle defining the portion of the source image to draw. Pass Rectangle.Empty to use the entire image.
destRectRectangle-
Rectangle defining where and how large to draw the image on the layer. Set Width/Height to 0 to use the source image's dimensions.
useColorKeybool-
true to treat the specified color as transparent; false to draw the image as-is.
colorKeyColor-
Color to treat as transparent when useColorKey is true.
Returns
- bool
-
true if the image was successfully drawn; false if the operation failed.
Remarks
This overload provides full control over image positioning and scaling. Use srcRect to crop the source image and destRect to scale/position the result. This is useful for sprite sheets, image atlases, or precise positioning needs.
OSD_Layers_Draw_Image(int, Bitmap, Rectangle, Rectangle, bool, Color)
Draws a Bitmap object onto the specified OSD layer with full control over source and destination.
public bool OSD_Layers_Draw_Image(int id, Bitmap image, Rectangle srcRect, Rectangle destRect, bool useColorKey = false, Color colorKey = default)Parameters
idint-
Zero-based index of the target layer. Must be less than the total layer count.
imageBitmap-
Bitmap object to draw. The caller retains ownership and must dispose of it.
srcRectRectangle-
Rectangle defining the portion of the source bitmap to draw. Pass Rectangle.Empty to use the entire bitmap starting at (0,0).
destRectRectangle-
Rectangle defining where and how large to draw the image on the layer. Set Width/Height to 0 to use the source bitmap's dimensions.
useColorKeybool-
true to treat the specified color as transparent; false to draw normally.
colorKeyColor-
Color to treat as transparent when useColorKey is true. Exact color matching is used.
Returns
- bool
-
true if the image was successfully drawn; false if the operation failed.
Remarks
This is the core image drawing method used by other overloads. It provides maximum flexibility for dynamic image content. The bitmap is not disposed by this method, allowing reuse. Color key transparency uses GDI+ ImageAttributes for hardware acceleration.
OSD_Layers_Draw_Text(int, int, int, string, Font, Color)
Draws text onto the specified OSD layer with the given font and color.
public bool OSD_Layers_Draw_Text(int id, int left, int top, string text, Font font, Color color)Parameters
idint-
Zero-based index of the target layer. Must be less than the total layer count.
leftint-
Horizontal position within the layer to start drawing text, in pixels.
topint-
Vertical position within the layer for the text baseline, in pixels.
textstring-
The text string to draw. Supports multi-line text with newline characters.
fontFont-
Font to use for rendering. The caller retains ownership of the Font object.
colorColor-
Color for the text. Use colors with alpha for semi-transparent text.
Returns
- bool
-
true if the text was successfully drawn; false if the operation failed.
Remarks
Text is rendered with anti-aliasing for smooth edges. For dynamic text updates (e.g., timecodes), clear the layer or specific area before redrawing to avoid overlapping. Consider using a dedicated layer for frequently changing text. The layer's graphics context uses high-quality text rendering.
OSD_Layers_Enable(int, bool)
Enables or disables a specific OSD layer without removing it.
public void OSD_Layers_Enable(int id, bool enabled)Parameters
idint-
Zero-based index of the layer to modify. Must be less than the total layer count.
enabledbool-
true to make the layer visible during rendering; false to hide it.
Remarks
Disabled layers are skipped during rendering but retain their content and properties. This allows temporary hiding of overlays without losing their configuration. Call OSD_Layers_Render() after changing enable state to update the display.
OSD_Layers_GetBitmap(int, out Bitmap)
Retrieves the bitmap content of a specific OSD layer.
public bool OSD_Layers_GetBitmap(int id, out Bitmap bitmap)Parameters
idint-
Zero-based index of the layer. Must be less than the total layer count.
bitmapBitmap-
Output parameter that receives a reference to the layer's bitmap. This is a direct reference, not a copy - do not dispose it.
Returns
- bool
-
true if the bitmap was successfully retrieved; false if the operation failed or invalid ID.
Remarks
This method provides direct access to a layer's bitmap for advanced manipulation or analysis. The returned bitmap is the actual layer content - modifications will affect the OSD display. Do not dispose the bitmap as it's owned by the layer. Call OSD_Layers_Render() after modifications to update the display.
OSD_Layers_Move(int, int, int)
Moves an existing OSD layer to a new position on the video surface.
public bool OSD_Layers_Move(int id, int x, int y)Parameters
idint-
Zero-based index of the layer to move. Must be less than the total layer count.
xint-
New horizontal position in pixels from the left edge of the video.
yint-
New vertical position in pixels from the top edge of the video.
Returns
- bool
-
true if the layer was successfully moved and re-rendered; false if the operation failed or invalid parameters were provided.
Remarks
The position is relative to the video surface, not the window. After moving, the OSD is automatically re-rendered to reflect the new position.
OSD_Layers_Render()
Renders all enabled OSD layers to the video surface by compositing them into a single overlay.
public bool OSD_Layers_Render()Returns
- bool
-
true if layers were successfully rendered; false if rendering failed or no enabled layers exist.
Remarks
This method creates a composite bitmap from all enabled layers in their z-order, then applies it to the video renderer. The overlay respects transparency settings and is scaled to match the current video dimensions. Call this after making changes to layers to update the display.
Requirements:
- Video must be playing or paused (not stopped)
- Video dimensions must be valid (non-zero)
- At least one layer must be enabled
OSD_Layers_SetTransparency(int, byte)
Sets the transparency level for a specific OSD layer.
public bool OSD_Layers_SetTransparency(int id, byte value)Parameters
idint-
Zero-based index of the layer. Must be less than the total layer count.
valuebyte-
Transparency level from 0 (fully transparent/invisible) to 255 (fully opaque). Common values: 255 = no transparency, 128 = 50% transparent, 0 = invisible.
Returns
- bool
-
true if the transparency was successfully set; false if the operation failed or invalid ID.
Remarks
Layer transparency affects the entire layer uniformly, making it useful for fading effects or semi-transparent overlays. This is different from per-pixel alpha in PNG images or color-keyed transparency. The transparency value is applied during the next OSD_Layers_Render() call.
OnPropertyChanged(string)
Raises the PropertyChanged event for the specified property.
protected virtual void OnPropertyChanged(string propertyName = null)Parameters
propertyNamestring-
Name of the property that changed. Automatically populated by CallerMemberName attribute.
PIP_Sources_Add(string, int, int, int, int)
Adds a video file as a Picture-in-Picture source to be displayed alongside the main video.
public bool PIP_Sources_Add(string filename, int outLeft, int outTop, int outWidth, int outHeight)Parameters
filenamestring-
Full path to the video file to display as PiP. Supports common video formats.
outLeftint-
Horizontal position in pixels from the left edge of the main video surface.
outTopint-
Vertical position in pixels from the top edge of the main video surface.
outWidthint-
Display width in pixels for the PiP video. Can differ from source video dimensions.
outHeightint-
Display height in pixels for the PiP video. Can differ from source video dimensions.
Returns
- bool
-
true if the PiP source was successfully added; false if addition failed.
Remarks
The PiP video will be overlaid on the main video at the specified position and size. Multiple PiP sources can be added and will be layered in the order they were added. PiP requires VMR9 video renderer to be active.
PIP_Sources_Clear()
Removes all Picture-in-Picture sources from the display list.
public void PIP_Sources_Clear()Remarks
This method clears all configured PiP sources but does not affect the main video. Call this before reconfiguring PiP sources or when switching to single-video mode.
PIP_Sources_Delete(int)
Removes a specific Picture-in-Picture source from the display list.
public bool PIP_Sources_Delete(int index)Parameters
indexint-
Zero-based index of the PiP source to remove.
Returns
- bool
-
true if the source was successfully removed; false if the index was invalid.
Remarks
Removing a PiP source shifts the indices of all subsequent sources down by one. The main video (index 0) cannot be removed using this method.
PIP_Sources_SetSourceOrder(int, int)
Sets the z-order (layering priority) of a Picture-in-Picture source.
public bool PIP_Sources_SetSourceOrder(int index, int order)Parameters
indexint-
Zero-based index of the PiP source to modify. Index 0 is the main video.
orderint-
Z-order value from 0 (bottom) to stream count - 1 (top). Higher values appear above lower values.
Returns
- bool
-
true if the z-order was successfully changed; false otherwise.
Remarks
This method only works during playback. Use this to dynamically change which PiP sources appear in front of or behind others. The main video typically has order 0. Only available when using synchronous API mode.
PIP_Sources_SetSourceOrderAsync(int, int)
Asynchronously sets the z-order (layering priority) of a Picture-in-Picture source.
public Task<bool> PIP_Sources_SetSourceOrderAsync(int index, int order)Parameters
indexint-
Zero-based index of the PiP source to modify. Index 0 is the main video.
orderint-
Z-order value from 0 (bottom) to stream count - 1 (top). Higher values appear above lower values.
Returns
Remarks
This method only works during playback. Use this to dynamically change which PiP sources appear in front of or behind others. The main video typically has order 0. Only available when using async API mode.
PIP_Sources_SetSourcePosition(int, Rectangle, float)
Sets the position, size, and transparency of a Picture-in-Picture source.
public bool PIP_Sources_SetSourcePosition(int index, Rectangle rect, float alpha)Parameters
indexint-
Zero-based index of the PiP source to modify. Index 0 is the main video.
rectRectangle-
Rectangle defining the position (X, Y) and size (Width, Height) in pixels on the video surface.
alphafloat-
Transparency level from 0.0 (fully transparent/invisible) to 1.0 (fully opaque). Use values like 0.5 for semi-transparent overlays.
Returns
- bool
-
true if the position was successfully updated; false otherwise.
Remarks
This method allows dynamic repositioning and resizing of PiP sources during playback. The rectangle coordinates are relative to the main video surface, not the window. Alpha blending provides smooth transparency effects for professional-looking overlays. Only available when using synchronous API mode.
PIP_Sources_SetSourcePositionAsync(int, Rectangle, float)
Asynchronously sets the position, size, and transparency of a Picture-in-Picture source.
public Task<bool> PIP_Sources_SetSourcePositionAsync(int index, Rectangle rect, float alpha)Parameters
indexint-
Zero-based index of the PiP source to modify. Index 0 is the main video.
rectRectangle-
Rectangle defining the position (X, Y) and size (Width, Height) in pixels on the video surface.
alphafloat-
Transparency level from 0.0 (fully transparent/invisible) to 1.0 (fully opaque). Use values like 0.5 for semi-transparent overlays.
Returns
Remarks
This method allows dynamic repositioning and resizing of PiP sources during playback. The rectangle coordinates are relative to the main video surface, not the window. Alpha blending provides smooth transparency effects for professional-looking overlays. Only available when using async API mode.
Pause()
Pauses media playback while retaining the current position.
public bool Pause()Returns
- bool
-
true if playback was successfully paused; false if already paused, not currently playing, or an error occurred.
Remarks
This is the synchronous version. For async operations, use PauseAsync.
Pausing behavior:
- Audio and video rendering stops immediately
- Current playback position is maintained exactly
- Media filters remain in paused state (no resource release)
- Resume playback with Resume() or Play() methods
- OnPause event fires when pause is successful
Example:
// Pause on user interaction
private void btnPause_Click(object sender, EventArgs e)
{
if (player.Pause())
{
btnPause.Enabled = false;
btnResume.Enabled = true;
statusLabel.Text = "Paused";
}
}
PauseAsync()
Pause (async).
public Task<bool> PauseAsync()Returns
Remarks
Pausing stops audio/video rendering but maintains the exact playback position. Use Resume() or Play() to continue from the paused position. The OnPause event fires when pause is successful.
Play(bool)
Starts media playback or prepares the media for delayed playback.
public bool Play(bool onlyPreload = false)Parameters
onlyPreloadbool-
If true, only builds and prepares the playback graph without starting actual playback. Use this with PlayDelayed() to start playback at a precise moment. Default is false.
Returns
- bool
-
True if playback started successfully or the graph was prepared successfully, false if an error occurred (invalid file, codec missing, etc.).
Remarks
This is the synchronous version. For async operations, use PlayAsync().
Before calling Play(), set the media source using one of:
- Source_FileName - For file playback
- Source_URL - For network streams
- Source_Stream - For memory streams
- DVD folder path - For DVD playback
The method will automatically:
- Detect media format and required codecs
- Build appropriate filter graph
- Configure audio/video renderers
- Apply any configured effects
- Start playback from the beginning
Example:
player.Source_FileName = @"C:\Videos\sample.mp4";
player.Video_Renderer = VideoRendererMode.EVR;
if (player.Play())
{
Console.WriteLine("Playing: " + player.Source_FileName);
}
else
{
Console.WriteLine("Failed to start playback");
}
PlayAsync(bool)
Asynchronously starts media playback or prepares the media for delayed playback.
public Task<bool> PlayAsync(bool onlyPreload = false)Parameters
onlyPreloadbool-
If true, only builds and prepares the playback graph without starting actual playback. Use this with PlayDelayed() to start playback at a precise moment. Default is false.
Returns
- Task<bool>
-
A task that represents the asynchronous operation. The task result is true if playback started successfully or the graph was prepared successfully, false if an error occurred.
Remarks
This method performs the following operations:
- Builds the DirectShow filter graph based on media type
- Initializes video and audio renderers
- Applies configured effects and filters
- Starts playback (unless onlyPreload is true)
Use Cases:
- Normal playback: await player.PlayAsync()
- Synchronized start: await player.PlayAsync(true), then player.PlayDelayed()
- Playlist transitions: Preload next item while current is playing
Example:
// Simple playback
player.Source_FileName = "video.mp4";
if (await player.PlayAsync())
{
Console.WriteLine("Playback started");
}
// Delayed start for synchronization
await player.PlayAsync(true); // Prepare only
// ... wait for sync signal ...
player.PlayDelayed(); // Start playback
PlayDelayed()
Starts playback when Play_DelayEnabled is set. Call this after Play() when delayed start is configured.
public void PlayDelayed()Remarks
This method is used in conjunction with Play_DelayEnabled property.
Workflow:
- Set Play_DelayEnabled = true
- Call Play() to build the graph
- Do other preparations
- Call PlayDelayed() to start actual playback
Playlist_Add(string)
Adds a media file or stream URL to the end of the playlist.
public bool Playlist_Add(string path)Parameters
pathstring-
Full path to a local file or a valid stream URL. Supported URL protocols: http://, https://, rtsp://, rtmp://, udp://, tcp://
Returns
- bool
-
true if the item was successfully added; false if the path is invalid or file doesn't exist.
Remarks
This method validates local file existence but doesn't verify URL accessibility. Items are added to the end of the playlist. Use Playlist_Insert to add at specific positions. The playlist can contain a mix of local files and network streams.
Playlist_Clear()
Removes all items from the playlist and resets the position to zero.
public bool Playlist_Clear()Returns
- bool
-
Always returns true.
Remarks
This method clears all playlist entries but doesn't stop current playback. After clearing, you'll need to add new items before playing again. The playlist position is reset to 0 for consistency.
Playlist_GetCount()
Gets the total number of items currently in the playlist.
public int Playlist_GetCount()Returns
- int
-
The count of playlist items. Returns 0 for an empty playlist.
Remarks
Use this to validate indices before calling other playlist methods, display playlist information, or determine if the playlist is empty. The count includes all items regardless of their playback status.
Playlist_GetFilename(int)
Retrieves the file path or URL of the item at the specified playlist position.
public string Playlist_GetFilename(int index)Parameters
indexint-
Zero-based index of the item to retrieve.
Returns
- string
-
The full file path or URL at the specified index; empty string if index is out of range.
Remarks
Use this to display playlist contents, check what will play next, or verify playlist entries. The returned path is exactly as it was added to the playlist.
Playlist_GetPosition()
Gets the current position (index) within the playlist.
public int Playlist_GetPosition()Returns
- int
-
Zero-based index of the currently playing or selected item. Returns 0 if playlist is empty.
Remarks
The position indicates which file is currently playing or will play next. This value persists between playback sessions until changed or the playlist is cleared.
Playlist_Insert(string, int)
Inserts a media file at a specific position in the playlist.
public bool Playlist_Insert(string filename, int index)Parameters
filenamestring-
Full path to the file to insert. Must exist on disk.
indexint-
Zero-based position where the item should be inserted. Items at and after this position are shifted up.
Returns
- bool
-
true if the file was inserted; false if the file doesn't exist.
Remarks
Unlike Playlist_Add, this method only accepts local files, not URLs. The file existence is verified before insertion. If the index is beyond the current count, the item is added at the end.
Playlist_PlayNext()
Stops current playback and starts playing the next item in the playlist.
public bool Playlist_PlayNext()Returns
- bool
-
true if successfully moved to and started playing the next item; false if already at the end of the playlist.
Remarks
This method automatically stops the current file, advances the playlist position, and starts playing the next file. If Loop mode is enabled and this is the last item, it will wrap to the first item. The OnNewFilePlaybackStarted event will fire when the new file begins playing.
Playlist_PlayNextAsync()
Asynchronously stops current playback and starts playing the next item in the playlist.
public Task<bool> Playlist_PlayNextAsync()Returns
- Task<bool>
-
A task that returns true if successfully moved to and started playing the next item; false if already at the end.
Remarks
This async version prevents UI blocking during the stop/start transition. Particularly useful for network streams or large files where stopping might take time. The method awaits both stop and play operations to complete.
Playlist_PlayPrevious()
Stops current playback and starts playing the previous item in the playlist.
public bool Playlist_PlayPrevious()Returns
- bool
-
true if successfully moved to and started playing the previous item; false if already at the beginning.
Remarks
This method automatically stops the current file, moves back one position, and starts playing the previous file. Returns false if currently at index 0. The OnNewFilePlaybackStarted event will fire when the new file begins playing.
Playlist_PlayPreviousAsync()
Asynchronously stops current playback and starts playing the previous item in the playlist.
public Task<bool> Playlist_PlayPreviousAsync()Returns
- Task<bool>
-
A task that returns true if successfully moved to and started playing the previous item; false if at the beginning.
Remarks
This async version prevents UI blocking during the stop/start transition. Useful for maintaining responsive UI when dealing with network streams or large files.
Playlist_Remove(string)
Removes the first occurrence of a specific file or URL from the playlist.
public bool Playlist_Remove(string filename)Parameters
filenamestring-
The exact file path or URL to remove. Must match exactly.
Returns
- bool
-
true if the item was found and removed; false if not found in the playlist.
Remarks
This method uses exact string matching. If multiple identical entries exist, only the first is removed. The current position may be adjusted if the removed item was before the current position.
Playlist_RemoveAt(int)
Removes the playlist item at the specified index.
public bool Playlist_RemoveAt(int index)Parameters
indexint-
Zero-based index of the item to remove.
Returns
- bool
-
true if an item was removed; false if the index is out of range.
Remarks
Removing an item shifts all subsequent items down by one position. If the removed item is currently playing, playback continues but the current index may need adjustment. Consider stopping playback before removing the currently playing item.
Playlist_Reset()
Resets the playlist position to the beginning (first item).
public void Playlist_Reset()Remarks
This method sets the current index to 0 but doesn't affect playback state. Useful for restarting playlist playback from the beginning after reaching the end.
Playlist_SetPosition(int)
Sets the current position within the playlist without starting playback.
public bool Playlist_SetPosition(int index)Parameters
indexint-
Zero-based index of the item to make current. Must be within valid range.
Returns
- bool
-
true if the position was successfully set; false if the index is out of range.
Remarks
This method only changes the playlist position; it doesn't start playback. Use Play() after setting position to begin playing from the new position. If currently playing, stop and play again to switch to the new item.
Position_Get_Frame()
Gets current position in frames.
public long Position_Get_Frame()Returns
Position_Get_FrameAsync()
Gets current position in frames (async).
public Task<long> Position_Get_FrameAsync()Returns
Position_Get_Time()
Retrieves the current playback position in the media timeline.
public TimeSpan Position_Get_Time()Returns
- TimeSpan
-
The current playback position as a TimeSpan. Returns TimeSpan.Zero if no media is loaded, playback hasn't started, or position cannot be determined.
Remarks
This is the synchronous version. For async operations, use Position_Get_TimeAsync.
Position behavior varies by source type:
- File playback: Position from file start
- DVD playback: Position within current title/chapter
- Network streams: Position may not be available or may represent buffer position
- Timeshift sources: Position relative to buffer start
Call frequently to update progress bars or time displays during playback.
Position_Get_TimeAsync()
Asynchronously retrieves the current playback position in the media timeline.
public Task<TimeSpan> Position_Get_TimeAsync()Returns
- Task<TimeSpan>
-
A task that represents the asynchronous operation. The task result contains the current playback position as a TimeSpan. Returns TimeSpan.Zero if no media is loaded or playback hasn't started.
Remarks
This async version prevents blocking the UI thread while querying position. For DVD playback, returns the position within the current title/chapter. For timeshift sources, returns the position relative to the buffer start. Position updates continuously during playback at the media's frame rate.
Position_Set_Frame(long)
Sets current position in frames.
public bool Position_Set_Frame(long position)Parameters
positionlong-
Frame number.
Returns
Position_Set_FrameAsync(long)
Sets current position in frames (async).
public Task<bool> Position_Set_FrameAsync(long position)Parameters
positionlong-
Frame number.
Returns
Position_Set_Time(TimeSpan)
Sets current position.
public bool Position_Set_Time(TimeSpan position)Parameters
positionTimeSpan-
Time.
Returns
Position_Set_TimeAsync(TimeSpan)
Sets current position (async).
public Task<bool> Position_Set_TimeAsync(TimeSpan position)Parameters
positionTimeSpan-
Time.
Returns
PreviousFrame()
Shows previous frame.
public bool PreviousFrame()Returns
- bool
-
Returns true if the operation was successful, otherwise returns false.
Resume()
Resume.
public bool Resume()Returns
- bool
-
trueif successful,falseotherwise.
Remarks
This is the synchronous version. For async operations, use ResumeAsync.
Resume behavior:
- Only works when playback is in paused state
- Continues from the exact frame/position where Pause() was called
- Audio and video rendering restart immediately
- OnResume event fires when resumption is successful
- Has no effect if already playing or if stopped
Example pause/resume implementation:
private void btnPauseResume_Click(object sender, EventArgs e)
{
if (player.State() == PlaybackState.Play)
{
if (player.Pause())
{
btnPauseResume.Text = "Resume";
}
}
else if (player.State() == PlaybackState.Pause)
{
if (player.Resume())
{
btnPauseResume.Text = "Pause";
}
}
}
ResumeAsync()
Asynchronously resumes media playback from a paused state.
public Task<bool> ResumeAsync()Returns
- Task<bool>
-
A task that represents the asynchronous operation. The task result is true if playback was successfully resumed, false if not currently paused or an error occurred.
Remarks
This async version prevents UI blocking during resume operations, particularly useful when resuming network streams or complex filter graphs. Playback continues from the exact position where Pause() was called. The OnResume event fires when successful.
ReversePlayback_GoToFrame(int)
Navigates to a specific frame number during reverse playback mode. This method provides frame-accurate positioning when playing media in reverse.
public void ReversePlayback_GoToFrame(int number)Parameters
numberint-
Zero-based frame number to navigate to. Must be within the valid range of frames in the reverse playback cache.
Remarks
Reverse playback requires special handling because most video codecs only support forward decoding. This method works with a frame cache built during reverse playback.
Prerequisites:
- Media must be loaded and reverse playback mode active
- Frame must be within the cached range
- Sufficient memory for frame caching
Note: Reverse playback is resource-intensive and may not work smoothly with all video formats, especially those with long GOP structures.
ReversePlayback_NextFrame()
Advances to the next frame during reverse playback mode or returns to forward direction. Provides frame-by-frame forward navigation even when in reverse playback mode.
public void ReversePlayback_NextFrame()Remarks
When in reverse playback mode, this method moves forward one frame, which can be used to fine-tune position after reverse seeking.
Common usage scenarios:
- Fine-tuning position after reverse navigation
- Implementing jog/shuttle controls
- Frame-accurate editing workflows
- Creating smooth variable-speed playback
For standard forward frame-stepping when not in reverse mode, use NextFrame() instead.
ReversePlayback_PreviousFrame()
Moves to the previous frame during reverse playback or frame-stepping mode. Provides frame-by-frame backward navigation through video content.
public void ReversePlayback_PreviousFrame()Remarks
This method is useful for:
- Frame-accurate video editing and analysis
- Slow-motion reverse playback implementation
- Finding exact cut points when editing
- Sports or scientific video analysis
Performance depends on the video codec and GOP structure. Formats with frequent keyframes (like Motion JPEG) perform better than long-GOP formats (like H.264).
Example usage:
// Implement frame-by-frame reverse navigation
private void btnPreviousFrame_Click(object sender, EventArgs e)
{
player.Pause();
player.ReversePlayback_PreviousFrame();
UpdateFrameDisplay();
}
SDK_BuildDate()
Gets the build date of the currently loaded SDK assembly.
public DateTime SDK_BuildDate()Returns
- DateTime
-
DateTime when this SDK version was compiled.
Remarks
Useful for version verification and troubleshooting. The build date helps identify specific SDK releases when the version number alone isn't sufficient.
SDK_Version()
Gets the version number of the currently loaded SDK assembly.
public Version SDK_Version()Returns
- Version
-
Version object with Major.Minor.Build.Revision components.
Remarks
Use this to verify SDK compatibility and features. Version numbers follow semantic versioning where Major changes indicate breaking changes, Minor changes add features, and Build/Revision are for bug fixes.
SetLicenseCertificateAsync(byte[])
Loads a license certificate into this instance and activates it if the certificate requires activation.
public Task SetLicenseCertificateAsync(byte[] certificateData)Parameters
certificateDatabyte[]-
The bytes of a
.vflicensecertificate file issued by VisioForge.
Returns
- Task
-
A task that completes once the certificate has been loaded and any required activation has run.
Remarks
This is the only public licensing API. The file-path and stream overloads and every license-key method were
removed in 2026.5.2, so an application reads the .vflicense file itself and passes the bytes here.
The certificate belongs to this instance: call it on every instance you create, before starting it --
licensing one instance does not license another. Without a certificate the instance runs in the 30-day trial.
SetSpeed(double)
Sets playback speed.
public bool SetSpeed(double speed)Parameters
speeddouble-
Speed.
Returns
- bool
-
trueif successful,falseotherwise.
SetSpeedAsync(double)
Sets playback speed (async).
public Task<bool> SetSpeedAsync(double speed)Parameters
speeddouble-
Speed.
Returns
SetSpeedIntl(double)
Sets playback speed.
public bool SetSpeedIntl(double speed)Parameters
speeddouble-
Speed.
Returns
- bool
-
Returns true if the operation was successful, otherwise returns false.
Settings_Load(string)
Loads media player configuration and settings from a JSON file, restoring a previously saved state.
public bool Settings_Load(string jsonFilename)Parameters
jsonFilenamestring-
Full path to the JSON settings file to load. The file should have been created using Settings_Save.
Returns
- bool
-
True if settings were successfully loaded and applied, false if the file doesn't exist, is corrupted, or loading failed.
Remarks
This method restores:
- Audio/video decoder preferences
- Rendering settings and video renderer selection
- Audio device configuration
- Effects and filters configuration
- Playback preferences (loop, speed, etc.)
- All public properties marked for serialization
Note: This loads configuration only. Media files, playlists, and runtime state are not restored.
Example usage:
// Load saved player configuration
if (player.Settings_Load("player_config.json"))
{
Console.WriteLine("Settings loaded successfully");
}
else
{
Console.WriteLine("Failed to load settings, using defaults");
}
Settings_Save(string, string)
Saves the current media player configuration and settings to JSON files for later restoration. Also saves applied video and audio effects configurations to separate files.
public bool Settings_Save(string jsonFilename, string infoFilename)Parameters
jsonFilenamestring-
Full path for the main JSON settings file. Additional effect files will be created in the same directory with suffixes like "_video_effects.json" and "_audio_effects.json".
infoFilenamestring-
Optional path for an SDK information file containing version details. Pass null or empty string to skip.
Returns
- bool
-
True if all settings were successfully saved, false if any save operation failed.
Remarks
This method saves:
- Main settings file: All serializable properties
- Video effects file: Applied video effects and parameters (if any)
- Audio effects file: Applied audio effects and parameters (if any)
- DX11 effects file: DirectX 11 GPU effects (if any)
- Info file: SDK version information (if path provided)
Files are created/overwritten if they already exist. Parent directories are created if needed.
Example usage:
// Save complete player configuration
if (player.Settings_Save("player_config.json", "sdk_info.txt"))
{
Console.WriteLine("Settings saved successfully");
// Files created:
// - player_config.json (main settings)
// - player_config_video_effects.json (if video effects active)
// - player_config_audio_effects.json (if audio effects active)
// - sdk_info.txt (SDK version info)
}
State()
Gets the current playback state of the media player.
public PlaybackState State()Returns
- PlaybackState
-
Current PlaybackState: Free (stopped), Playing, Paused, or Finished.
Remarks
Use this to determine valid operations. For example, Pause() only works when Playing, Resume() only works when Paused. The state is updated automatically and corresponding events fire on state changes.
Stop()
Stops media playback and releases all resources associated with the current media.
public void Stop()Remarks
This is the synchronous version. For async operations, use StopAsync().
Stopping playback:
- Immediately halts audio/video output
- Releases all DirectShow filters
- Clears the filter graph
- Resets position to 00:00:00
- Preserves configuration settings
This method is safe to call multiple times or when already stopped.
Common usage patterns:
// Stop current playback
player.Stop();
// Change media file
player.Source_FileName = "new_file.mp4";
player.Play();
// Or dispose of player
player.Stop();
player.Dispose();
StopAsync()
Asynchronously stops media playback and releases all resources associated with the current media.
public Task StopAsync()Returns
- Task
-
A task that represents the asynchronous stop operation.
Remarks
This method performs a complete cleanup:
- Stops all media streams
- Releases DirectShow filters and graph
- Frees video and audio resources
- Clears effects and processing chains
- Resets playback position to beginning
After Stop completes, you can:
- Load and play a different media file
- Change configuration and replay the same file
- Dispose of the player instance
The OnStop event is raised when stopping is complete.
Example:
await player.StopAsync();
// Player is now ready for new media
player.Source_FileName = "next_video.mp4";
await player.PlayAsync();
Tags_Read(string)
Reads metadata tags from a media file without loading it for playback.
public MediaFileTags Tags_Read(string filename)Parameters
filenamestring-
Full path to the media file to read tags from.
Returns
- MediaFileTags
-
MediaFileTags object containing all available metadata, or null if reading fails.
Remarks
Supported metadata includes:
- Basic tags: Title, Artist, Album, Year, Genre, Comment
- Advanced tags: AlbumArtist, Composer, Publisher, Conductor
- Technical info: Bitrate, Duration, Codec information
- Embedded artwork: Cover images and thumbnails
Supported formats include:
- Audio: MP3 (ID3v1/v2), MP4/M4A, WMA, OGG Vorbis, FLAC
- Video: MP4, MKV, AVI (limited), WMV
All text values are returned as strings. Artwork is returned as byte arrays. This method is lightweight and doesn't require initializing playback.
Test()
Test method. For debugging only.
public void Test()Video_Effects_Add(IVideoEffect)
Adds a video effect to the processing pipeline.
public void Video_Effects_Add(IVideoEffect effect)Parameters
effectIVideoEffect-
Video effect implementation to add. Must implement IVideoEffect interface.
Remarks
Effects are processed in the order they are added. Common effect types include:
- Color adjustments: brightness, contrast, saturation, hue
- Transforms: rotate, flip, crop, resize
- Overlays: text logos, image watermarks, scrolling text
- Filters: blur, sharpen, denoise, edge detection
- Special effects: fade, chroma key, picture-in-picture
Effects can be added before or during playback. Remember to set Video_Effects_Enabled = true for effects to be processed. The effect's Name property should be unique for later retrieval.
Video_Effects_Clear()
Removes all video effects from the processing pipeline.
public void Video_Effects_Clear()Remarks
This method:
- Removes all effects immediately
- Properly disposes of effects that hold resources (logos, images)
- Restores original video appearance
- Is thread-safe and can be called during playback
Effects that implement IDisposable (ImageLogo, TextLogo, ScrollingTextLogo) are disposed to free resources like loaded images or fonts. After clearing, you can add new effects without stopping playback.
Video_Effects_GPU_Add(IGPUVideoEffect)
Adds a GPU-accelerated video effect to the processing pipeline.
public void Video_Effects_GPU_Add(IGPUVideoEffect effect)Parameters
effectIGPUVideoEffect-
GPU video effect implementation. Must implement IGPUVideoEffect interface.
Remarks
GPU effects leverage DirectX 11 compute shaders for high-performance processing:
- Color grading and correction
- Advanced denoising and sharpening
- Real-time video stabilization
- Complex transitions and blending
- AI-powered effects (super-resolution, style transfer)
Requirements:
- DirectX 11 compatible GPU
- Video_Effects_GPU_Enabled must be true
- Compatible video renderer (EVR preferred)
GPU effects can be combined with CPU effects. Processing order is maintained. Effects are identified by their Name property for later modification.
Video_Effects_GPU_Clear()
Removes all GPU video effects from the processing pipeline.
public void Video_Effects_GPU_Clear()Remarks
Immediately removes all GPU effects and releases associated GPU resources:
- Shader resources and textures
- Compute buffers
- DirectX 11 device contexts
This operation is thread-safe and can be performed during playback. The video returns to its original appearance. GPU resources are properly released to prevent memory leaks.
Video_Effects_GPU_Get(string)
Retrieves a GPU video effect by its name for runtime modification.
public IGPUVideoEffect Video_Effects_GPU_Get(string name)Parameters
namestring-
The unique name assigned to the effect when created.
Returns
- IGPUVideoEffect
-
The IGPUVideoEffect instance if found; null if no effect with that name exists.
Remarks
Use this to modify GPU effect parameters during playback:
- Adjust shader parameters in real-time
- Enable/disable effects based on performance
- Animate effect properties
- Update textures or lookup tables
Cast the returned interface to the specific GPU effect type to access its specialized properties and shader parameters.
Video_Effects_GPU_Remove(string)
Removes a specific GPU video effect from the processing pipeline.
public void Video_Effects_GPU_Remove(string name)Parameters
namestring-
The exact name of the GPU effect to remove.
Remarks
Removes the named effect and releases its GPU resources:
- Unloads compute shaders
- Releases texture resources
- Frees GPU memory allocations
The removal is immediate and thread-safe. Other effects continue processing in their original order. If the effect is not found, the method completes silently without error.
Video_Effects_Get(string)
Retrieves a video effect by its name for runtime modification.
public IVideoEffect Video_Effects_Get(string name)Parameters
namestring-
The name assigned to the effect when created. Case-insensitive.
Returns
- IVideoEffect
-
The IVideoEffect instance if found; null if no effect with that name exists.
Remarks
Use this to modify effect parameters during playback. For example:
- Adjust brightness/contrast in response to user input
- Update text overlay content
- Enable/disable effects dynamically
- Animate effect parameters
Cast the returned interface to the specific effect type to access its properties. The search is case-insensitive for convenience.
Video_Effects_Remove(string)
Removes a specific video effect from the processing pipeline.
public void Video_Effects_Remove(string name)Parameters
namestring-
The exact name of the effect to remove (case-sensitive).
Remarks
Removes the first effect found with the specified name. If multiple effects have the same name, only the first is removed. The method:
- Safely removes the effect during playback
- Disposes of effects that hold resources
- Maintains the order of remaining effects
- Silently succeeds if the effect is not found
Use this for dynamic effect management, such as removing temporary overlays or disabling specific processing based on conditions.
Video_Filters_Add(string)
Adds DirectShow filter to the list. You can use filters to process video.
public void Video_Filters_Add(string name)Parameters
namestring-
Filter name.
Remarks
You can specify filters parameters using either the settings dialog box or direct access to the filter interface with the help of the plug-in system.
Video_Filters_Clear()
Clears filter list.
public void Video_Filters_Clear()Video_Filters_Delete(string)
Deletes filter from the list.
public bool Video_Filters_Delete(string name)Parameters
namestring-
Filter name.
Returns
Video_FrameRate()
Gets the frame rate of the currently playing video stream.
public VideoFrameRate Video_FrameRate()Returns
- VideoFrameRate
-
A VideoFrameRate structure containing frame rate information as both a fractional representation (numerator/denominator) and a decimal value. Returns default values if no video is loaded or frame rate cannot be determined.
Remarks
Frame rate is typically detected automatically when loading a video file. Common frame rates include 24 fps (cinema), 25 fps (PAL), 29.97 fps (NTSC), 30 fps (web video), 50 fps, and 60 fps (high frame rate content). The fractional representation (e.g., 30000/1001 for 29.97 fps) provides exact timing for frame-accurate operations and synchronization.
Video_Height()
Gets the height of the currently playing video stream in pixels.
public int Video_Height()Returns
- int
-
The video height in pixels. Returns 0 if no video is loaded or if the video dimensions have not been determined yet. For most formats, this value is available after starting playback.
Remarks
This represents the actual decoded video frame height, not the display window size. For videos with non-square pixels (PAR != 1.0), this is the storage dimension. The value remains constant during playback unless the stream contains resolution changes.
Video_Renderer_Deinterlace_Modes()
Gets the list of available deinterlacing modes supported by the current video renderer.
public ObservableCollection<string> Video_Renderer_Deinterlace_Modes()Returns
- ObservableCollection<string>
-
Observable collection of deinterlacing mode names.
Remarks
Deinterlacing removes interlacing artifacts from video sources like:
- Analog TV captures
- DV camcorder footage
- Some broadcast content
The list is populated on first access and cached. Available modes depend on the video renderer and graphics hardware. Returns empty collection if deinterlacing is not supported.
Video_Renderer_SetAuto()
Automatically selects the best available video renderer for the current system.
public void Video_Renderer_SetAuto()Remarks
Selection priority:
- EVR (Enhanced Video Renderer) - Windows 7+ with best features
- VMR-9 (Video Mixing Renderer 9) - Windows XP+ with good features
- Legacy Video Renderer - Fallback for older systems
EVR is preferred for modern systems as it provides:
- Better performance and quality
- DXVA hardware acceleration
- Advanced deinterlacing
- Improved color space handling
Video_Renderer_SetCustomWindowHandle(nint)
Sets a custom window handle for video rendering output.
public void Video_Renderer_SetCustomWindowHandle(nint handle)Parameters
handlenint-
Native window handle (HWND) where video should be rendered.
Remarks
Use this to render video to a specific window handle instead of the default video view. Useful for:
- Rendering to external windows
- Custom UI frameworks
- Multi-window applications The handle must remain valid throughout playback.
Video_Renderer_Update(int, int)
Updates video renderer display settings to handle window size changes.
public void Video_Renderer_Update(int newWidth = 0, int newHeight = 0)Parameters
newWidthint-
New display width in pixels. Pass 0 to use current window width.
newHeightint-
New display height in pixels. Pass 0 to use current window height.
Remarks
Call this method when the video display window is resized to ensure proper video scaling and aspect ratio. The method recalculates display parameters and notifies the renderer of the new dimensions. Safe to call during playback. Only available when using synchronous API mode.
Video_Renderer_UpdateAsync(int, int)
Asynchronously updates video renderer display settings to handle window size changes.
public Task Video_Renderer_UpdateAsync(int newWidth = 0, int newHeight = 0)Parameters
newWidthint-
New display width in pixels. Pass 0 to use current window width.
newHeightint-
New display height in pixels. Pass 0 to use current window height.
Returns
- Task
-
A task that completes when the renderer has been updated.
Remarks
Call this method when the video display window is resized to ensure proper video scaling and aspect ratio. The method recalculates display parameters and notifies the renderer of the new dimensions. Safe to call during playback. Only available when using async API mode.
Video_Renderer_VideoAdjust_GetRanges(VideoRendererAdjustment)
Gets the valid range of values for a specific video adjustment parameter.
public VideoRendererVideoAdjustRanges Video_Renderer_VideoAdjust_GetRanges(VideoRendererAdjustment adjustment)Parameters
adjustmentVideoRendererAdjustment-
The video property to query: Brightness, Contrast, Hue, or Saturation.
Returns
- VideoRendererVideoAdjustRanges
-
VideoRendererVideoAdjustRanges containing min, max, default, and step values; null if the adjustment is not supported.
Remarks
Hardware video adjustments provide real-time control without CPU overhead. Ranges vary by graphics hardware and driver. Typical ranges:
- Brightness: -100 to 100
- Contrast: 0 to 200 (100 = normal)
- Hue: -180 to 180 degrees
- Saturation: 0 to 200 (100 = normal) Only available during playback with synchronous API.
Video_Renderer_VideoAdjust_GetRangesAsync(VideoRendererAdjustment)
Gets video adjustment ranges (async).
public Task<VideoRendererVideoAdjustRanges> Video_Renderer_VideoAdjust_GetRangesAsync(VideoRendererAdjustment adjustment)Parameters
adjustmentVideoRendererAdjustment-
Adjustment type.
Returns
- Task<VideoRendererVideoAdjustRanges>
-
Task<VideoRendererVideoAdjustRanges>.
Video_Renderer_VideoAdjust_GetSupported()
Determines which video adjustment parameters are supported by the current renderer.
public VideoRendererAdjustmentSupported Video_Renderer_VideoAdjust_GetSupported()Returns
- VideoRendererAdjustmentSupported
-
VideoRendererAdjustmentSupported object indicating which adjustments are available; null if no adjustments are supported or playback is not active.
Remarks
Tests hardware support for each video adjustment type. Support depends on:
- Video renderer type (EVR typically supports all)
- Graphics hardware capabilities
- Video driver features
Use this before attempting to get/set adjustment values to avoid errors. Hardware adjustments are preferred over software effects for performance. Only available during playback with synchronous API.
Video_Renderer_VideoAdjust_GetSupportedAsync()
Gets video adjustment supported values (async).
public Task<VideoRendererAdjustmentSupported> Video_Renderer_VideoAdjust_GetSupportedAsync()Returns
- Task<VideoRendererAdjustmentSupported>
-
Task<VideoRendererAdjustmentSupported>.
Video_Renderer_VideoAdjust_GetValues(VideoRendererAdjustment)
Gets the current value of a specific video adjustment parameter.
public float? Video_Renderer_VideoAdjust_GetValues(VideoRendererAdjustment adjustment)Parameters
adjustmentVideoRendererAdjustment-
The video property to query: Brightness, Contrast, Hue, or Saturation.
Returns
- float?
-
Current adjustment value as a float; null if the adjustment is not supported or cannot be read.
Remarks
Retrieves the current hardware video adjustment setting. Values are within the ranges returned by Video_Renderer_VideoAdjust_GetRanges(). These adjustments are applied by the graphics hardware without affecting the source video data. Only available during playback with synchronous API.
Video_Renderer_VideoAdjust_GetValuesAsync(VideoRendererAdjustment)
Gets video adjustment value (async).
public Task<float?> Video_Renderer_VideoAdjust_GetValuesAsync(VideoRendererAdjustment adjustment)Parameters
adjustmentVideoRendererAdjustment-
Adjustment type.
Returns
Video_Renderer_VideoAdjust_SetValue(VideoRendererAdjustment, float)
Sets the value of a specific video adjustment parameter.
public bool Video_Renderer_VideoAdjust_SetValue(VideoRendererAdjustment adjustment, float value)Parameters
adjustmentVideoRendererAdjustment-
The video property to modify: Brightness, Contrast, Hue, or Saturation.
valuefloat-
New value within the valid range for this adjustment.
Returns
- bool
-
true if the value was successfully set; false if not supported or out of range.
Remarks
Applies hardware video adjustments in real-time without reprocessing frames. Values must be within the ranges returned by Video_Renderer_VideoAdjust_GetRanges(). Changes take effect immediately and persist until changed or playback stops. These adjustments are preferable to software effects for performance. Only available during playback with synchronous API.
Video_Renderer_VideoAdjust_SetValueAsync(VideoRendererAdjustment, float)
Sets video adjustment value (async).
public Task<bool> Video_Renderer_VideoAdjust_SetValueAsync(VideoRendererAdjustment adjustment, float value)Parameters
adjustmentVideoRendererAdjustment-
Adjustment type.
valuefloat-
Value.
Returns
Video_Stream_Select(int)
Selects and activates a specific video stream from a multi-stream source.
public bool Video_Stream_Select(int index)Parameters
indexint-
Zero-based index of the video stream to activate. Use -1 to select the default/primary stream. For files with multiple video tracks, this allows switching between available video streams.
Returns
- bool
-
True if the stream was successfully selected, false if the index is invalid, no video streams exist at that index, or selection failed.
Remarks
This is the synchronous version. For async operations, use Video_Stream_SelectAsync.
Common use cases include multi-angle DVDs, security camera recordings with multiple views, or educational content with different presentation tracks.
The stream change takes effect immediately if playing, or will be applied when playback starts.
Video_Stream_SelectAsync(int)
Asynchronously selects and activates a specific video stream from a multi-stream source.
public Task<bool> Video_Stream_SelectAsync(int index)Parameters
indexint-
Zero-based index of the video stream to activate. Use -1 to select the default/primary stream. For files with multiple video tracks (e.g., multi-angle DVDs, MKV files with multiple video streams), this allows switching between available video streams.
Returns
- Task<bool>
-
A task that represents the asynchronous operation. The task result is true if the stream was successfully selected, false if the index is invalid or selection failed.
Remarks
This method is useful for:
- Multi-angle DVD playback
- Files with multiple video tracks (e.g., different camera angles)
- Switching between main video and commentary tracks
Use MediaInfo methods to enumerate available video streams before selection.
Example:
// Switch to second video stream if available
bool success = await player.Video_Stream_SelectAsync(1);
if (!success)
{
Console.WriteLine("Failed to switch video stream");
}
Video_Width()
Gets the width of the currently playing video stream in pixels.
public int Video_Width()Returns
- int
-
The video width in pixels. Returns 0 if no video is loaded or if the video dimensions have not been determined yet. For most formats, this value is available after starting playback.
Remarks
This represents the actual decoded video frame width, not the display window size. For videos with non-square pixels (PAR != 1.0), this is the storage dimension. The value remains constant during playback unless the stream contains resolution changes. Common values: 1920 (1080p), 1280 (720p), 640 (SD), 3840 (4K).
IMPVCVECore.GetVideoRendererCore()
Gets the video renderer core.
IVideoRendererBase IMPVCVECore.GetVideoRendererCore()Returns
- IVideoRendererBase
-
IVideoRendererBase.
IMediaPlayerControls.Duration()
Gets the total duration of the currently loaded media file.
TimeSpan IMediaPlayerControls.Duration()Returns
- TimeSpan
-
A TimeSpan representing the total media duration. Returns TimeSpan.Zero if no media is loaded or duration cannot be determined (e.g., live streams).
IMediaPlayerControls.DurationAsync()
Asynchronously gets the total duration of the currently loaded media file.
Task<TimeSpan> IMediaPlayerControls.DurationAsync()Returns
- Task<TimeSpan>
-
A task that returns a TimeSpan representing the total media duration. Use this method when accessing duration from UI threads to avoid blocking.
IMediaPlayerControls.GetFileThumbnail(string)
Generates a thumbnail image from the specified media file.
SKBitmap IMediaPlayerControls.GetFileThumbnail(string filename)Parameters
filenamestring-
The full path to the media file from which to extract a thumbnail.
Returns
- SKBitmap
-
An SKBitmap containing the thumbnail image, typically from the first frame. Returns null if the file cannot be opened or contains no video.
Remarks
This method opens the file temporarily to extract a frame. For better performance when generating multiple thumbnails, consider caching results. The thumbnail is taken from the beginning of the file (TimeSpan.Zero).
IMediaPlayerControls.NextFrame()
Advances playback by exactly one video frame while maintaining paused state.
bool IMediaPlayerControls.NextFrame()Returns
- bool
-
true if the frame advance was successful; false if not in a valid state (e.g., not paused, no video stream, or at end of file).
Remarks
Useful for frame-by-frame analysis or precise editing. Only works when paused. The exact frame duration depends on the video frame rate (e.g., ~33ms for 30fps video).
IMediaPlayerControls.OpenAsync(string)
Asynchronously opens a media file for playback, clearing any existing playlist.
Task<bool> IMediaPlayerControls.OpenAsync(string path)Parameters
pathstring-
The full path to the media file or a valid URL for network streams.
Returns
- Task<bool>
-
A task that returns true if the file was successfully added to the playlist. Note: This method only prepares the file; call PlayAsync() to start playback.
Remarks
Supported formats depend on installed codecs and the selected media engine. Common formats include MP4, AVI, MKV, MP3, AAC, and various streaming protocols.
IMediaPlayerControls.Pause()
Pauses the current media playback while maintaining the current position.
bool IMediaPlayerControls.Pause()Returns
- bool
-
true if the pause operation was successful; false if the player is not in a pauseable state (e.g., already paused, stopped, or no media loaded).
Remarks
Pausing stops audio/video rendering but keeps all resources allocated for quick resume. The OnPause event will fire upon successful pause.
IMediaPlayerControls.Play(bool)
Starts or preloads media playback from the current position.
bool IMediaPlayerControls.Play(bool onlyPreload)Parameters
onlyPreloadbool-
If true, initializes the media pipeline and buffers content without starting playback. Useful for reducing start latency when playback timing is critical.
Returns
- bool
-
true if the operation was successful; false if no media is loaded or an error occurred.
Remarks
When onlyPreload is true, the media graph is built and initial buffering occurs, but playback remains paused. Call Play(false) or Resume() to begin actual playback after preloading.
IMediaPlayerControls.PlayAsync(bool)
Asynchronously starts or preloads media playback from the current position.
Task<bool> IMediaPlayerControls.PlayAsync(bool onlyPreload)Parameters
onlyPreloadbool-
If true, initializes the media pipeline and buffers content without starting playback. Useful for reducing start latency when playback timing is critical.
Returns
- Task<bool>
-
A task that returns true if the operation was successful; false if no media is loaded or an error occurred.
Remarks
This async version is recommended for UI applications to prevent blocking during media initialization, which can take several seconds for large files or network streams.
IMediaPlayerControls.Position_Get()
Gets the current playback position within the media file.
TimeSpan IMediaPlayerControls.Position_Get()Returns
- TimeSpan
-
A TimeSpan representing the current position. Returns TimeSpan.Zero if no media is loaded or playback hasn't started. For live streams, represents time since stream start.
Remarks
Position accuracy depends on the media format and codec. Some formats may only provide approximate positions between keyframes.
IMediaPlayerControls.Position_GetAsync()
Asynchronously gets the current playback position within the media file.
Task<TimeSpan> IMediaPlayerControls.Position_GetAsync()Returns
- Task<TimeSpan>
-
A task that returns a TimeSpan representing the current position. Use this method when accessing position from UI threads to avoid blocking.
Remarks
This method is particularly useful when updating position displays frequently, as it prevents UI thread blocking during position queries.
IMediaPlayerControls.Position_Set(TimeSpan, bool)
Seeks to a specific position within the media file.
void IMediaPlayerControls.Position_Set(TimeSpan position, bool seekToKeyframe)Parameters
positionTimeSpan-
The target position as a TimeSpan. Must be between zero and the media duration.
seekToKeyframebool-
Currently not used in this implementation. In other contexts, would determine whether to seek to the nearest keyframe (faster but less accurate) or exact position.
Remarks
Seeking performance varies by media format. Formats with keyframes (H.264, MPEG) may have seek delays. Some formats or network streams may not support seeking. The actual position after seeking may differ slightly from the requested position.
IMediaPlayerControls.Position_SetAsync(TimeSpan, bool)
Asynchronously seeks to a specific position within the media file.
Task IMediaPlayerControls.Position_SetAsync(TimeSpan position, bool seekToKeyframe)Parameters
positionTimeSpan-
The target position as a TimeSpan. Must be between zero and the media duration.
seekToKeyframebool-
Currently not used in this implementation. In other contexts, would determine whether to seek to the nearest keyframe (faster but less accurate) or exact position.
Returns
- Task
-
A task that completes when the seek operation finishes. The player may still be buffering after the task completes.
Remarks
Use this async version for smoother UI responsiveness, especially when seeking in large files or network streams where seek operations can take several seconds.
IMediaPlayerControls.PrevFrame()
Moves playback back by one video frame while maintaining paused state.
bool IMediaPlayerControls.PrevFrame()Returns
- bool
-
Always returns false as this functionality is not currently implemented. Frame-accurate reverse seeking requires specialized decoder support.
Remarks
Previous frame functionality is complex due to video compression using inter-frame dependencies. Most codecs only decode forward efficiently.
IMediaPlayerControls.Resume()
Resumes playback from a paused state at the current position.
bool IMediaPlayerControls.Resume()Returns
- bool
-
true if playback was successfully resumed; false if the player was not in a paused state or an error occurred.
Remarks
Resume only works when the player is paused. Use Play() to start from a stopped state. The OnResume event will fire upon successful resume.
IMediaPlayerControls.Stop()
Stops playback and releases all media resources.
void IMediaPlayerControls.Stop()Remarks
Stopping releases the media pipeline, decoders, and buffers. The playback position returns to the beginning. To pause while maintaining position and resources, use Pause() instead. The OnStop event will fire when stop is complete.
IMediaPlayerControls.StopAsync()
Asynchronously stops playback and releases all media resources.
Task IMediaPlayerControls.StopAsync()Returns
- Task
-
A task that completes when all resources have been released and the player is fully stopped.
Remarks
Use this async version to prevent UI blocking during resource cleanup, which can take time for complex media graphs or when releasing hardware decoders.
IMediaPlayerControls.Volume_Get()
Gets the current audio playback volume level.
double IMediaPlayerControls.Volume_Get()Returns
- double
-
The volume as a normalized value between 0.0 (muted) and 1.0 (maximum volume). Note: The actual loudness depends on system volume and audio hardware.
IMediaPlayerControls.Volume_Set(double)
Sets the audio playback volume level.
void IMediaPlayerControls.Volume_Set(double volume)Parameters
volumedouble-
The desired volume as a normalized value between 0.0 (muted) and 1.0 (maximum). Values outside this range will be clamped.
Remarks
This controls the media player's volume independently of system volume. Changes take effect immediately during playback.
IVideoEffectsControls.VideoEffects_Clear()
Removes all active video effects and restores the original video appearance.
void IVideoEffectsControls.VideoEffects_Clear()Remarks
This method clears all effects added through this interface or the Video_Effects_Add method, including brightness, contrast, saturation, flips, and any custom effects. The video immediately returns to its original, unprocessed state. Effects must be reapplied if needed.
IVideoEffectsControls.VideoEffects_SetBrightness(double)
Adjusts the video brightness level in real-time.
void IVideoEffectsControls.VideoEffects_SetBrightness(double value)Parameters
valuedouble-
Brightness adjustment from -1.0 (darkest) to 1.0 (brightest). 0.0 represents no change from original brightness.
Remarks
This effect is implemented using separate lightness (positive values) and darkness (negative values) filters for optimal quality. Changes apply immediately to the current video stream. The effect persists until cleared or the value is reset to 0.
IVideoEffectsControls.VideoEffects_SetContrast(double)
Adjusts the video contrast level in real-time.
void IVideoEffectsControls.VideoEffects_SetContrast(double value)Parameters
valuedouble-
Contrast adjustment from -1.0 (minimum contrast) to 1.0 (maximum contrast). 0.0 represents no change from original contrast.
Remarks
Contrast affects the difference between light and dark areas. Positive values increase contrast (making darks darker and lights lighter), while negative values reduce it. Changes apply immediately during playback.
IVideoEffectsControls.VideoEffects_SetFlipX(bool)
Enables or disables horizontal flipping (mirroring) of the video.
void IVideoEffectsControls.VideoEffects_SetFlipX(bool value)Parameters
valuebool-
true to flip the video horizontally (mirror image); false for normal orientation.
Remarks
Horizontal flip creates a mirror image, reversing left and right. Useful for selfie-style video or correcting mirrored sources. Note: The internal effect name "FlipDown" is used for historical compatibility but performs horizontal flipping.
IVideoEffectsControls.VideoEffects_SetFlipY(bool)
Enables or disables vertical flipping of the video.
void IVideoEffectsControls.VideoEffects_SetFlipY(bool value)Parameters
valuebool-
true to flip the video vertically (upside down); false for normal orientation.
Remarks
Vertical flip rotates the image 180 degrees around the horizontal axis. Useful for correcting inverted video sources. Note: The internal effect name "FlipRight" is used for historical compatibility but performs vertical flipping.
IVideoEffectsControls.VideoEffects_SetGrayscale(bool)
Enables or disables grayscale conversion of the video.
void IVideoEffectsControls.VideoEffects_SetGrayscale(bool value)Parameters
valuebool-
true to convert video to grayscale (black and white); false to show normal color.
Remarks
When enabled, all color information is removed, showing only luminance values. This is different from setting saturation to -1.0 as it uses a proper luminance conversion algorithm. Useful for artistic effects or improving visibility of details.
IVideoEffectsControls.VideoEffects_SetInvert(bool)
Enables or disables color inversion (negative image) effect on the video.
void IVideoEffectsControls.VideoEffects_SetInvert(bool value)Parameters
valuebool-
true to invert all colors; false for normal colors.
Remarks
Color inversion creates a negative image where each color is replaced by its complementary color (255 - original value for each RGB channel). White becomes black, red becomes cyan, etc. Useful for artistic effects or improving visibility of certain content types.
IVideoEffectsControls.VideoEffects_SetSaturation(double)
Adjusts the video color saturation level in real-time.
void IVideoEffectsControls.VideoEffects_SetSaturation(double value)Parameters
valuedouble-
Saturation adjustment from -1.0 (grayscale) to 1.0 (maximum saturation). 0.0 represents normal color saturation.
Remarks
Saturation controls color intensity. Negative values reduce color toward grayscale, while positive values make colors more vivid. Extreme positive values may cause color clipping. Changes apply immediately during playback.
OnAudioFrameBuffer
Occurs when a new audio frame buffer is available for processing.
public event EventHandler<AudioFrameBufferEventArgs> OnAudioFrameBufferEvent Type
Remarks
This event provides raw audio samples for real-time processing, analysis, or visualization. Audio data is provided as a byte array with format information (sample rate, channels, bit depth). Performance note: This event fires frequently (typically 20-50 times per second), so handlers should be optimized for performance and avoid blocking operations.
OnAudioVUMeter
Occurs when new audio level meter (VU meter) data is available.
public event EventHandler<VUMeterEventArgs> OnAudioVUMeterEvent Type
Remarks
This event provides real-time audio level information for creating visual audio meters. Data includes peak and RMS levels for each audio channel, typically ranging from -60dB to 0dB. Update frequency depends on audio processing settings but is usually 10-30 updates per second for smooth visualization.
OnAudioVUMeterProFFTCalculated
Occurs when FFT (Fast Fourier Transform) frequency analysis data is available from VU Meter Pro.
public event EventHandler<VUMeterFFTEventArgs> OnAudioVUMeterProFFTCalculatedEvent Type
Remarks
This event provides frequency spectrum data for creating spectrum analyzers and frequency visualizations. FFT data includes magnitude values across frequency bins, typically 256-2048 bins covering the audible spectrum (20Hz-20kHz). Requires VU Meter Pro with FFT analysis enabled.
OnAudioVUMeterProMaximumCalculated
Occurs when peak hold and minimum/maximum audio level statistics are calculated by VU Meter Pro.
public event EventHandler<VUMeterMaxSampleEventArgs> OnAudioVUMeterProMaximumCalculatedEvent Type
Remarks
This event provides statistical audio level data including peak hold values, minimum levels over a time window, and clipping detection. Useful for peak indicators, overload warnings, and dynamic range analysis. Update frequency is typically lower than real-time levels (1-5 Hz).
OnAudioVUMeterProVolume
Occurs when professional-grade audio volume level data is available from VU Meter Pro.
public event EventHandler<AudioLevelEventArgs> OnAudioVUMeterProVolumeEvent Type
Remarks
This event provides high-precision audio level measurements with additional metrics beyond basic VU meters, including true peak, loudness units (LUFS), and dynamic range. Requires VU Meter Pro to be enabled. Useful for broadcast compliance and professional audio monitoring applications.
OnBarcodeDetected
This event occurs whenever each new barcode detected. Event args contain barcode data.
public event EventHandler<BarcodeEventArgs> OnBarcodeDetectedEvent Type
OnDVDChapterChanged
Occurs when the current chapter changes during DVD playback.
public event EventHandler<EventArgs> OnDVDChapterChangedEvent Type
Remarks
This event fires when the DVD player navigates to a new chapter, either through user interaction, automatic progression, or programmatic control. Subscribe to this event to update UI elements showing chapter information.
OnDVDDomainChanged
Occurs when the DVD navigation domain changes (e.g., from menu to title playback).
public event EventHandler<DVDDomainChangedEventArgs> OnDVDDomainChangedEvent Type
Remarks
DVD domains include FirstPlay, VideoManagerMenu, VideoTitleSetMenu, Title, and Stop. This event is crucial for tracking navigation state and enabling/disabling appropriate controls based on the current domain.
OnDVDParentalLevelChanged
Occurs when the DVD parental control level changes.
public event EventHandler<DVDParentalLevelChangedEventArgs> OnDVDParentalLevelChangedEvent Type
Remarks
Parental levels range from 1 (G-rated) to 8 (NC-17). This event allows applications to respond to parental level changes and potentially prompt for passwords or restrict playback based on configured parental controls.
OnDVDPlaybackError
Occurs when an error is encountered during DVD playback.
public event EventHandler<DVDEventArgs> OnDVDPlaybackErrorEvent Type
Remarks
Common DVD errors include region code mismatches, CSS decryption failures, navigation errors, or corrupted disc data. Handle this event to provide user-friendly error messages and recovery options.
OnDVDTitleChanged
Occurs when the current DVD title changes during playback.
public event EventHandler<EventArgs> OnDVDTitleChangedEvent Type
Remarks
DVD titles represent different video segments on a disc (e.g., main feature, bonus content, trailers). Subscribe to this event to update title displays or load title-specific settings.
OnDataFrameBuffer
Occurs when a new data frame (subtitles, metadata, or other non-AV data) is received.
public event EventHandler<DataFrameEventArgs> OnDataFrameBufferEvent Type
Remarks
This event is specific to the FFMPEG engine and provides access to data streams such as subtitles, closed captions, or embedded metadata. The frame data includes timing information for synchronization with audio/video streams. Note: Only available when using the FFMPEG engine.
OnError
Occurs when any error is encountered during media playback or processing.
public event EventHandler<ErrorsEventArgs> OnErrorEvent Type
Remarks
This is the primary error notification mechanism. Errors can include file access issues, codec problems, hardware failures, or invalid operations. Always subscribe to this event to handle errors gracefully and provide appropriate user feedback. The event args contain error codes, descriptions, and suggested recovery actions.
OnFFMPEGSourceTimestamp
Occurs when the FFMPEG source decoder processes a new frame with timestamp information.
public event EventHandler<FFMPEGSourceTimestampEventArgs> OnFFMPEGSourceTimestampEvent Type
Remarks
This event provides precise timestamp data for each decoded frame, useful for synchronization, frame-accurate seeking, and timing analysis. The event includes both presentation timestamp (PTS) and decode timestamp (DTS) values. Note: Only available when using the FFMPEG engine.
OnFaceDetected
Occurs when one or more faces are detected in a video frame.
public event EventHandler<AFFaceDetectionEventArgs> OnFaceDetectedEvent Type
Remarks
This event fires only when face detection is enabled and faces are found in the frame. The event args contain face locations, confidence scores, and optional facial landmarks. Face detection must be enabled via video effects settings before this event will fire. Performance note: Face detection is CPU/GPU intensive; adjust detection frequency based on your performance requirements.
OnFilterAdded
Occurs when a new DirectShow filter is added to the filter graph.
public event EventHandler<FilterEventArgs> OnFilterAddedEvent Type
Remarks
This event is useful for debugging filter graph construction and for accessing specific filters for advanced configuration. The event provides the filter name and interface pointer for direct manipulation. Note: This event is only available when using the DirectShow engine.
OnLicenseRequired
Occurs when the current playback configuration requires a specific SDK edition.
public event EventHandler<LicenseEventArgs> OnLicenseRequiredEvent Type
Remarks
Raised while the player starts, once per start, with the minimum edition the configuration needs and the feature that asks for it. It reports a requirement, not a failure: it fires even when the configuration only needs Standard, and it says nothing about which license is installed. It is not the trial-expiry notification either -- an expired trial aborts the start with its own message.
OnLoop
Occurs when playback reaches the end and automatically restarts due to loop mode being enabled.
public event EventHandler<EventArgs> OnLoopEvent Type
Remarks
This event only fires when the Loop property is true and playback cycles from end to beginning. Use this to track loop iterations, update loop counters, or perform actions at each loop point. For seamless looping, ensure any event handlers execute quickly to avoid playback gaps.
OnMIDIFileInfo
Occurs when MIDI file information becomes available during playback of MIDI files.
public event EventHandler<MIDIInfoEventArgs> OnMIDIFileInfoEvent Type
Remarks
This event provides MIDI-specific information such as tempo changes, instrument programs, lyrics, and other MIDI metadata. Only fires when playing MIDI files (.mid, .midi, .kar). Event frequency depends on MIDI content but typically occurs at tempo changes, program changes, or lyric events.
OnMotion
Occurs when motion is detected in the video stream based on configured motion detection settings.
public event EventHandler<MotionDetectionEventArgs> OnMotionEvent Type
Remarks
This event fires only when motion detection is enabled and motion exceeding the configured threshold is detected. Event args include motion level (0-100%), affected regions, and motion vector data if available. Use motion detection settings to configure sensitivity, regions of interest, and minimum motion duration to reduce false positives.
OnMotionDetectionEx
This event occurs whenever each new video frame is received. Event args contain motion data.
public event EventHandler<MotionDetectionExEventArgs> OnMotionDetectionExEvent Type
OnNetworkSourceStop
Occurs when a network media source (RTSP, RTMP, HTTP stream) stops or loses connection.
public event EventHandler<EventArgs> OnNetworkSourceStopEvent Type
Remarks
This event is specific to network streams and helps distinguish between intentional stops and connection failures. Use this to implement reconnection logic, display connection status, or switch to backup streams. Note: Only available when using the FFMPEG engine with network sources.
OnNewFilePlaybackStarted
Occurs when playback of a new media file begins, either individually or as part of a playlist.
public event EventHandler<NewFilePlaybackEventArgs> OnNewFilePlaybackStartedEvent Type
Remarks
This event provides information about the newly started file including filename, duration, format details, and playlist index if applicable. Use this to update now-playing displays, load file-specific settings, or log playback history. Fires after OnStart for each new file.
OnPause
Occurs when media playback is paused via the Pause() method or automatic pausing.
public event EventHandler<EventArgs> OnPauseEvent Type
Remarks
This event confirms that playback has been successfully paused and the media pipeline is in a paused state. Audio/video rendering stops but the current position is maintained. Use this to update pause/play button states and disable time-sensitive operations.
OnPlaylistFinished
Occurs when all items in a playlist have completed playback.
public event EventHandler<EventArgs> OnPlaylistFinishedEvent Type
Remarks
This event fires after the last item in a playlist finishes playing and loop mode is disabled. Use this to display completion messages, automatically load new playlists, or return to a menu interface. This event will not fire if loop mode is enabled for the playlist.
OnResume
Occurs when media playback resumes from a paused state via Resume() or Play().
public event EventHandler<EventArgs> OnResumeEvent Type
Remarks
This event indicates that playback has successfully resumed from the exact position where it was paused. Use this to restore UI states, restart timers, or resume any operations that were suspended during pause.
OnStart
Occurs when media playback successfully starts after calling Play() or at the beginning of a new file.
public event EventHandler<EventArgs> OnStartEvent Type
Remarks
This event indicates that the media pipeline is fully initialized and playback has begun. Use this event to update UI controls, start timers, or perform actions that depend on active playback. For playlist mode, this fires at the start of each file.
OnStop
Occurs when media playback stops completely, either by calling Stop() or reaching the end.
public event EventHandler<StopEventArgs> OnStopEvent Type
Remarks
This event indicates that the media pipeline has been shut down and resources released. The StopEventArgs indicate whether the stop was user-initiated or due to reaching the end. After this event, the player returns to an uninitialized state and requires Play() to restart.
OnVideoFrameBitmap
Occurs when a new video frame is available as a System.Drawing.Bitmap object.
public event EventHandler<VideoFrameBitmapEventArgs> OnVideoFrameBitmapEvent Type
Remarks
This event provides video frames as Bitmap objects for easy integration with Windows Forms or any code using System.Drawing. The bitmap is a managed copy of the video frame, suitable for display or further processing. Note: Creating bitmaps has performance overhead; use OnVideoFrameBuffer for better performance in high-throughput scenarios.
OnVideoFrameBuffer
Occurs when a new video frame buffer is available for processing.
public event EventHandler<VideoFrameBufferEventArgs> OnVideoFrameBufferEvent Type
Remarks
This event provides raw video frame data in various pixel formats (RGB, YUV, etc.) for real-time processing, analysis, or custom rendering. The frame data includes resolution, stride, and format information. Performance note: Handle this event efficiently as it fires at the video frame rate (e.g., 30-60 times per second). Consider using async processing for heavy operations.
OnVideoFrameBufferWPF
Occurs when a new video frame buffer is available, optimized for WPF applications.
public event EventHandler<VideoFrameBufferEventArgs> OnVideoFrameBufferWPFEvent Type
Remarks
This WPF-specific event provides video frames in a format optimized for WPF rendering, typically as WriteableBitmap-compatible data. Use this instead of OnVideoFrameBuffer in WPF applications for better performance and easier integration with WPF imaging. The event is marshaled to the UI thread when necessary.
PropertyChanged
Occurs when a property value changes, enabling data binding and change notifications.
public event PropertyChangedEventHandler PropertyChanged