public void SetAudioOutputDevice(VlcMediaPlayerInstance mediaPlayerInstance, string audioOutputDescriptionName, string deviceName)
 {
     using (var audioOutputInterop = Utf8InteropStringConverter.ToUtf8Interop(audioOutputDescriptionName))
         using (var deviceNameInterop = Utf8InteropStringConverter.ToUtf8Interop(audioOutputDescriptionName))
         {
             GetInteropDelegate <SetAudioOutputDevice>().Invoke(mediaPlayerInstance, audioOutputInterop.DangerousGetHandle(), deviceNameInterop.DangerousGetHandle());
         }
 }
Beispiel #2
0
        public void SetAudioOutput(string outputName)
        {
            EnsureVlcInstance();

            using (var outputInterop = Utf8InteropStringConverter.ToUtf8Interop(outputName))
            {
                GetInteropDelegate <SetAudioOutput>().Invoke(myVlcInstance, outputInterop.DangerousGetHandle());
            }
        }
        public VlcMediaInstance CreateNewMediaFromLocation(string mrl)
        {
            EnsureVlcInstance();

            using (var handle = Utf8InteropStringConverter.ToUtf8Interop(mrl))
            {
                return(VlcMediaInstance.New(this, GetInteropDelegate <CreateNewMediaFromLocation>().Invoke(myVlcInstance, handle.DangerousGetHandle())));
            }
        }
        public string GetAudioOutputDeviceName(string audioOutputDescriptionName, int deviceIndex)
        {
            EnsureVlcInstance();

            using (var audioOutputInterop = Utf8InteropStringConverter.ToUtf8Interop(audioOutputDescriptionName))
            {
                return(Utf8InteropStringConverter.Utf8InteropToString(GetInteropDelegate <GetAudioOutputDeviceName>().Invoke(myVlcInstance, audioOutputInterop.DangerousGetHandle(), deviceIndex)));
            }
        }
 public void SetVideoLogoFile(VlcMediaPlayerInstance mediaPlayerInstance, string value)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media player instance is not initialized.");
     }
     using (var valueInterop = Utf8InteropStringConverter.ToUtf8Interop(value))
     {
         GetInteropDelegate <SetVideoLogoString>().Invoke(mediaPlayerInstance, VideoLogoOptions.File, valueInterop.DangerousGetHandle());
     }
 }
 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());
     }
 }
Beispiel #7
0
 public void SetMediaMeta(VlcMediaInstance mediaInstance, MediaMetadatas metadata, string value)
 {
     if (mediaInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media instance is not initialized.");
     }
     using (var handle = Utf8InteropStringConverter.ToUtf8Interop(value))
     {
         GetInteropDelegate <SetMediaMetadata>().Invoke(mediaInstance, metadata, handle.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.ToUtf8Interop(aspectRatio))
            {
                GetInteropDelegate <SetVideoAspectRatio>().Invoke(mediaPlayerInstance, aspectRatioInterop.DangerousGetHandle());
            }
        }
        public void AddOptionFlagToMedia(VlcMediaInstance mediaInstance, string option, uint flag)
        {
            if (mediaInstance == IntPtr.Zero)
            {
                throw new ArgumentException("Media instance is not initialized.");
            }

            using (var handle = Utf8InteropStringConverter.ToUtf8Interop(option))
            {
                GetInteropDelegate <AddOptionFlagToMedia>().Invoke(mediaInstance, handle.DangerousGetHandle(), flag);
            }
        }
        public void SetVideoCropGeometry(VlcMediaPlayerInstance mediaPlayerInstance, string cropGeometry)
        {
            if (mediaPlayerInstance == IntPtr.Zero)
            {
                throw new ArgumentException("Media player instance is not initialized.");
            }

            using (var cropGeometryInterop = Utf8InteropStringConverter.ToUtf8Interop(cropGeometry))
            {
                GetInteropDelegate <SetVideoCropGeometry>()
                .Invoke(mediaPlayerInstance, cropGeometryInterop.DangerousGetHandle());
            }
        }