/// <summary> /// VlcAudioOutput constrctor /// </summary> /// <param name="audioOutput">The libvlc audio output structure</param> internal VlcAudioOutputDevice(AudioOutput audioOutput) { Name = IntPtrExtensions.ToStringAnsi(audioOutput.name); Description = IntPtrExtensions.ToStringAnsi(audioOutput.description); if (audioOutput.next != IntPtr.Zero) { var next = (AudioOutput)Marshal.PtrToStructure(audioOutput.next, typeof(AudioOutput)); Next = new VlcAudioOutputDevice(next); } }
internal VlcTrackDescription(TrackDescription trackDescription) { Name = IntPtrExtensions.ToStringAnsi(trackDescription.name); Id = trackDescription.id; if (trackDescription.next != IntPtr.Zero) { var next = (TrackDescription)Marshal.PtrToStructure(trackDescription.next, typeof(TrackDescription)); Next = new VlcTrackDescription(next); } }
internal VlcTrackDescription(TrackDescription trackDescription) { Name = IntPtrExtensions.ToStringAnsi(trackDescription.name); Id = trackDescription.id; if (trackDescription.next != IntPtr.Zero) { #if SILVERLIGHT var next = new TrackDescription(); Marshal.PtrToStructure(trackDescription.next, next); #else var next = (TrackDescription)Marshal.PtrToStructure(trackDescription.next, typeof(TrackDescription)); #endif Next = new VlcTrackDescription(next); } }
/// <summary> /// VlcAudioOutput constrctor /// </summary> /// <param name="audioOutput">The libvlc audio output structure</param> internal VlcAudioOutputDevice(AudioOutput audioOutput) { Name = IntPtrExtensions.ToStringAnsi(audioOutput.name); Description = IntPtrExtensions.ToStringAnsi(audioOutput.description); if (audioOutput.next != IntPtr.Zero) { #if SILVERLIGHT var next = new AudioOutput(); Marshal.PtrToStructure(audioOutput.next, next); #else var next = (AudioOutput)Marshal.PtrToStructure(audioOutput.next, typeof(AudioOutput)); #endif Next = new VlcAudioOutputDevice(next); } }
internal static FilterModuleDescription GetFilterModuleDescription(ModuleDescriptionStructure module) { if (module.Name == IntPtr.Zero) { return(null); } var result = new FilterModuleDescription(); #if NET20 result.Name = IntPtrExtensions.ToStringAnsi(module.Name); result.ShortName = IntPtrExtensions.ToStringAnsi(module.ShortName); result.LongName = IntPtrExtensions.ToStringAnsi(module.LongName); result.Help = IntPtrExtensions.ToStringAnsi(module.Help); #else result.Name = module.Name.ToStringAnsi(); result.ShortName = module.ShortName.ToStringAnsi(); result.LongName = module.LongName.ToStringAnsi(); result.Help = module.Help.ToStringAnsi(); #endif return(result); }