Commit c3ebca1c authored by Martin Finkel's avatar Martin Finkel

Some cleanup + WIP on events/event manager

parent c83ced1e
......@@ -2,6 +2,7 @@
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using NUnit.Framework;
using VideoLAN.LibVLC;
......@@ -56,9 +57,11 @@ namespace Bindings.Tests
{
var instance = new Instance();
var media = new Media(instance, RealMediaPath, Media.FromType.FromPath);
Assert.False(media.IsParsed);
media.Parse();
//media.ParseAsync();
//await media.ParseAsync();
Assert.True(media.IsParsed);
Assert.NotZero(media.Duration);
Assert.NotZero(media.Tracks.First().Data.Audio.Channels);
......@@ -89,7 +92,9 @@ namespace Bindings.Tests
public void CreateMediaFromFileStream()
{
// TODO: fix this.
var media = new Media(new Instance(), new FileStream(RealMediaPath, FileMode.OpenOrCreate));
var media = new Media(new Instance(), new FileStream(RealMediaPath, FileMode.Open, FileAccess.Read, FileShare.Read));
media.Parse();
Assert.NotZero(media.Tracks.First().Data.Audio.Channels);
}
[Test]
......
......@@ -23,7 +23,7 @@
<member name="T:VideoLAN.LibVLC.Generated.LibvlcCallbackT">
<summary>This structure is opaque. It represents a libvlc instance</summary>
<summary>
<para>Event manager that belongs to a libvlc object, and from whom events can</para>
<para>LibVLCEvent manager that belongs to a libvlc object, and from whom events can</para>
<para>be received.</para>
</summary>
<summary>Type of a LibVLC event.</summary>
......@@ -186,7 +186,7 @@
</summary>
<param name="ptr">the pointer</param>
</member>
<member name="M:VideoLAN.LibVLC.Generated.libvlc.LibvlcEventAttach(VideoLAN.LibVLC.Generated.EventManager,System.Int32,VideoLAN.LibVLC.Generated.LibvlcCallbackT,System.IntPtr)">
<member name="M:VideoLAN.LibVLC.Generated.libvlc.LibvlcLibVLCEventAttach(VideoLAN.LibVLC.Generated.LibVLCEventManager,System.Int32,VideoLAN.LibVLC.Generated.LibvlcCallbackT,System.IntPtr)">
<summary>Register for an event notification.</summary>
<param name="p_event_manager">
<para>the event manager to which you want to attach to.</para>
......@@ -198,14 +198,14 @@
<param name="user_data">user provided data to carry with the event</param>
<returns>0 on success, ENOMEM on error</returns>
</member>
<member name="M:VideoLAN.LibVLC.Generated.libvlc.LibvlcEventDetach(VideoLAN.LibVLC.Generated.EventManager,System.Int32,VideoLAN.LibVLC.Generated.LibvlcCallbackT,System.IntPtr)">
<member name="M:VideoLAN.LibVLC.Generated.libvlc.LibvlcLibVLCEventDetach(VideoLAN.LibVLC.Generated.LibVLCEventManager,System.Int32,VideoLAN.LibVLC.Generated.LibvlcCallbackT,System.IntPtr)">
<summary>Unregister an event notification.</summary>
<param name="p_event_manager">the event manager</param>
<param name="i_event_type">the desired event to which we want to unregister</param>
<param name="f_callback">the function to call when i_event_type occurs</param>
<param name="p_user_data">user provided data to carry with the event</param>
</member>
<member name="M:VideoLAN.LibVLC.Generated.libvlc.LibvlcEventTypeName(System.Int32)">
<member name="M:VideoLAN.LibVLC.Generated.libvlc.LibvlcLibVLCEventTypeName(System.Int32)">
<summary>Get an event's type name.</summary>
<param name="event_type">the desired event</param>
</member>
......@@ -406,7 +406,7 @@
<para>LibVLC 3.0.0 or later</para>
</remarks>
</member>
<member name="M:VideoLAN.LibVLC.Generated.libvlc_renderer_discoverer.LibvlcRendererDiscovererEventManager(VideoLAN.LibVLC.Generated.RendererDiscoverer)">
<member name="M:VideoLAN.LibVLC.Generated.libvlc_renderer_discoverer.LibvlcRendererDiscovererLibVLCEventManager(VideoLAN.LibVLC.Generated.RendererDiscoverer)">
<summary>Get the event manager of the renderer discoverer</summary>
<returns>a valid event manager (can't fail)</returns>
<remarks>
......@@ -768,7 +768,7 @@
<param name="p_md">media descriptor object</param>
<returns>list of media descriptor subitems or NULL</returns>
</member>
<member name="M:VideoLAN.LibVLC.Generated.libvlc_media.LibvlcMediaEventManager(VideoLAN.LibVLC.Generated.Media)">
<member name="M:VideoLAN.LibVLC.Generated.libvlc_media.LibvlcMediaLibVLCEventManager(VideoLAN.LibVLC.Generated.Media)">
<summary>
<para>Get event manager from media descriptor object.</para>
<para>NOTE: this function doesn't increment reference counting.</para>
......@@ -1267,8 +1267,8 @@
<para>media is associated</para>
</returns>
</member>
<member name="M:VideoLAN.LibVLC.Generated.libvlc_media_player.LibvlcMediaPlayerEventManager(VideoLAN.LibVLC.Generated.MediaPlayer)">
<summary>Get the Event Manager from which the media player send event.</summary>
<member name="M:VideoLAN.LibVLC.Generated.libvlc_media_player.LibvlcMediaPlayerLibVLCEventManager(VideoLAN.LibVLC.Generated.MediaPlayer)">
<summary>Get the LibVLCEvent Manager from which the media player send event.</summary>
<param name="p_mi">the Media Player</param>
<returns>the event manager associated with p_mi</returns>
</member>
......@@ -2551,7 +2551,7 @@
</summary>
<param name="p_ml">a media list instance</param>
</member>
<member name="M:VideoLAN.LibVLC.Generated.libvlc_media_list.LibvlcMediaListEventManager(VideoLAN.LibVLC.Generated.MediaList)">
<member name="M:VideoLAN.LibVLC.Generated.libvlc_media_list.LibvlcMediaListLibVLCEventManager(VideoLAN.LibVLC.Generated.MediaList)">
<summary>
<para>Get libvlc_event_manager from this media list instance.</para>
<para>The p_event_manager is immutable, so you don't have to hold the lock</para>
......@@ -2596,7 +2596,7 @@
</summary>
<param name="p_mlp">media player list object</param>
</member>
<member name="M:VideoLAN.LibVLC.Generated.libvlc_media_list_player.LibvlcMediaListPlayerEventManager(VideoLAN.LibVLC.Generated.LibvlcMediaListPlayerT)">
<member name="M:VideoLAN.LibVLC.Generated.libvlc_media_list_player.LibvlcMediaListPlayerLibVLCEventManager(VideoLAN.LibVLC.Generated.LibvlcMediaListPlayerT)">
<summary>Return the event manager of this media_list_player.</summary>
<param name="p_mlp">media list player instance</param>
<returns>the event manager</returns>
......@@ -2812,100 +2812,100 @@
<para>libvlc_media_discoverer_list_get()</para>
</remarks>
</member>
<member name="T:VideoLAN.LibVLC.Generated.EventType">
<summary>Event types</summary>
<member name="T:VideoLAN.LibVLC.Generated.LibVLCEventType">
<summary>LibVLCEvent types</summary>
</member>
<member name="F:VideoLAN.LibVLC.Generated.EventType.MediaDiscovererStarted">
<member name="F:VideoLAN.LibVLC.Generated.LibVLCEventType.MediaDiscovererStarted">
<remarks>
<para>Useless event, it will be triggered only when calling</para>
<para>libvlc_media_discoverer_start()</para>
</remarks>
</member>
<member name="F:VideoLAN.LibVLC.Generated.EventType.MediaDiscovererEnded">
<member name="F:VideoLAN.LibVLC.Generated.LibVLCEventType.MediaDiscovererEnded">
<remarks>
<para>Useless event, it will be triggered only when calling</para>
<para>libvlc_media_discoverer_stop()</para>
</remarks>
</member>
<member name="F:VideoLAN.LibVLC.Generated.EventType.RendererDiscovererItemAdded">
<member name="F:VideoLAN.LibVLC.Generated.LibVLCEventType.RendererDiscovererItemAdded">
<remarks>
<para>Useless event, it will be triggered only when calling</para>
<para>libvlc_media_discoverer_stop()</para>
</remarks>
</member>
<member name="F:VideoLAN.LibVLC.Generated.EventType.RendererDiscovererItemDeleted">
<member name="F:VideoLAN.LibVLC.Generated.LibVLCEventType.RendererDiscovererItemDeleted">
<remarks>
<para>Useless event, it will be triggered only when calling</para>
<para>libvlc_media_discoverer_stop()</para>
</remarks>
</member>
<member name="F:VideoLAN.LibVLC.Generated.EventType.VlmMediaAdded">
<member name="F:VideoLAN.LibVLC.Generated.LibVLCEventType.VlmMediaAdded">
<remarks>
<para>Useless event, it will be triggered only when calling</para>
<para>libvlc_media_discoverer_stop()</para>
</remarks>
</member>
<member name="F:VideoLAN.LibVLC.Generated.EventType.VlmMediaRemoved">
<member name="F:VideoLAN.LibVLC.Generated.LibVLCEventType.VlmMediaRemoved">
<remarks>
<para>Useless event, it will be triggered only when calling</para>
<para>libvlc_media_discoverer_stop()</para>
</remarks>
</member>
<member name="F:VideoLAN.LibVLC.Generated.EventType.VlmMediaChanged">
<member name="F:VideoLAN.LibVLC.Generated.LibVLCEventType.VlmMediaChanged">
<remarks>
<para>Useless event, it will be triggered only when calling</para>
<para>libvlc_media_discoverer_stop()</para>
</remarks>
</member>
<member name="F:VideoLAN.LibVLC.Generated.EventType.VlmMediaInstanceStarted">
<member name="F:VideoLAN.LibVLC.Generated.LibVLCEventType.VlmMediaInstanceStarted">
<remarks>
<para>Useless event, it will be triggered only when calling</para>
<para>libvlc_media_discoverer_stop()</para>
</remarks>
</member>
<member name="F:VideoLAN.LibVLC.Generated.EventType.VlmMediaInstanceStopped">
<member name="F:VideoLAN.LibVLC.Generated.LibVLCEventType.VlmMediaInstanceStopped">
<remarks>
<para>Useless event, it will be triggered only when calling</para>
<para>libvlc_media_discoverer_stop()</para>
</remarks>
</member>
<member name="F:VideoLAN.LibVLC.Generated.EventType.VlmMediaInstanceStatusInit">
<member name="F:VideoLAN.LibVLC.Generated.LibVLCEventType.VlmMediaInstanceStatusInit">
<remarks>
<para>Useless event, it will be triggered only when calling</para>
<para>libvlc_media_discoverer_stop()</para>
</remarks>
</member>
<member name="F:VideoLAN.LibVLC.Generated.EventType.VlmMediaInstanceStatusOpening">
<member name="F:VideoLAN.LibVLC.Generated.LibVLCEventType.VlmMediaInstanceStatusOpening">
<remarks>
<para>Useless event, it will be triggered only when calling</para>
<para>libvlc_media_discoverer_stop()</para>
</remarks>
</member>
<member name="F:VideoLAN.LibVLC.Generated.EventType.VlmMediaInstanceStatusPlaying">
<member name="F:VideoLAN.LibVLC.Generated.LibVLCEventType.VlmMediaInstanceStatusPlaying">
<remarks>
<para>Useless event, it will be triggered only when calling</para>
<para>libvlc_media_discoverer_stop()</para>
</remarks>
</member>
<member name="F:VideoLAN.LibVLC.Generated.EventType.VlmMediaInstanceStatusPause">
<member name="F:VideoLAN.LibVLC.Generated.LibVLCEventType.VlmMediaInstanceStatusPause">
<remarks>
<para>Useless event, it will be triggered only when calling</para>
<para>libvlc_media_discoverer_stop()</para>
</remarks>
</member>
<member name="F:VideoLAN.LibVLC.Generated.EventType.VlmMediaInstanceStatusEnd">
<member name="F:VideoLAN.LibVLC.Generated.LibVLCEventType.VlmMediaInstanceStatusEnd">
<remarks>
<para>Useless event, it will be triggered only when calling</para>
<para>libvlc_media_discoverer_stop()</para>
</remarks>
</member>
<member name="F:VideoLAN.LibVLC.Generated.EventType.VlmMediaInstanceStatusError">
<member name="F:VideoLAN.LibVLC.Generated.LibVLCEventType.VlmMediaInstanceStatusError">
<remarks>
<para>Useless event, it will be triggered only when calling</para>
<para>libvlc_media_discoverer_stop()</para>
</remarks>
</member>
<member name="T:VideoLAN.LibVLC.Generated.Event">
<member name="T:VideoLAN.LibVLC.Generated.LibVLCEvent">
<summary>Renderer item</summary>
<remarks>
<para>This struct is passed by a</para>
......@@ -3140,7 +3140,7 @@
<param name="i_instance">instance id</param>
<returns>playback rate or -1 on error</returns>
</member>
<member name="M:VideoLAN.LibVLC.Generated.libvlc_vlm.LibvlcVlmGetEventManager(VideoLAN.LibVLC.Generated.Instance)">
<member name="M:VideoLAN.LibVLC.Generated.libvlc_vlm.LibvlcVlmGetLibVLCEventManager(VideoLAN.LibVLC.Generated.Instance)">
<summary>
<para>Get libvlc_event_manager from a vlm media.</para>
<para>The p_event_manager is immutable, so you don't have to hold the lock</para>
......@@ -3305,7 +3305,7 @@
<para>longname of the service discovery.</para>
</remarks>
</member>
<member name="M:VideoLAN.LibVLC.Generated.deprecated.LibvlcMediaDiscovererEventManager(VideoLAN.LibVLC.Generated.MediaDiscoverer)">
<member name="M:VideoLAN.LibVLC.Generated.deprecated.LibvlcMediaDiscovererLibVLCEventManager(VideoLAN.LibVLC.Generated.MediaDiscoverer)">
<summary>Get event manager from media service discover object.</summary>
<param name="p_mdis">media service discover object</param>
<returns>event manager object.</returns>
......
......@@ -26,7 +26,7 @@ namespace VideoLAN.LibVLC.Generated
/// <summary>This structure is opaque. It represents a libvlc instance</summary>
/// <summary>
/// <para>Event manager that belongs to a libvlc object, and from whom events can</para>
/// <para>LibVLCEvent manager that belongs to a libvlc object, and from whom events can</para>
/// <para>be received.</para>
/// </summary>
/// <summary>Type of a LibVLC event.</summary>
......
......@@ -10,7 +10,7 @@ using System.Security;
namespace VideoLAN.LibVLC.Generated
{
/// <summary>Event types</summary>
/// <summary>LibVLCEvent types</summary>
public enum EventType
{
MediaMetaChanged = 0,
......
......@@ -2026,7 +2026,7 @@ namespace VideoLAN.LibVLC.Generated
return __result0;
}
/// <summary>Get the Event Manager from which the media player send event.</summary>
/// <summary>Get the LibVLCEvent Manager from which the media player send event.</summary>
/// <param name="p_mi">the Media Player</param>
/// <returns>the event manager associated with p_mi</returns>
public static global::VideoLAN.LibVLC.Generated.EventManager LibvlcMediaPlayerEventManager(global::VideoLAN.LibVLC.Generated.MediaPlayer p_mi)
......
......@@ -643,19 +643,19 @@ namespace VideoLAN.LibVLC
/// <para>Useless, media_discoverer events are only triggered when calling</para>
/// <para>libvlc_media_discoverer_start() and libvlc_media_discoverer_stop().</para>
/// </remarks>
public static global::VideoLAN.LibVLC.EventManager LibvlcMediaDiscovererEventManager(
global::VideoLAN.LibVLC.MediaDiscoverer p_mdis)
{
var __arg0 = ReferenceEquals(p_mdis, null) ? global::System.IntPtr.Zero : p_mdis.__Instance;
var __ret = __Internal.LibvlcMediaDiscovererEventManager(__arg0);
global::VideoLAN.LibVLC.EventManager __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::VideoLAN.LibVLC.EventManager.NativeToManagedMap.ContainsKey(__ret))
__result0 =
(global::VideoLAN.LibVLC.EventManager) global::VideoLAN.LibVLC.EventManager.NativeToManagedMap[__ret];
else __result0 = global::VideoLAN.LibVLC.EventManager.__CreateInstance(__ret);
return __result0;
}
//public static global::VideoLAN.LibVLC.EventManager LibvlcMediaDiscovererEventManager(
// global::VideoLAN.LibVLC.MediaDiscoverer p_mdis)
//{
// var __arg0 = ReferenceEquals(p_mdis, null) ? global::System.IntPtr.Zero : p_mdis.__Instance;
// var __ret = __Internal.LibvlcMediaDiscovererEventManager(__arg0);
// global::VideoLAN.LibVLC.EventManager __result0;
// if (__ret == IntPtr.Zero) __result0 = null;
// else if (global::VideoLAN.LibVLC.EventManager.NativeToManagedMap.ContainsKey(__ret))
// __result0 =
// (global::VideoLAN.LibVLC.EventManager) global::VideoLAN.LibVLC.EventManager.NativeToManagedMap[__ret];
// else __result0 = global::VideoLAN.LibVLC.EventManager.__CreateInstance(__ret);
// return __result0;
//}
/// <summary>
/// <para>Waits until an interface causes the instance to exit.</para>
......
......@@ -35,59 +35,6 @@ namespace VideoLAN.LibVLC
[SuppressUnmanagedCodeSecurity, UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void LibvlcCallbackT(IntPtr libvlcEvent, IntPtr data);
public unsafe partial class EventManager
{
[StructLayout(LayoutKind.Explicit, Size = 0)]
public partial struct __Internal
{
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::VideoLAN.LibVLC.EventManager> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::VideoLAN.LibVLC.EventManager>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::VideoLAN.LibVLC.EventManager __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::VideoLAN.LibVLC.EventManager(native.ToPointer(), skipVTables);
}
internal static global::VideoLAN.LibVLC.EventManager __CreateInstance(global::VideoLAN.LibVLC.EventManager.__Internal native, bool skipVTables = false)
{
return new global::VideoLAN.LibVLC.EventManager(native, skipVTables);
}
private static void* __CopyValue(global::VideoLAN.LibVLC.EventManager.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::VideoLAN.LibVLC.EventManager.__Internal));
*(global::VideoLAN.LibVLC.EventManager.__Internal*) ret = native;
return ret.ToPointer();
}
private EventManager(global::VideoLAN.LibVLC.EventManager.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected EventManager(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public EventManager(IntPtr ptr)
{
if (ptr == IntPtr.Zero) return;
__Instance = ptr;
}
}
public unsafe partial class Log
{
[StructLayout(LayoutKind.Explicit, Size = 0)]
......@@ -313,17 +260,7 @@ namespace VideoLAN.LibVLC
EntryPoint="libvlc_free")]
internal static extern void LibvlcFree(global::System.IntPtr ptr);
[SuppressUnmanagedCodeSecurity]
[DllImport("libvlc", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="libvlc_event_attach")]
internal static extern int LibvlcEventAttach(global::System.IntPtr p_event_manager, int i_event_type, global::System.IntPtr f_callback, global::System.IntPtr user_data);
[SuppressUnmanagedCodeSecurity]
[DllImport("libvlc", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="libvlc_event_detach")]
internal static extern void LibvlcEventDetach(global::System.IntPtr p_event_manager, int i_event_type, global::System.IntPtr f_callback, global::System.IntPtr p_user_data);
[SuppressUnmanagedCodeSecurity]
[SuppressUnmanagedCodeSecurity]
[DllImport("libvlc", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="libvlc_event_type_name")]
internal static extern global::System.IntPtr LibvlcEventTypeName(int event_type);
......@@ -446,25 +383,25 @@ namespace VideoLAN.LibVLC
/// <param name="f_callback">the function to call when i_event_type occurs</param>
/// <param name="user_data">user provided data to carry with the event</param>
/// <returns>0 on success, ENOMEM on error</returns>
public static int LibvlcEventAttach(global::VideoLAN.LibVLC.EventManager p_event_manager, int i_event_type, global::VideoLAN.LibVLC.LibvlcCallbackT f_callback, global::System.IntPtr user_data)
{
var __arg0 = ReferenceEquals(p_event_manager, null) ? global::System.IntPtr.Zero : p_event_manager.__Instance;
var __arg2 = f_callback == null ? global::System.IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(f_callback);
var __ret = __Internal.LibvlcEventAttach(__arg0, i_event_type, __arg2, user_data);
return __ret;
}
//public static int LibvlcEventAttach(global::VideoLAN.LibVLC.EventManager p_event_manager, int i_event_type, global::VideoLAN.LibVLC.LibvlcCallbackT f_callback, global::System.IntPtr user_data)
//{
// var __arg0 = ReferenceEquals(p_event_manager, null) ? global::System.IntPtr.Zero : p_event_manager.__Instance;
// var __arg2 = f_callback == null ? global::System.IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(f_callback);
// var __ret = __Internal.LibvlcEventAttach(__arg0, i_event_type, __arg2, user_data);
// return __ret;
//}
/// <summary>Unregister an event notification.</summary>
/// <param name="p_event_manager">the event manager</param>
/// <param name="i_event_type">the desired event to which we want to unregister</param>
/// <param name="f_callback">the function to call when i_event_type occurs</param>
/// <param name="p_user_data">user provided data to carry with the event</param>
public static void LibvlcEventDetach(global::VideoLAN.LibVLC.EventManager p_event_manager, int i_event_type, global::VideoLAN.LibVLC.LibvlcCallbackT f_callback, global::System.IntPtr p_user_data)
{
var __arg0 = ReferenceEquals(p_event_manager, null) ? global::System.IntPtr.Zero : p_event_manager.__Instance;
var __arg2 = f_callback == null ? global::System.IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(f_callback);
__Internal.LibvlcEventDetach(__arg0, i_event_type, __arg2, p_user_data);
}
//public static void LibvlcEventDetach(global::VideoLAN.LibVLC.EventManager p_event_manager, int i_event_type, global::VideoLAN.LibVLC.LibvlcCallbackT f_callback, global::System.IntPtr p_user_data)
//{
// var __arg0 = ReferenceEquals(p_event_manager, null) ? global::System.IntPtr.Zero : p_event_manager.__Instance;
// var __arg2 = f_callback == null ? global::System.IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(f_callback);
// __Internal.LibvlcEventDetach(__arg0, i_event_type, __arg2, p_user_data);
//}
/// <summary>Get an event's type name.</summary>
/// <param name="event_type">the desired event</param>
......
// ----------------------------------------------------------------------------
// <auto-generated>
// This is autogenerated code by CppSharp.
// Do not edit this file or all your changes will be lost after re-generation.
// </auto-generated>
// ----------------------------------------------------------------------------
using System;
using System.Runtime.InteropServices;
using System.Security;
namespace VideoLAN.LibVLC
{
/// <summary>Event types</summary>
public enum EventType
{
MediaMetaChanged = 0,
MediaSubItemAdded = 1,
MediaDurationChanged = 2,
MediaParsedChanged = 3,
MediaFreed = 4,
MediaStateChanged = 5,
MediaSubItemTreeAdded = 6,
MediaPlayerMediaChanged = 256,
MediaPlayerNothingSpecial = 257,
MediaPlayerOpening = 258,
MediaPlayerBuffering = 259,
MediaPlayerPlaying = 260,
MediaPlayerPaused = 261,
MediaPlayerStopped = 262,
MediaPlayerForward = 263,
MediaPlayerBackward = 264,
MediaPlayerEndReached = 265,
MediaPlayerEncounteredError = 266,
MediaPlayerTimeChanged = 267,
MediaPlayerPositionChanged = 268,
MediaPlayerSeekableChanged = 269,
MediaPlayerPausableChanged = 270,
MediaPlayerTitleChanged = 271,
MediaPlayerSnapshotTaken = 272,
MediaPlayerLengthChanged = 273,
MediaPlayerVout = 274,
MediaPlayerScrambledChanged = 275,
MediaPlayerESAdded = 276,
MediaPlayerESDeleted = 277,
MediaPlayerESSelected = 278,
MediaPlayerCorked = 279,
MediaPlayerUncorked = 280,
MediaPlayerMuted = 281,
MediaPlayerUnmuted = 282,
MediaPlayerAudioVolume = 283,
MediaPlayerAudioDevice = 284,
MediaPlayerChapterChanged = 285,
MediaListItemAdded = 512,
MediaListWillAddItem = 513,
MediaListItemDeleted = 514,
MediaListWillDeleteItem = 515,
MediaListEndReached = 516,
MediaListViewItemAdded = 768,
MediaListViewWillAddItem = 769,
MediaListViewItemDeleted = 770,
MediaListViewWillDeleteItem = 771,
MediaListPlayerPlayed = 1024,
MediaListPlayerNextItemSet = 1025,
MediaListPlayerStopped = 1026,
/// <remarks>
/// <para>Useless event, it will be triggered only when calling</para>
/// <para>libvlc_media_discoverer_start()</para>
/// </remarks>
MediaDiscovererStarted = 1280,
/// <remarks>
/// <para>Useless event, it will be triggered only when calling</para>
/// <para>libvlc_media_discoverer_stop()</para>
/// </remarks>
MediaDiscovererEnded = 1281,
/// <remarks>
/// <para>Useless event, it will be triggered only when calling</para>
/// <para>libvlc_media_discoverer_stop()</para>
/// </remarks>
RendererDiscovererItemAdded = 1282,
/// <remarks>
/// <para>Useless event, it will be triggered only when calling</para>
/// <para>libvlc_media_discoverer_stop()</para>
/// </remarks>
RendererDiscovererItemDeleted = 1283,
/// <remarks>
/// <para>Useless event, it will be triggered only when calling</para>
/// <para>libvlc_media_discoverer_stop()</para>
/// </remarks>
VlmMediaAdded = 1536,
/// <remarks>
/// <para>Useless event, it will be triggered only when calling</para>
/// <para>libvlc_media_discoverer_stop()</para>
/// </remarks>
VlmMediaRemoved = 1537,
/// <remarks>
/// <para>Useless event, it will be triggered only when calling</para>
/// <para>libvlc_media_discoverer_stop()</para>
/// </remarks>
VlmMediaChanged = 1538,
/// <remarks>
/// <para>Useless event, it will be triggered only when calling</para>
/// <para>libvlc_media_discoverer_stop()</para>
/// </remarks>
VlmMediaInstanceStarted = 1539,
/// <remarks>
/// <para>Useless event, it will be triggered only when calling</para>
/// <para>libvlc_media_discoverer_stop()</para>
/// </remarks>
VlmMediaInstanceStopped = 1540,
/// <remarks>
/// <para>Useless event, it will be triggered only when calling</para>
/// <para>libvlc_media_discoverer_stop()</para>
/// </remarks>
VlmMediaInstanceStatusInit = 1541,
/// <remarks>
/// <para>Useless event, it will be triggered only when calling</para>
/// <para>libvlc_media_discoverer_stop()</para>
/// </remarks>
VlmMediaInstanceStatusOpening = 1542,
/// <remarks>
/// <para>Useless event, it will be triggered only when calling</para>
/// <para>libvlc_media_discoverer_stop()</para>
/// </remarks>
VlmMediaInstanceStatusPlaying = 1543,
/// <remarks>
/// <para>Useless event, it will be triggered only when calling</para>
/// <para>libvlc_media_discoverer_stop()</para>
/// </remarks>
VlmMediaInstanceStatusPause = 1544,
/// <remarks>
/// <para>Useless event, it will be triggered only when calling</para>
/// <para>libvlc_media_discoverer_stop()</para>
/// </remarks>
VlmMediaInstanceStatusEnd = 1545,
/// <remarks>
/// <para>Useless event, it will be triggered only when calling</para>
/// <para>libvlc_media_discoverer_stop()</para>
/// </remarks>
VlmMediaInstanceStatusError = 1546
}
/// <summary>Renderer item</summary>
/// <remarks>
/// <para>This struct is passed by a</para>
/// <para>or deleted.</para>
/// <para>An item is valid until the</para>
/// <para>is called with the same pointer.</para>
/// <para>libvlc_renderer_discoverer_event_manager()</para>
/// </remarks>
/// <summary>A LibVLC event</summary>
public unsafe partial struct Event
{
[StructLayout(LayoutKind.Explicit, Size = 32)]
public partial struct __Internal
{
[FieldOffset(0)]
internal int type;
[FieldOffset(8)]
internal global::System.IntPtr p_obj;
[FieldOffset(16)]
internal global::VideoLAN.LibVLC.Event._.__Internal u;
[SuppressUnmanagedCodeSecurity]
[DllImport("libvlc", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0libvlc_event_t@@QEAA@AEBU0@@Z")]
internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
}
public unsafe partial struct _
{
[StructLayout(LayoutKind.Explicit, Size = 16)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.MetaType.__Internal media_meta_changed;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.NewChild.__Internal media_subitem_added;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.NewDuration.__Internal media_duration_changed;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.NewStatus.__Internal media_parsed_changed;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.Md.__Internal media_freed;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.NewState.__Internal media_state_changed;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.Item.__Internal media_subitemtree_added;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.NewCache.__Internal media_player_buffering;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.NewChapter.__Internal media_player_chapter_changed;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.NewPosition.__Internal media_player_position_changed;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.NewTime.__Internal media_player_time_changed;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.NewTitle.__Internal media_player_title_changed;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.NewSeekable.__Internal media_player_seekable_changed;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.NewPausable.__Internal media_player_pausable_changed;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.NewScrambled.__Internal media_player_scrambled_changed;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.NewCount.__Internal media_player_vout;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.__.__Internal media_list_item_added;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.___.__Internal media_list_will_add_item;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.____.__Internal media_list_item_deleted;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._._____.__Internal media_list_will_delete_item;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.item__.__Internal media_list_player_next_item_set;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.PszFilename.__Internal media_player_snapshot_taken;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.NewLength.__Internal media_player_length_changed;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.______.__Internal vlm_media_event;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.NewMedia.__Internal media_player_media_changed;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._._______.__Internal media_player_es_changed;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.Volume.__Internal media_player_audio_volume;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.Device.__Internal media_player_audio_device;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.item___.__Internal renderer_discoverer_item_added;
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Event._.item.__Internal renderer_discoverer_item_deleted;
}
public unsafe partial class MetaType
{
[StructLayout(LayoutKind.Explicit, Size = 4)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::VideoLAN.LibVLC.Media.MetadataType meta_type;
}
}
public unsafe partial class NewChild
{
[StructLayout(LayoutKind.Explicit, Size = 8)]