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);
         }
 }
Ejemplo n.º 2
0
 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)));
 }
Ejemplo n.º 3
0
        public VlcMediaInstance CreateNewMediaFromLocation(string mrl)
        {
            EnsureVlcInstance();

            using (var handle = Utf8InteropStringConverter.ToUtf8StringHandle(mrl))
            {
                return(VlcMediaInstance.New(this, GetInteropDelegate <CreateNewMediaFromLocation>().Invoke(myVlcInstance, handle)));
            }
        }
Ejemplo n.º 4
0
        public void SetAudioOutput(string outputName)
        {
            EnsureVlcInstance();

            using (var outputInterop = Utf8InteropStringConverter.ToUtf8StringHandle(outputName))
            {
                GetInteropDelegate <SetAudioOutput>().Invoke(myVlcInstance, outputInterop);
            }
        }
Ejemplo n.º 5
0
        public string GetAudioOutputDeviceName(string audioOutputDescriptionName, int deviceIndex)
        {
            EnsureVlcInstance();

            using (var audioOutputInterop = Utf8InteropStringConverter.ToUtf8StringHandle(audioOutputDescriptionName))
            {
                return(Utf8InteropStringConverter.Utf8InteropToString(GetInteropDelegate <GetAudioOutputDeviceName>().Invoke(myVlcInstance, audioOutputInterop, deviceIndex)));
            }
        }
Ejemplo n.º 6
0
        public string GetMediaMeta(VlcMediaInstance mediaInstance, MediaMetadatas metadata)
        {
            if (mediaInstance == IntPtr.Zero)
            {
                throw new ArgumentException("Media instance is not initialized.");
            }
            var ptr = GetInteropDelegate <GetMediaMetadata>().Invoke(mediaInstance, metadata);

            return(Utf8InteropStringConverter.Utf8InteropToString(ptr));
        }
 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);
     }
 }
Ejemplo n.º 8
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);
     }
 }
Ejemplo n.º 9
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);
     }
 }
Ejemplo n.º 10
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);
            }
        }
Ejemplo n.º 12
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);
            }
        }
Ejemplo n.º 13
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);
            }
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Gets log message debug infos.
        ///
        /// This function retrieves self-debug information about a log message:
        /// - the name of the VLC module emitting the message,
        /// - the name of the source code module (i.e.file) and
        /// - the line number within the source code module.
        ///
        /// The returned module name and file name will be NULL if unknown.
        /// The returned line number will similarly be zero if unknown.
        /// </summary>
        /// <param name="logContext">The log message context (as passed to the <see cref="LogCallback"/>)</param>
        /// <param name="module">The module name storage.</param>
        /// <param name="file">The source code file name storage.</param>
        /// <param name="line">The source code file line number storage.</param>
        public void GetLogContext(IntPtr logContext, out string module, out string file, out uint?line)
        {
            UIntPtr line2;
            IntPtr  module2;
            IntPtr  file2;

            GetInteropDelegate <GetLogContext>().Invoke(logContext, out module2, out file2, out line2);
            if (line2 == UIntPtr.Zero)
            {
                line = null;
            }
            else
            {
                line = line2.ToUInt32();
            }

            module = Utf8InteropStringConverter.Utf8InteropToString(module2);
            file   = Utf8InteropStringConverter.Utf8InteropToString(file2);
        }
Ejemplo n.º 15
0
 public string GetCompiler()
 {
     return(Utf8InteropStringConverter.Utf8InteropToString(GetInteropDelegate <GetCompiler>().Invoke()));
 }
Ejemplo n.º 16
0
 public string GetChangeset()
 {
     return(Utf8InteropStringConverter.Utf8InteropToString(GetInteropDelegate <GetChangeset>().Invoke()));
 }
 public string GetLastErrorMessage()
 {
     return(Utf8InteropStringConverter.Utf8InteropToString(GetInteropDelegate <GetLastErrorMessage>().Invoke()));
 }
Ejemplo n.º 18
0
 public string GetEventTypeName(EventTypes eventType)
 {
     return(Utf8InteropStringConverter.Utf8InteropToString(GetInteropDelegate <GetEventTypeName>().Invoke(eventType)));
 }