public void SetAudioOutputDevice(VlcMediaPlayerInstance mediaPlayerInstance, string audioOutputDescriptionName, string deviceName)
 {
     using (var audioOutputInterop = Utf8InteropStringConverter.ToUtf8StringHandle(audioOutputDescriptionName))
         using (var deviceNameInterop = Utf8InteropStringConverter.ToUtf8StringHandle(audioOutputDescriptionName))
         {
             GetInteropDelegate <SetAudioOutputDevice>().Invoke(mediaPlayerInstance, audioOutputInterop, deviceNameInterop);
         }
 }
Пример #2
0
        public VlcMediaInstance CreateNewMediaFromLocation(string mrl)
        {
            EnsureVlcInstance();

            using (var handle = Utf8InteropStringConverter.ToUtf8StringHandle(mrl))
            {
                return(VlcMediaInstance.New(this, GetInteropDelegate <CreateNewMediaFromLocation>().Invoke(myVlcInstance, handle)));
            }
        }
Пример #3
0
        public string GetAudioOutputDeviceName(string audioOutputDescriptionName, int deviceIndex)
        {
            EnsureVlcInstance();

            using (var audioOutputInterop = Utf8InteropStringConverter.ToUtf8StringHandle(audioOutputDescriptionName))
            {
                return(Utf8InteropStringConverter.Utf8InteropToString(GetInteropDelegate <GetAudioOutputDeviceName>().Invoke(myVlcInstance, audioOutputInterop, deviceIndex)));
            }
        }
Пример #4
0
        public void SetAudioOutput(string outputName)
        {
            EnsureVlcInstance();

            using (var outputInterop = Utf8InteropStringConverter.ToUtf8StringHandle(outputName))
            {
                GetInteropDelegate <SetAudioOutput>().Invoke(myVlcInstance, outputInterop);
            }
        }
Пример #5
0
 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))
     {
         GetInteropDelegate <SetVideoLogoString>().Invoke(mediaPlayerInstance, VideoLogoOptions.File, 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.ToUtf8StringHandle(deinterlaceMode))
     {
         GetInteropDelegate <SetVideoDeinterlace>().Invoke(mediaPlayerInstance, deinterlaceModeInterop);
     }
 }
Пример #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.ToUtf8StringHandle(value))
     {
         GetInteropDelegate <SetMediaMetadata>().Invoke(mediaInstance, metadata, handle);
     }
 }
Пример #8
0
        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.ToUtf8StringHandle(option))
            {
                GetInteropDelegate <AddOptionFlagToMedia>().Invoke(mediaInstance, handle, flag);
            }
        }
        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))
            {
                GetInteropDelegate <SetVideoAspectRatio>().Invoke(mediaPlayerInstance, aspectRatioInterop);
            }
        }
Пример #10
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))
            {
                GetInteropDelegate <SetVideoCropGeometry>()
                .Invoke(mediaPlayerInstance, cropGeometryInterop);
            }
        }
Пример #11
0
        public void AddOptionToMedia(VlcMediaInstance mediaInstance, string option)
        {
            if (mediaInstance == IntPtr.Zero)
            {
                throw new ArgumentException("Media instance is not initialized.");
            }
            if (string.IsNullOrEmpty(option))
            {
                return;
            }

            using (var handle = Utf8InteropStringConverter.ToUtf8StringHandle(option))
            {
                GetInteropDelegate <AddOptionToMedia>().Invoke(mediaInstance, handle);
            }
        }