示例#1
0
        protected override void Initialize(Interop.Media.MediaTrack mediaTrack)
        {
            base.Initialize(mediaTrack);

            var subtitleTrack =
                (Interop.Media.SubtitleTrack)Marshal.PtrToStructure(Track, typeof(Interop.Media.SubtitleTrack));

            Encoding = InteropHelper.PtrToString(subtitleTrack.Encoding);
        }
示例#2
0
        public String VlmGetInfomation(String name)
        {
            var nameHandle = InteropHelper.StringToPtr(name);

            var result = _returnJsonMessageFunction.Delegate(InstancePointer, nameHandle.AddrOfPinnedObject());

            nameHandle.Free();

            return(InteropHelper.PtrToString(result));
        }
示例#3
0
 internal AudioOutput(IntPtr pointer)
 {
     _pointer = pointer;
     if (pointer != IntPtr.Zero)
     {
         _struct =
             (Interop.MediaPlayer.AudioOutput)
             Marshal.PtrToStructure(pointer, typeof(Interop.MediaPlayer.AudioOutput));
         Name        = InteropHelper.PtrToString(_struct.Name);
         Description = InteropHelper.PtrToString(_struct.Description);
     }
 }
示例#4
0
 internal TrackDescription(IntPtr pointer)
 {
     _pointer = pointer;
     if (pointer != IntPtr.Zero)
     {
         Struct =
             (Interop.MediaPlayer.TrackDescription)
                 Marshal.PtrToStructure(pointer, typeof (Interop.MediaPlayer.TrackDescription));
         Name = InteropHelper.PtrToString(Struct.Name);
         Id = Struct.Id;
     }
 }
示例#5
0
 protected virtual void Initialize(Interop.Media.MediaTrack mediaTrack)
 {
     Codec          = mediaTrack.Codec;
     OriginalFourcc = mediaTrack.OriginalFourcc;
     Id             = mediaTrack.Id;
     Type           = mediaTrack.Type;
     Profile        = mediaTrack.Profile;
     Level          = mediaTrack.Level;
     Bitrate        = mediaTrack.Bitrate;
     Language       = InteropHelper.PtrToString(mediaTrack.Language);
     Description    = InteropHelper.PtrToString(mediaTrack.Description);
     Track          = mediaTrack.Track;
 }
示例#6
0
 internal ModuleDescription(IntPtr pointer)
 {
     _pointer = pointer;
     if (pointer != IntPtr.Zero)
     {
         _struct =
             (Interop.Core.ModuleDescription)
             Marshal.PtrToStructure(pointer, typeof(Interop.Core.ModuleDescription));
         Name      = InteropHelper.PtrToString(_struct.Name);
         ShortName = InteropHelper.PtrToString(_struct.ShortName);
         LongName  = InteropHelper.PtrToString(_struct.LongName);
         Help      = InteropHelper.PtrToString(_struct.Help);
     }
 }
示例#7
0
 /// <summary>
 ///     Get the name of a particular equalizer preset.
 /// </summary>
 /// <param name="index"></param>
 /// <returns></returns>
 public static String GetPresetEqualizerName(uint index)
 {
     return(InteropHelper.PtrToString(_getEqualizerPresetNameFunction.Delegate(index)));
 }
示例#8
0
 /// <summary>
 ///     Get event type name.
 /// </summary>
 /// <param name="type"></param>
 /// <returns></returns>
 public static String GetEventTypeName(EventTypes type)
 {
     return(InteropHelper.PtrToString(_getTypeNameFunction.Delegate(type)));
 }
示例#9
0
 public String GetMeta(MetaDataType type)
 {
     return(InteropHelper.PtrToString(_getMetaFunction.Delegate(InstancePointer, type)));
 }
示例#10
0
 public static String GetCodecDescription(TrackType type, int codec)
 {
     return(InteropHelper.PtrToString(_getCodecDescriptionFunction.Delegate(type, codec)));
 }
示例#11
0
 /// <summary>
 ///     Get a readable error message.
 /// </summary>
 /// <returns>return a readable LibVlc error message, if there are no error will return <see cref="null" /></returns>
 /// <exception cref="Exception">A delegate callback throws an exception.</exception>
 public static String GetErrorMessage()
 {
     return(InteropHelper.PtrToString(_errorMessageFunction.Delegate()));
 }
示例#12
0
 /// <summary>
 ///     Get changeset of LibVlc.
 /// </summary>
 /// <returns></returns>
 public static String GetChangeset()
 {
     return(InteropHelper.PtrToString(_getChangesetFunction.Delegate()));
 }
示例#13
0
 /// <summary>
 ///     Get compiler infomation of LibVlc.
 /// </summary>
 /// <returns></returns>
 public static String GetCompiler()
 {
     return(InteropHelper.PtrToString(_getCompilerFunction.Delegate()));
 }
示例#14
0
 /// <summary>
 ///     Get version string of LibVlc.
 /// </summary>
 /// <returns></returns>
 public static String GetVersion()
 {
     return(InteropHelper.PtrToString(_getVersionFunction.Delegate()));
 }