Esempio n. 1
1
        internal VlcMediaPlayer(VlcManager manager, string[] options)
        {
            Manager = manager;
            Manager.CreateNewInstance(options);

            myMediaPlayerInstance = manager.CreateMediaPlayer();
            RegisterEvents();
            Chapters = new ChapterManagement(manager, myMediaPlayerInstance);
            SubTitles = new SubTitlesManagement(manager, myMediaPlayerInstance);
            Video = new VideoManagement(manager, myMediaPlayerInstance);
            Audio = new AudioManagement(manager, myMediaPlayerInstance);
        }
 internal AudioManagement(VlcManager manager, VlcMediaPlayerInstance mediaPlayerInstance)
 {
     myManager = manager;
     myMediaPlayer = mediaPlayerInstance;
     Outputs = new AudioOutputsManagement(manager, mediaPlayerInstance);
     Tracks = new AudioTracksManagement(manager, mediaPlayerInstance);
 }
 internal AudioOutputDevice(VlcManager manager, VlcMediaPlayerInstance mediaPlayerInstance, AudioOutputDescription audioDescription, int id)
 {
     myManager = manager;
     myMediaPlayerInstance = mediaPlayerInstance;
     myAudioOutputDescription = audioDescription;
     Id = id;
 }
 public void SetAudioTrack(VlcMediaPlayerInstance mediaPlayerInstance, int id)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     GetInteropDelegate <SetAudioTrack>().Invoke(mediaPlayerInstance, id);
 }
Esempio n. 5
0
 public void SetAudioChannel(VlcMediaPlayerInstance mediaPlayerInstance, int channel)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     myLibraryLoader.GetInteropDelegate <SetAudioChannel>().Invoke(mediaPlayerInstance, channel);
 }
 public int GetAudioTracksCount(VlcMediaPlayerInstance mediaPlayerInstance)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     return(GetInteropDelegate <GetAudioTracksCount>().Invoke(mediaPlayerInstance));
 }
 public void SetMediaToMediaPlayer(VlcMediaPlayerInstance mediaPlayerInstance, VlcMediaInstance mediaInstance)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
         throw new ArgumentException("Media player instance is not initialized.");
     if (mediaInstance == IntPtr.Zero)
         throw new ArgumentException("Media instance is not initialized.");
     GetInteropDelegate<SetMediaToMediaPlayer>().Invoke(mediaPlayerInstance, mediaInstance);
 }
 internal AudioOutputDescription(string name, string description, VlcManager manager, VlcMediaPlayerInstance mediaPlayerInstance)
 {
     Name = name;
     Description = description;
     myManager = manager;
     myMediaPlayerInstance = mediaPlayerInstance;
     Devices = new AudioOutputDevices(this, manager, myMediaPlayerInstance);
 }
 public string GetVideoMarqueeText(VlcMediaPlayerInstance mediaPlayerInstance)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     return(Utf8InteropStringConverter.Utf8InteropToString(GetInteropDelegate <GetVideoMarqueeString>().Invoke(mediaPlayerInstance, VideoMarqueeOptions.Text)));
 }
 public void ToggleMute(VlcMediaPlayerInstance mediaPlayerInstance)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     GetInteropDelegate <ToggleMute>().Invoke(mediaPlayerInstance);
 }
 /// <summary>
 /// Enables/Disables libvlc's handling of mouse input
 /// </summary>
 /// <param name="mediaPlayerInstance">The media player instance</param>
 /// <param name="on"><c>true</c> if libvlc should handle mouse events, <c>false</c> otherwise</param>
 /// <remarks>Must be called before the stream has started playing. This is not applicable to the WPF control.</remarks>
 public void SetMouseInput(VlcMediaPlayerInstance mediaPlayerInstance, bool on)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     myLibraryLoader.GetInteropDelegate <SetMouseInput>().Invoke(mediaPlayerInstance, on ? 1u : 0u);
 }
 public TrackDescriptionStructure GetVideoSpuDescription(VlcMediaPlayerInstance mediaPlayerInstance)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     return(GetInteropDelegate <GetVideoSpuDescription>().Invoke(mediaPlayerInstance));
 }
 public void SetFullScreen(VlcMediaPlayerInstance mediaPlayerInstance, bool fullScreen)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     myLibraryLoader.GetInteropDelegate <SetFullScreen>().Invoke(mediaPlayerInstance, fullScreen ? 1 : 0);
 }
Esempio n. 14
0
 public long GetAudioDelay(VlcMediaPlayerInstance mediaPlayerInstance)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     return(myLibraryLoader.GetInteropDelegate <GetAudioDelay>().Invoke(mediaPlayerInstance));
 }
 public void SetAudioTrack(VlcMediaPlayerInstance mediaPlayerInstance, TrackDescriptionStructure trackDescription)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     SetAudioTrack(mediaPlayerInstance, trackDescription.Id);
 }
Esempio n. 16
0
 public void TakeSnapshot(VlcMediaPlayerInstance mediaPlayerInstance, FileInfo file, uint width, uint height)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
         throw new ArgumentException("Media player instance is not initialized.");
     if(file == null)
         throw new ArgumentNullException("file");
     GetInteropDelegate<TakeSnapshot>().Invoke(mediaPlayerInstance, 0, file.FullName, width, height);
 }
 public int GetVideoMarqueeY(VlcMediaPlayerInstance mediaPlayerInstance)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     return(GetInteropDelegate <GetVideoMarqueeInteger>().Invoke(mediaPlayerInstance, VideoMarqueeOptions.Y));
 }
Esempio n. 18
0
 public void SetAspectRatio(VlcMediaPlayerInstance mediaPlayerInstance, string aspectRatio)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     GetInteropDelegate <SetVideoAspectRatio>().Invoke(mediaPlayerInstance, aspectRatio);
 }
Esempio n. 19
0
 public bool IsSeekable(VlcMediaPlayerInstance mediaPlayerInstance)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     return(myLibraryLoader.GetInteropDelegate <IsSeekable>().Invoke(mediaPlayerInstance) == 1);
 }
 public void SetVideoTeletext(VlcMediaPlayerInstance mediaPlayerInstance, int teletextPage)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     myLibraryLoader.GetInteropDelegate <SetVideoTeletext>().Invoke(mediaPlayerInstance, teletextPage);
 }
 public void SetMediaPlayerVideoHostHandle(VlcMediaPlayerInstance mediaPlayerInstance, IntPtr videoHostHandle)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     myLibraryLoader.GetInteropDelegate <SetMediaPlayerVideoHostHandle>().Invoke(mediaPlayerInstance, videoHostHandle);
 }
 public VideoManagement(VlcManager manager, VlcMediaPlayerInstance mediaPlayerInstance)
 {
     myManager = manager;
     myMediaPlayer = mediaPlayerInstance;
     Tracks = new VideoTracksManagement(manager, mediaPlayerInstance);
     Marquee = new MarqueeManagement(manager, mediaPlayerInstance);
     Logo = new LogoManagement(manager, mediaPlayerInstance);
     Adjustments = new AdjustmentsManagement(manager, mediaPlayerInstance);
 }
        public void SetVideoFormatCallbacks(VlcMediaPlayerInstance mediaPlayerInstance, VideoFormatCallback videoFormatCallback, CleanupVideoCallback cleanupCallback)
        {
            if (mediaPlayerInstance == IntPtr.Zero)
            {
                throw new ArgumentException("Media player instance is not initialized.");
            }

            myLibraryLoader.GetInteropDelegate <SetVideoFormatCallbacks>().Invoke(mediaPlayerInstance, videoFormatCallback, cleanupCallback);
        }
Esempio n. 24
0
        public string GetVideoCropGeometry(VlcMediaPlayerInstance mediaPlayerInstance)
        {
            if (mediaPlayerInstance == IntPtr.Zero)
            {
                throw new ArgumentException("Media player instance is not initialized.");
            }

            return(Utf8InteropStringConverter.Utf8InteropToString(myLibraryLoader.GetInteropDelegate <GetVideoCropGeometry>().Invoke(mediaPlayerInstance)));
        }
        public void SetVideoCallbacks(VlcMediaPlayerInstance mediaPlayerInstance, LockVideoCallback lockVideoCallback, UnlockVideoCallback unlockVideoCallback, DisplayVideoCallback displayVideoCallback, IntPtr userData)
        {
            if (mediaPlayerInstance == IntPtr.Zero)
            {
                throw new ArgumentException("Media player instance is not initialized.");
            }

            myLibraryLoader.GetInteropDelegate <SetVideoCallbacks>().Invoke(mediaPlayerInstance, lockVideoCallback, unlockVideoCallback, displayVideoCallback, userData);
        }
        public string GetVideoAspectRatio(VlcMediaPlayerInstance mediaPlayerInstance)
        {
            if (mediaPlayerInstance == IntPtr.Zero)
                throw new ArgumentException("Media player instance is not initialized.");
#if NET20
            return IntPtrExtensions.ToStringAnsi(GetInteropDelegate<GetVideoAspectRatio>().Invoke(mediaPlayerInstance));
#else
            return GetInteropDelegate<GetVideoAspectRatio>().Invoke(mediaPlayerInstance).ToStringAnsi();
#endif
        }
Esempio n. 27
0
        public void SetVideoLogoFile(VlcMediaPlayerInstance mediaPlayerInstance, string value)
        {
            if (mediaPlayerInstance == IntPtr.Zero)
                throw new ArgumentException("Media player instance is not initialized.");
#if NET20
            GetInteropDelegate<SetVideoLogoString>().Invoke(mediaPlayerInstance, VideoLogoOptions.File, StringExtensions.ToHGlobalAnsi(value));
#else
            GetInteropDelegate<SetVideoLogoString>().Invoke(mediaPlayerInstance, VideoLogoOptions.File, value.ToHGlobalAnsi());
#endif
        }
        public void SetVideoDeinterlace(VlcMediaPlayerInstance mediaPlayerInstance, string deinterlaceMode)
        {
            if (mediaPlayerInstance == IntPtr.Zero)
                throw new ArgumentException("Media player instance is not initialized.");
#if NET20
            GetInteropDelegate<SetVideoDeinterlace>().Invoke(mediaPlayerInstance, StringExtensions.ToHGlobalAnsi(deinterlaceMode));
#else
            GetInteropDelegate<SetVideoDeinterlace>().Invoke(mediaPlayerInstance, deinterlaceMode.ToHGlobalAnsi());
#endif
        }
        public void SetVideoAspectRatio(VlcMediaPlayerInstance mediaPlayerInstance, string cropGeometry)
        {
            if (mediaPlayerInstance == IntPtr.Zero)
                throw new ArgumentException("Media player instance is not initialized.");
#if NET20
            GetInteropDelegate<SetVideoAspectRatio>().Invoke(mediaPlayerInstance, StringExtensions.ToHGlobalAnsi(cropGeometry));
#else
            GetInteropDelegate<SetVideoAspectRatio>().Invoke(mediaPlayerInstance, cropGeometry.ToHGlobalAnsi());
#endif
        }
 public void SetVideoLogoFile(VlcMediaPlayerInstance mediaPlayerInstance, string value)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     using (var valueInterop = Utf8InteropStringConverter.ToUtf8StringHandle(value))
     {
         myLibraryLoader.GetInteropDelegate <SetVideoLogoString>().Invoke(mediaPlayerInstance, VideoLogoOptions.File, valueInterop);
     }
 }
Esempio n. 31
0
 public bool IsPlaying(VlcMediaPlayerInstance mediaPlayerInstance)
 {
     if (mediaPlayerInstance == IntPtr.Zero) return false;
     //This seems to be called multiple time
     //Eventually throwing an uncaught exception on close
     //An unhandled exception of type 'System.ArgumentException' occurred in Vlc.DotNet.Core.Interops.dll
     //Additional information: Media player instance is not initialized.
     //if (mediaPlayerInstance == IntPtr.Zero)
     //    throw new ArgumentException("Media player instance is not initialized.");
     return GetInteropDelegate<IsPlaying>().Invoke(mediaPlayerInstance) == 1;
 }
 public void SetVideoMarqueeText(VlcMediaPlayerInstance mediaPlayerInstance, string value)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     using (var valueInterop = Utf8InteropStringConverter.ToUtf8StringHandle(value))
     {
         GetInteropDelegate <SetVideoMarqueeString>().Invoke(mediaPlayerInstance, VideoMarqueeOptions.Text, valueInterop);
     }
 }
 public void SetVideoDeinterlace(VlcMediaPlayerInstance mediaPlayerInstance, string deinterlaceMode)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     using (var deinterlaceModeInterop = Utf8InteropStringConverter.ToUtf8Interop(deinterlaceMode))
     {
         GetInteropDelegate <SetVideoDeinterlace>().Invoke(mediaPlayerInstance, deinterlaceModeInterop.DangerousGetHandle());
     }
 }
        public void SetVideoAspectRatio(VlcMediaPlayerInstance mediaPlayerInstance, string aspectRatio)
        {
            if (mediaPlayerInstance == IntPtr.Zero)
            {
                throw new ArgumentException("Media player instance is not initialized.");
            }

            using (var aspectRatioInterop = Utf8InteropStringConverter.ToUtf8StringHandle(aspectRatio))
            {
                myLibraryLoader.GetInteropDelegate <SetVideoAspectRatio>().Invoke(mediaPlayerInstance, aspectRatioInterop);
            }
        }
Esempio n. 35
0
 public void TakeSnapshot(VlcMediaPlayerInstance mediaPlayerInstance, FileInfo file, uint width, uint height)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     if (file == null)
     {
         throw new ArgumentNullException("file");
     }
     GetInteropDelegate <TakeSnapshot>().Invoke(mediaPlayerInstance, 0, file.FullName, width, height);
 }
        public void SetVideoDeinterlace(VlcMediaPlayerInstance mediaPlayerInstance, string deinterlaceMode)
        {
            if (mediaPlayerInstance == IntPtr.Zero)
            {
                throw new ArgumentException("Media player instance is not initialized.");
            }
#if NET20
            GetInteropDelegate <SetVideoDeinterlace>().Invoke(mediaPlayerInstance, StringExtensions.ToHGlobalAnsi(deinterlaceMode));
#else
            GetInteropDelegate <SetVideoDeinterlace>().Invoke(mediaPlayerInstance, deinterlaceMode.ToHGlobalAnsi());
#endif
        }
Esempio n. 37
0
 internal static List<AudioOutputDescription> GetSubOutputDescription(AudioOutputDescriptionStructure module, VlcManager manager, VlcMediaPlayerInstance mediaPlayerInstance)
 {
     var result = new List<AudioOutputDescription>();
     result.Add(new AudioOutputDescription(module.Name, module.Description, manager, mediaPlayerInstance));
     if (module.NextAudioOutputDescription != IntPtr.Zero)
     {
         AudioOutputDescriptionStructure nextModule = (AudioOutputDescriptionStructure)Marshal.PtrToStructure(module.NextAudioOutputDescription, typeof(AudioOutputDescriptionStructure));
         var data = GetSubOutputDescription(nextModule, manager, mediaPlayerInstance);
         result.AddRange(data);
     }
     return result;
 }
        public void SetVideoCropGeometry(VlcMediaPlayerInstance mediaPlayerInstance, string cropGeometry)
        {
            if (mediaPlayerInstance == IntPtr.Zero)
            {
                throw new ArgumentException("Media player instance is not initialized.");
            }
#if NET20
            GetInteropDelegate <SetVideoCropGeometry>().Invoke(mediaPlayerInstance, StringExtensions.ToHGlobalAnsi(cropGeometry));
#else
            GetInteropDelegate <SetVideoCropGeometry>().Invoke(mediaPlayerInstance, cropGeometry.ToHGlobalAnsi());
#endif
        }
Esempio n. 39
0
        public string GetVideoAspectRatio(VlcMediaPlayerInstance mediaPlayerInstance)
        {
            if (mediaPlayerInstance == IntPtr.Zero)
            {
                throw new ArgumentException("Media player instance is not initialized.");
            }
#if NET20
            return(IntPtrExtensions.ToStringAnsi(GetInteropDelegate <GetVideoAspectRatio>().Invoke(mediaPlayerInstance)));
#else
            return(GetInteropDelegate <GetVideoAspectRatio>().Invoke(mediaPlayerInstance).ToStringAnsi());
#endif
        }
Esempio n. 40
0
        public void SetVideoLogoFile(VlcMediaPlayerInstance mediaPlayerInstance, string value)
        {
            if (mediaPlayerInstance == IntPtr.Zero)
            {
                throw new ArgumentException("Media player instance is not initialized.");
            }
#if NET20
            GetInteropDelegate <SetVideoLogoString>().Invoke(mediaPlayerInstance, VideoLogoOptions.File, StringExtensions.ToHGlobalAnsi(value));
#else
            GetInteropDelegate <SetVideoLogoString>().Invoke(mediaPlayerInstance, VideoLogoOptions.File, value.ToHGlobalAnsi());
#endif
        }
 public void SetMediaToMediaPlayer(VlcMediaPlayerInstance mediaPlayerInstance, VlcMediaInstance mediaInstance)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     if (mediaInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media instance is not initialized.");
     }
     GetInteropDelegate <SetMediaToMediaPlayer>().Invoke(mediaPlayerInstance, mediaInstance);
 }
        public VlcMediaPlayerEventManagerInstance GetMediaPlayerEventManager(VlcMediaPlayerInstance mediaPlayerInstance)
        {
            if (Unloaded)
            {
                return(new VlcMediaPlayerEventManagerInstance(this, IntPtr.Zero));
            }

            if (mediaPlayerInstance == IntPtr.Zero)
            {
                throw new ArgumentException("Media player instance is not initialized.");
            }
            return(new VlcMediaPlayerEventManagerInstance(this, GetInteropDelegate <GetMediaPlayerEventManager>().Invoke(mediaPlayerInstance)));
        }
Esempio n. 43
0
        public void SetVideoCropGeometry(VlcMediaPlayerInstance mediaPlayerInstance, string cropGeometry)
        {
            if (mediaPlayerInstance == IntPtr.Zero)
            {
                throw new ArgumentException("Media player instance is not initialized.");
            }

            using (var cropGeometryInterop = Utf8InteropStringConverter.ToUtf8StringHandle(cropGeometry))
            {
                myLibraryLoader.GetInteropDelegate <SetVideoCropGeometry>()
                .Invoke(mediaPlayerInstance, cropGeometryInterop);
            }
        }
 public void ReleaseMediaPlayer(VlcMediaPlayerInstance mediaPlayerInstance)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
         return;
     try
     {
         GetInteropDelegate<ReleaseMediaPlayer>().Invoke(mediaPlayerInstance);
     }
     finally
     {
         mediaPlayerInstance.Pointer = IntPtr.Zero;
     }
 }
Esempio n. 45
0
 private void ResetFromMediaCore(Control ctrl)
 {
     VideoHostControlHandle = IntPtr.Zero;
     var mediaInstance = GetMedia().MediaInstance;
     if (ctrl != null)
         ctrl.GetType().GetMethod("RecreateHandle", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(ctrl, null);
     myMediaPlayerInstance.Pointer = IntPtr.Zero;
     myMediaPlayerInstance = Manager.CreateMediaPlayerFromMedia(mediaInstance);
     RegisterEvents();
     Chapters = new ChapterManagement(Manager, myMediaPlayerInstance);
     Subtitles = new SubtitlesManagement(Manager, myMediaPlayerInstance);
     Video = new VideoManagement(Manager, myMediaPlayerInstance);
     Audio = new AudioManagement(Manager, myMediaPlayerInstance);
     if (ctrl != null)
         VideoHostControlHandle = ctrl.Handle;
 }
 internal VlcMediaPlayer(VlcManager manager)
 {
     Manager = manager;
     #if DEBUG
     Manager.CreateNewInstance(new[]
     {
         "--extraintf=logger",
         "--verbose=2"
     });
     #else
     Manager.CreateNewInstance(null);
     #endif
     myMediaPlayerInstance = manager.CreateMediaPlayer();
     RegisterEvents();
     Chapters = new ChapterManagement(manager, myMediaPlayerInstance);
     SubTitles = new SubTitlesManagement(manager, myMediaPlayerInstance);
     Video = new VideoManagement(manager, myMediaPlayerInstance);
     Audio = new AudioManagement(manager, myMediaPlayerInstance);
 }
Esempio n. 47
0
 public void SetMute(VlcMediaPlayerInstance mediaPlayerInstance, bool status)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
         throw new ArgumentException("Media player instance is not initialized.");
     GetInteropDelegate<SetMute>().Invoke(mediaPlayerInstance, status ? 1 : 0);
 }
 public bool IsPlaying(VlcMediaPlayerInstance mediaPlayerInstance)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
         throw new ArgumentException("Media player instance is not initialized.");
     return GetInteropDelegate<IsPlaying>().Invoke(mediaPlayerInstance) == 1;
 }
 public void SetAudioDelay(VlcMediaPlayerInstance mediaPlayerInstance, long delay)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
         throw new ArgumentException("Media player instance is not initialized.");
     GetInteropDelegate<SetAudioDelay>().Invoke(mediaPlayerInstance, delay);
 }
 public float GetFramesPerSecond(VlcMediaPlayerInstance mediaPlayerInstance)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
         throw new ArgumentException("Media player instance is not initialized.");
     return GetInteropDelegate<GetFramesPerSecond>().Invoke(mediaPlayerInstance);
 }
Esempio n. 51
0
 internal VideoTracksManagement(VlcManager manager, VlcMediaPlayerInstance mediaPlayerInstance)
 {
     myManager = manager;
     myMediaPlayer = mediaPlayerInstance;
 }
 public void SetVideoSpu(VlcMediaPlayerInstance mediaPlayerInstance, int id)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
         throw new ArgumentException("Media instance is not initialized.");
     GetInteropDelegate<SetVideoSpu>().Invoke(mediaPlayerInstance, id);
 }
 public int GetMediaChapter(VlcMediaPlayerInstance mediaPlayerInstance)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
         throw new ArgumentException("Media player instance is not initialized.");
     return GetInteropDelegate<GetMediaChapter>().Invoke(mediaPlayerInstance);
 }
 public void SetVideoAdjustEnabled(VlcMediaPlayerInstance mediaPlayerInstance, bool value)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
         throw new ArgumentException("Media player instance is not initialized.");
     GetInteropDelegate<SetVideoAdjustInteger>().Invoke(mediaPlayerInstance, VideoAdjustOptions.Enable, value ? 1 : 0);
 }
 public void SetVideoAdjustGamma(VlcMediaPlayerInstance mediaPlayerInstance, float value)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
         throw new ArgumentException("Media player instance is not initialized.");
     GetInteropDelegate<SetVideoAdjustFloat>().Invoke(mediaPlayerInstance, VideoAdjustOptions.Gamma, value);
 }
 public void SetVideoSpu(VlcMediaPlayerInstance mediaPlayerInstance, TrackDescriptionStructure trackDescription)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
         throw new ArgumentException("Media instance is not initialized.");
     SetVideoSpu(mediaPlayerInstance, trackDescription.Id);
 }
 public long GetVideoSpuDelay(VlcMediaPlayerInstance mediaPlayerInstance)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
         throw new ArgumentException("Media player instance is not initialized.");
     return GetInteropDelegate<GetVideoSpuDelay>().Invoke(mediaPlayerInstance);
 }
Esempio n. 58
0
 public void SetVideoLogoPosition(VlcMediaPlayerInstance mediaPlayerInstance, int value)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
         throw new ArgumentException("Media player instance is not initialized.");
     GetInteropDelegate<SetVideoLogoInteger>().Invoke(mediaPlayerInstance, VideoLogoOptions.Position, value);
 }
Esempio n. 59
0
 public void SetVolume(VlcMediaPlayerInstance mediaPlayerInstance, int volume)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
         throw new ArgumentException("Media player instance is not initialized.");
     GetInteropDelegate<SetVolume>().Invoke(mediaPlayerInstance, volume);
 }
 public VlcMediaInstance GetMediaFromMediaPlayer(VlcMediaPlayerInstance mediaPlayerInstance)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
         throw new ArgumentException("Media player instance is not initialized.");
     return new VlcMediaInstance(this, GetInteropDelegate<GetMediaFromMediaPlayer>().Invoke(mediaPlayerInstance));
 }