public void SetVideoSpu(VlcMediaPlayerInstance mediaPlayerInstance, TrackDescriptionStructure trackDescription)
 {
     if (mediaPlayerInstance == IntPtr.Zero)
     {
         throw new ArgumentException("Media instance is not initialized.");
     }
     SetVideoSpu(mediaPlayerInstance, trackDescription.Id);
 }
Beispiel #2
0
        internal static List <TrackDescription> GetSubTrackDescription(TrackDescriptionStructure module)
        {
            var result = new List <TrackDescription>();

            result.Add(new TrackDescription(module.Id, module.Name));
            if (module.NextTrackDescription != IntPtr.Zero)
            {
                TrackDescriptionStructure nextModule = (TrackDescriptionStructure)Marshal.PtrToStructure(module.NextTrackDescription, typeof(TrackDescriptionStructure));
                var data = GetSubTrackDescription(nextModule);
                result.AddRange(data);
            }
            return(result);
        }
 /// <summary>
 /// Helper method that creates a user friendly type from the internal interop structure.
 /// </summary>
 /// <param name="s">TrackDescriptionStructure from interop</param>
 /// <returns>public TrackDescription to be consumed by the user</returns>
 internal static TrackDescription Build(this TrackDescriptionStructure s) =>
 new TrackDescription(s.Id, Utf8StringMarshaler.GetInstance().MarshalNativeToManaged(s.Name) as string);
Beispiel #4
0
 public void ReleaseTrackDescription(TrackDescriptionStructure trackDescription)
 {
     GetInteropDelegate <ReleaseTrackDescription>().Invoke(trackDescription);
 }
 /// <summary>
 /// Helper method that creates a user friendly type from the internal interop structure.
 /// </summary>
 /// <param name="s">TrackDescriptionStructure from interop</param>
 /// <returns>public TrackDescription to be consumed by the user</returns>
 internal static TrackDescription Build(this TrackDescriptionStructure s) =>
 new TrackDescription(s.Id, s.Name.FromUtf8());