Commit 2581072f authored by Martin Finkel's avatar Martin Finkel

add missing structlayout info

Signed-off-by: Martin Finkel's avatarMartin Finkel <martin@videolabs.io>
parent bbd34269
using System;
using System.Runtime.InteropServices;
namespace LibVLCSharp.Shared
{
......@@ -164,77 +165,112 @@ namespace LibVLCSharp.Shared
public EventUnion Union;
[StructLayout(LayoutKind.Explicit)]
public struct EventUnion
{
// media
[FieldOffset(0)]
public MediaMetaChanged MediaMetaChanged;
[FieldOffset(0)]
public MediaSubItemAdded MediaSubItemAdded;
[FieldOffset(0)]
public MediaDurationChanged MediaDurationChanged;
[FieldOffset(0)]
public MediaParsedChanged MediaParsedChanged;
[FieldOffset(0)]
public MediaFreed MediaFreed;
[FieldOffset(0)]
public MediaStateChanged MediaStateChanged;
[FieldOffset(0)]
public MediaSubItemTreeAdded MediaSubItemTreeAdded;
// mediaplayer
[FieldOffset(0)]
public MediaPlayerBuffering MediaPlayerBuffering;
[FieldOffset(0)]
public MediaPlayerChapterChanged MediaPlayerChapterChanged;
[FieldOffset(0)]
public MediaPlayerPositionChanged MediaPlayerPositionChanged;
[FieldOffset(0)]
public MediaPlayerTimeChanged MediaPlayerTimeChanged;
[FieldOffset(0)]
public MediaPlayerTitleChanged MediaPlayerTitleChanged;
[FieldOffset(0)]
public MediaPlayerSeekableChanged MediaPlayerSeekableChanged;
[FieldOffset(0)]
public MediaPlayerPausableChanged MediaPlayerPausableChanged;
[FieldOffset(0)]
public MediaPlayerScrambledChanged MediaPlayerScrambledChanged;
[FieldOffset(0)]
public MediaPlayerVoutChanged MediaPlayerVoutChanged;
[FieldOffset(0)]
public MediaPlayerSnapshotTaken MediaPlayerSnapshotTaken;
[FieldOffset(0)]
public MediaPlayerLengthChanged MediaPlayerLengthChanged;
[FieldOffset(0)]
public MediaPlayerMediaChanged MediaPlayerMediaChanged;
[FieldOffset(0)]
public EsChanged EsChanged;
[FieldOffset(0)]
public VolumeChanged MediaPlayerVolumeChanged;
[FieldOffset(0)]
public AudioDeviceChanged AudioDeviceChanged;
// medialist
[FieldOffset(0)]
public MediaListItemAdded MediaListItemAdded;
[FieldOffset(0)]
public MediaListWillAddItem MediaListWillAddItem;
[FieldOffset(0)]
public MediaListItemDeleted MediaListItemDeleted;
[FieldOffset(0)]
public MediaListWillDeleteItem MediaListWillDeleteItem;
[FieldOffset(0)]
public MediaListPlayerNextItemSet MediaListPlayerNextItemSet;
// vlm
[FieldOffset(0)]
public VlmMediaEvent VlmMediaEvent;
}
#region Media
[StructLayout(LayoutKind.Sequential)]
public struct MediaMetaChanged
{
public Media.MetadataType MetaType;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaSubItemAdded
{
public IntPtr NewChild;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaDurationChanged
{
public long NewDuration;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaParsedChanged
{
public Media.MediaParsedStatus NewStatus;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaFreed
{
public IntPtr MediaInstance;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaStateChanged
{
public VLCState NewState;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaSubItemTreeAdded
{
public IntPtr MediaInstance;
......@@ -244,77 +280,92 @@ namespace LibVLCSharp.Shared
#region MediaPlayer
[StructLayout(LayoutKind.Sequential)]
public struct MediaPlayerBuffering
{
public float NewCache;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaPlayerChapterChanged
{
public int NewChapter;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaPlayerPositionChanged
{
public float NewPosition;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaPlayerTimeChanged
{
public long NewTime;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaPlayerTitleChanged
{
public int NewTitle;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaPlayerSeekableChanged
{
public int NewSeekable;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaPlayerPausableChanged
{
public int NewPausable;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaPlayerScrambledChanged
{
public int NewScrambled;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaPlayerVoutChanged
{
public int NewCount;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaPlayerSnapshotTaken
{
public IntPtr Filename;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaPlayerLengthChanged
{
public long NewLength;
}
[StructLayout(LayoutKind.Sequential)]
public struct EsChanged
{
public TrackType Type;
public int Id;
}
[StructLayout(LayoutKind.Sequential)]
public struct AudioDeviceChanged
{
public IntPtr Device;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaPlayerMediaChanged
{
public IntPtr NewMedia;
}
[StructLayout(LayoutKind.Sequential)]
public struct VolumeChanged
{
public float Volume;
......@@ -324,30 +375,35 @@ namespace LibVLCSharp.Shared
#region MediaList
[StructLayout(LayoutKind.Sequential)]
public struct MediaListItemAdded
{
public IntPtr MediaInstance;
public int Index;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaListWillAddItem
{
public IntPtr MediaInstance;
public int Index;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaListItemDeleted
{
public IntPtr MediaInstance;
public int Index;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaListWillDeleteItem
{
public IntPtr MediaInstance;
public int Index;
}
[StructLayout(LayoutKind.Sequential)]
public struct MediaListPlayerNextItemSet
{
public IntPtr MediaInstance;
......@@ -355,6 +411,7 @@ namespace LibVLCSharp.Shared
#endregion MediaList
[StructLayout(LayoutKind.Sequential)]
public struct VlmMediaEvent
{
public IntPtr MediaName;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment