...
 
Commits (1)
......@@ -2,6 +2,9 @@
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<DefineConstants>$(DefineConstants);PORTABLE;DESKTOP</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.1'">
<DefineConstants>$(DefineConstants);NETSTANDARD1_1</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
<DefineConstants>$(DefineConstants);XAML;DESKTOP</DefineConstants>
</PropertyGroup>
......
......@@ -4,7 +4,7 @@
<Summary>.NET bindings for LibVLC</Summary>
<Description>.NET bindings for LibVLC</Description>
<PackageTags>libvlc native xamarin .net video audio media mediaplayer</PackageTags>
<TargetFrameworks>netstandard2.0;MonoAndroid81;Xamarin.iOS10;Xamarin.Mac20</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard1.1;MonoAndroid81;Xamarin.iOS10;Xamarin.Mac20</TargetFrameworks>
<RootNamespace>LibVLCSharp</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
......
......@@ -17,7 +17,6 @@ namespace LibVLCSharp.Shared
/// <summary>Retrieve libvlc version.</summary>
/// <returns>a string containing the libvlc version</returns>
/// <remarks>Example: &quot;1.1.0-git The Luggage&quot;</remarks>
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_get_version")]
internal static extern IntPtr LibVLCVersion();
......
......@@ -13,17 +13,14 @@ namespace LibVLCSharp.Shared
struct Native
{
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_dialog_post_login")]
internal static extern int LibVLCDialogPostLogin(IntPtr dialogId, string username, string password, bool store);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_dialog_post_action")]
internal static extern int LibVLCDialogPostAction(IntPtr dialogId, int actionIndex);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_dialog_dismiss")]
internal static extern int LibVLCDialogDismiss(IntPtr dialogId);
......@@ -132,25 +129,25 @@ namespace LibVLCSharp.Shared
public delegate Task UpdateProgress(Dialog dialog, float position, string text);
[SuppressUnmanagedCodeSecurity, UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void DisplayErrorCallback(IntPtr data, string title, string text);
[SuppressUnmanagedCodeSecurity, UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void DisplayLoginCallback(IntPtr data, IntPtr dialogId, string title, string text,
string defaultUsername, bool askStore);
[SuppressUnmanagedCodeSecurity, UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void DisplayQuestionCallback(IntPtr data, IntPtr dialogId, string title, string text,
DialogQuestionType type, string cancelText, string firstActionText, string secondActionText);
[SuppressUnmanagedCodeSecurity, UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void DisplayProgressCallback(IntPtr data, IntPtr dialogId, string title, string text,
bool indeterminate, float position, string cancelText);
[SuppressUnmanagedCodeSecurity, UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void CancelCallback(IntPtr data, IntPtr dialogId);
[SuppressUnmanagedCodeSecurity, UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void UpdateProgressCallback(IntPtr data, IntPtr dialogId, float position, string text);
/// <summary>Dialog callbacks to be implemented</summary>
......
......@@ -8,57 +8,46 @@ namespace LibVLCSharp.Shared
{
struct Native
{
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_equalizer_new")]
internal static extern IntPtr LibVLCAudioEqualizerNew();
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_equalizer_release")]
internal static extern void LibVLCAudioEqualizerRelease(IntPtr equalizer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_equalizer_new_from_preset")]
internal static extern IntPtr LibVLCAudioEqualizerNewFromPreset(uint index);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_equalizer_set_preamp")]
internal static extern int LibVLCAudioEqualizerSetPreamp(IntPtr equalizer, float preamp);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_equalizer_get_preamp")]
internal static extern float LibVLCAudioEqualizerGetPreamp(IntPtr equalizer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_equalizer_set_amp_at_index")]
internal static extern int LibVLCAudioEqualizerSetAmpAtIndex(IntPtr equalizer, float amp, uint band);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_equalizer_get_amp_at_index")]
internal static extern float LibVLCAudioEqualizerGetAmpAtIndex(IntPtr equalizer, uint band);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_equalizer_get_preset_count")]
internal static extern uint LibVLCAudioEqualizerGetPresetCount();
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_equalizer_get_preset_name")]
internal static extern IntPtr LibVLCAudioEqualizerGetPresetName(uint index);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_equalizer_get_band_count")]
internal static extern uint LibVLCAudioEqualizerGetBandCount();
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_equalizer_get_band_frequency")]
internal static extern float LibVLCAudioEqualizerGetBandFrequency(uint index);
......
......@@ -9,12 +9,10 @@ namespace LibVLCSharp.Shared
{
public struct Internal
{
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl, EntryPoint = "libvlc_event_attach")]
internal static extern int LibVLCEventAttach(IntPtr eventManager, EventType eventType, EventCallback eventCallback,
IntPtr userData);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl, EntryPoint = "libvlc_event_detach")]
internal static extern void LibVLCEventDetach(IntPtr eventManager, EventType eventType, EventCallback eventCallback,
IntPtr userData);
......@@ -50,7 +48,7 @@ namespace LibVLCSharp.Shared
protected LibVLCEvent RetrieveEvent(IntPtr eventPtr)
{
return Marshal.PtrToStructure<LibVLCEvent>(eventPtr);
return MarshalUtils.PtrToStructure<LibVLCEvent>(eventPtr);
}
}
......@@ -1750,6 +1748,6 @@ namespace LibVLCSharp.Shared
}
}
[SuppressUnmanagedCodeSecurity, UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void EventCallback(IntPtr args);
}
......@@ -45,120 +45,97 @@ namespace LibVLCSharp.Shared
[StructLayout(LayoutKind.Explicit, Size = 0)]
internal struct Native
{
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_new")]
internal static extern IntPtr LibVLCNew(int argc, IntPtr[] argv);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_release")]
internal static extern void LibVLCRelease(IntPtr libVLC);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_add_intf")]
internal static extern int LibVLCAddInterface(IntPtr libVLC, [MarshalAs(UnmanagedType.LPStr)] string name);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_set_exit_handler")]
internal static extern void LibVLCSetExitHandler(IntPtr libVLC, IntPtr cb, IntPtr opaque);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_set_user_agent")]
internal static extern void LibVLCSetUserAgent(IntPtr libVLC, [MarshalAs(UnmanagedType.LPStr)] string name,
[MarshalAs(UnmanagedType.LPStr)] string http);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_set_app_id")]
internal static extern void LibVLCSetAppId(IntPtr libVLC, [MarshalAs(UnmanagedType.LPStr)] string id,
[MarshalAs(UnmanagedType.LPStr)] string version, [MarshalAs(UnmanagedType.LPStr)] string icon);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_log_unset")]
internal static extern void LibVLCLogUnset(IntPtr libVLC);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_log_set_file")]
internal static extern void LibVLCLogSetFile(IntPtr libVLC, IntPtr stream);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
CharSet = CharSet.Ansi, EntryPoint = "libvlc_log_get_context")]
internal static extern void LibVLCLogGetContext(IntPtr ctx, out IntPtr module, out IntPtr file, out UIntPtr line);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_log_set")]
internal static extern void LibVLCLogSet(IntPtr libVLC, LogCallback cb, IntPtr data);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_module_description_list_release")]
internal static extern void LibVLCModuleDescriptionListRelease(IntPtr moduleDescriptionList);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_filter_list_get")]
internal static extern IntPtr LibVLCAudioFilterListGet(IntPtr libVLC);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_filter_list_get")]
internal static extern IntPtr LibVLCVideoFilterListGet(IntPtr libVLC);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_output_list_get")]
internal static extern IntPtr LibVLCAudioOutputListGet(IntPtr libVLC);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_output_list_release")]
internal static extern void LibVLCAudioOutputListRelease(IntPtr list);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_output_device_list_get")]
internal static extern IntPtr LibVLCAudioOutputDeviceListGet(IntPtr libVLC, [MarshalAs(UnmanagedType.LPStr)] string aout);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_output_device_list_release")]
internal static extern void LibVLCAudioOutputDeviceListRelease(IntPtr list);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_discoverer_list_get")]
internal static extern ulong LibVLCMediaDiscovererListGet(IntPtr libVLC, MediaDiscoverer.Category category, ref IntPtr pppServices);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_discoverer_list_release")]
internal static extern void LibVLCMediaDiscovererListRelease(IntPtr ppServices, ulong count);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_dialog_set_callbacks")]
internal static extern void LibVLCDialogSetCallbacks(IntPtr libVLC, IntPtr callbacks, IntPtr data);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_renderer_discoverer_list_get")]
internal static extern ulong LibVLCRendererDiscovererGetList(IntPtr libVLC, ref IntPtr discovererList);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_renderer_discoverer_list_release")]
internal static extern void LibVLCRendererDiscovererReleaseList(IntPtr discovererList, ulong count);
#if ANDROID
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_set_android_context")]
internal static extern void LibVLCMediaPlayerSetAndroidContext(IntPtr mediaPlayer, IntPtr aWindow);
......@@ -513,7 +490,7 @@ namespace LibVLCSharp.Shared
get
{
return MarshalUtils.Retrieve(() => Native.LibVLCAudioFilterListGet(NativeReference),
Marshal.PtrToStructure<ModuleDescription.Internal>,
MarshalUtils.PtrToStructure<ModuleDescription.Internal>,
intern => ModuleDescription.__CreateInstance(intern),
module => module.Next, Native.LibVLCModuleDescriptionListRelease);
}
......@@ -533,7 +510,7 @@ namespace LibVLCSharp.Shared
get
{
return MarshalUtils.Retrieve(() => Native.LibVLCVideoFilterListGet(NativeReference),
Marshal.PtrToStructure<ModuleDescription.Internal>,
MarshalUtils.PtrToStructure<ModuleDescription.Internal>,
intern => ModuleDescription.__CreateInstance(intern),
module => module.Next, Native.LibVLCModuleDescriptionListRelease);
}
......@@ -551,7 +528,7 @@ namespace LibVLCSharp.Shared
get
{
return MarshalUtils.Retrieve(() => Native.LibVLCAudioOutputListGet(NativeReference),
Marshal.PtrToStructure<AudioOutputDescription.Internal>,
MarshalUtils.PtrToStructure<AudioOutputDescription.Internal>,
intern => AudioOutputDescription.__CreateInstance(intern),
module => module.Next, Native.LibVLCAudioOutputListRelease);
}
......@@ -582,7 +559,7 @@ namespace LibVLCSharp.Shared
{
return MarshalUtils.Retrieve(() => Native.LibVLCAudioOutputDeviceListGet(NativeReference, audioOutputName),
Marshal.PtrToStructure<AudioOutputDevice.Internal>,
MarshalUtils.PtrToStructure<AudioOutputDevice.Internal>,
s => AudioOutputDevice.__CreateInstance(s),
device => device.Next, Native.LibVLCAudioOutputDeviceListRelease);
}
......@@ -596,9 +573,11 @@ namespace LibVLCSharp.Shared
{
var arrayResultPtr = IntPtr.Zero;
var count = Native.LibVLCMediaDiscovererListGet(NativeReference, category, ref arrayResultPtr);
#if NETSTANDARD1_1
if (count == 0) return new MediaDiscoverer.Description[0];
#else
if (count == 0) return Array.Empty<MediaDiscoverer.Description>();
#endif
var mediaDiscovererDescription = new MediaDiscoverer.Description[(int)count];
for (var i = 0; i < (int)count; i++)
......@@ -667,8 +646,8 @@ namespace LibVLCSharp.Shared
updateProgress(dlg, position, text);
}
};
_dialogCbsPtr = Marshal.AllocHGlobal(Marshal.SizeOf<DialogCallbacks>());
_dialogCbsPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(DialogCallbacks)));
Marshal.StructureToPtr(dialogCbs, _dialogCbsPtr, true);
Native.LibVLCDialogSetCallbacks(NativeReference, _dialogCbsPtr, IntPtr.Zero);
}
......@@ -683,7 +662,7 @@ namespace LibVLCSharp.Shared
var discoverList = IntPtr.Zero;
var count = Native.LibVLCRendererDiscovererGetList(NativeReference, ref discoverList);
if (count == 0) return Array.Empty<RendererDescription>();
if (count == 0) return new RendererDescription[0];
var rendererDiscovererDescription = new RendererDescription[(int)count];
......@@ -787,10 +766,10 @@ namespace LibVLCSharp.Shared
#region Callbacks
[SuppressUnmanagedCodeSecurity, UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void ExitCallback();
[SuppressUnmanagedCodeSecurity, UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void LogCallback(IntPtr data, LogLevel logLevel, IntPtr logContext,
[MarshalAs(UnmanagedType.LPStr)] string format, IntPtr args);
......
......@@ -11,8 +11,14 @@ namespace LibVLCSharp.Shared
Func<T, TU> create, Func<TU, TU> next, Action<IntPtr> releaseRef)
{
var nativeRef = getRef();
if (nativeRef == IntPtr.Zero) return Array.Empty<TU>();
if (nativeRef == IntPtr.Zero)
{
#if NETSTANDARD1_1
return new TU[0];
#else
return Array.Empty<TU>();
#endif
}
var structure = retrieve(nativeRef);
var obj = create(structure);
......@@ -28,7 +34,7 @@ namespace LibVLCSharp.Shared
}
/// <summary>
///
/// Turns an array of UTF16 C# strings to an array of pointer to UTF8 strings
/// </summary>
/// <param name="args"></param>
/// <returns>Array of pointer you need to release when you're done with Marshal.FreeHGlobal</returns>
......@@ -47,5 +53,14 @@ namespace LibVLCSharp.Shared
return utf8Args;
}
public static T PtrToStructure<T>(IntPtr ptr)
{
#if NETSTANDARD1_1
return (T)Marshal.PtrToStructure(ptr, typeof(T));
#else
return Marshal.PtrToStructure<T>(ptr);
#endif
}
}
}
\ No newline at end of file
......@@ -15,22 +15,18 @@ namespace LibVLCSharp.Shared
internal struct Native
{
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_new_location")]
internal static extern IntPtr LibVLCMediaNewLocation(IntPtr libVLC, [MarshalAs(UnmanagedType.LPStr)] string mrl);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_new_path")]
internal static extern IntPtr LibVLCMediaNewPath(IntPtr libVLC, [MarshalAs(UnmanagedType.LPStr)] string path);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_new_as_node")]
internal static extern IntPtr LibVLCMediaNewAsNode(IntPtr libVLC, [MarshalAs(UnmanagedType.LPStr)] string name);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_new_fd")]
internal static extern IntPtr LibVLCMediaNewFd(IntPtr libVLC, int fd);
......@@ -43,162 +39,130 @@ namespace LibVLCSharp.Shared
/// <para>should not be used again.</para>
/// </summary>
/// <param name="media">the media descriptor</param>
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_release")]
internal static extern void LibVLCMediaRelease(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_list_media")]
internal static extern IntPtr LibVLCMediaListMedia(IntPtr mediaList);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_new_callbacks")]
internal static extern IntPtr LibVLCMediaNewCallbacks(IntPtr libVLC, IntPtr openCb, IntPtr readCb, IntPtr seekCb, IntPtr closeCb, IntPtr opaque);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_add_option")]
internal static extern void LibVLCMediaAddOption(IntPtr media, [MarshalAs(UnmanagedType.LPStr)] string options);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_add_option_flag")]
internal static extern void LibVLCMediaAddOptionFlag(IntPtr media, [MarshalAs(UnmanagedType.LPStr)] string options, uint flags);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_get_mrl")]
internal static extern IntPtr LibVLCMediaGetMrl(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_duplicate")]
internal static extern IntPtr LibVLCMediaDuplicate(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_get_meta")]
internal static extern IntPtr LibVLCMediaGetMeta(IntPtr media, MetadataType metadataType);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_set_meta")]
internal static extern void LibVLCMediaSetMeta(IntPtr media, MetadataType metadataType, [MarshalAs(UnmanagedType.LPStr)] string value);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_save_meta")]
internal static extern int LibVLCMediaSaveMeta(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_get_state")]
internal static extern VLCState LibVLCMediaGetState(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_event_manager")]
internal static extern IntPtr LibVLCMediaEventManager(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_get_stats")]
internal static extern int LibVLCMediaGetStats(IntPtr media, out MediaStats statistics);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_get_duration")]
internal static extern long LibVLCMediaGetDuration(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_parse")]
internal static extern void LibVLCMediaParse(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_parse_async")]
internal static extern void LibVLCMediaParseAsync(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_is_parsed")]
internal static extern int LibVLCMediaIsParsed(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_parse_with_options")]
internal static extern int LibVLCMediaParseWithOptions(IntPtr media, MediaParseOptions mediaParseOptions, int timeout);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_get_parsed_status")]
internal static extern MediaParsedStatus LibVLCMediaGetParsedStatus(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_parse_stop")]
internal static extern void LibVLCMediaParseStop(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_set_user_data")]
internal static extern void LibVLCMediaSetUserData(IntPtr media, IntPtr userData);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_get_user_data")]
internal static extern IntPtr LibVLCMediaGetUserData(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_tracks_get")]
internal static extern uint LibVLCMediaTracksGet(IntPtr media, ref IntPtr tracksPtr);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_tracks_release")]
internal static extern void LibVLCMediaTracksRelease(IntPtr tracks, uint count);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_subitems")]
internal static extern IntPtr LibVLCMediaSubitems(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_get_type")]
internal static extern MediaType LibVLCMediaGetType(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_slaves_add")]
internal static extern int LibVLCMediaAddSlaves(IntPtr media, MediaSlaveType slaveType, uint priority, [MarshalAs(UnmanagedType.LPStr)] string uri);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_slaves_clear")]
internal static extern void LibVLCMediaClearSlaves(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_slaves_get")]
internal static extern uint LibVLCMediaGetSlaves(IntPtr media, ref IntPtr slaves);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_slaves_release")]
internal static extern void LibVLCMediaReleaseSlaves(IntPtr slaves, uint count);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_retain")]
internal static extern void LibVLCMediaRetain(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_get_codec_description")]
internal static extern string LibvlcMediaGetCodecDescription(TrackType type, uint codec);
......@@ -597,7 +561,7 @@ namespace LibVLCSharp.Shared
for (var i = 0; i < count; i++)
{
var ptr = Marshal.ReadIntPtr(arrayResultPtr, i * IntPtr.Size);
var managedStruct = Marshal.PtrToStructure<MediaTrack>(ptr);
var managedStruct = MarshalUtils.PtrToStructure<MediaTrack>(ptr);
tracks.Add(managedStruct);
}
......@@ -668,7 +632,7 @@ namespace LibVLCSharp.Shared
for (var i = 0; i < count; i++)
{
var ptr = Marshal.ReadIntPtr(slaveArrayPtr, i * IntPtr.Size);
var managedStruct = Marshal.PtrToStructure<MediaSlave>(ptr);
var managedStruct = MarshalUtils.PtrToStructure<MediaSlave>(ptr);
slaves.Add(managedStruct);
}
Native.LibVLCMediaReleaseSlaves(slaveArrayPtr, count);
......@@ -844,7 +808,7 @@ namespace LibVLCSharp.Shared
/// <para>in the</para>
/// <para>For convenience, *datap is initially NULL and *sizep is initially 0.</para>
/// </remarks>
[SuppressUnmanagedCodeSecurity, UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate int OpenMedia(IntPtr opaque, ref IntPtr data, out ulong size);
/// <summary>Callback prototype to read data from a custom bitstream input media.</summary>
......@@ -862,7 +826,7 @@ namespace LibVLCSharp.Shared
/// <para>In particular, the callback should return an error if playback is stopped;</para>
/// <para>if it does not return, then libvlc_media_player_stop() will never return.</para>
/// </remarks>
[SuppressUnmanagedCodeSecurity, UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate int ReadMedia(IntPtr opaque, IntPtr buf, uint len);
/// <summary>Callback prototype to seek a custom bitstream input media.</summary>
......@@ -870,13 +834,13 @@ namespace LibVLCSharp.Shared
/// <param name="offset">absolute byte offset to seek to</param>
/// <returns>0 on success, -1 on error.</returns>
/// <remarks>callback</remarks>
[SuppressUnmanagedCodeSecurity, UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate int SeekMedia(IntPtr opaque, ulong offset);
/// <summary>Callback prototype to close a custom bitstream input media.</summary>
/// <param name="opaque">private pointer as set by the</param>
/// <remarks>callback</remarks>
[SuppressUnmanagedCodeSecurity, UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void CloseMedia(IntPtr opaque);
#endregion
......
......@@ -14,42 +14,42 @@ namespace LibVLCSharp.Shared
struct Native
{
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_discoverer_new")]
internal static extern IntPtr LibVLCMediaDiscovererNew(IntPtr libvlc, [MarshalAs(UnmanagedType.LPStr)] string name);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_discoverer_start")]
internal static extern int LibVLCMediaDiscovererStart(IntPtr mediaDiscoverer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_discoverer_stop")]
internal static extern void LibVLCMediaDiscovererStop(IntPtr mediaDiscoverer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_discoverer_release")]
internal static extern void LibVLCMediaDiscovererRelease(IntPtr mediaDiscoverer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_discoverer_localized_name")]
internal static extern IntPtr LibVLCMediaDiscovererLocalizedName(IntPtr mediaDiscoverer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_discoverer_event_manager")]
internal static extern IntPtr LibVLCMediaDiscovererEventManager(IntPtr mediaDiscoverer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_discoverer_is_running")]
internal static extern int LibVLCMediaDiscovererIsRunning(IntPtr mediaDiscoverer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_discoverer_media_list")]
internal static extern IntPtr LibVLCMediaDiscovererMediaList(IntPtr discovererMediaList);
......
......@@ -12,82 +12,82 @@ namespace LibVLCSharp.Shared
struct Native
{
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_subitems")]
internal static extern IntPtr LibVLCMediaSubitems(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_list_new")]
internal static extern IntPtr LibVLCMediaListNew(IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_list_release")]
internal static extern void LibVLCMediaListRelease(IntPtr mediaList);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_discoverer_media_list")]
internal static extern IntPtr LibVLCMediaDiscovererMediaList(IntPtr discovererMediaList);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_library_media_list")]
internal static extern IntPtr LibVLCMediaLibraryMediaList(IntPtr libraryMediaList);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_list_set_media")]
internal static extern void LibVLCMediaListSetMedia(IntPtr mediaList, IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_list_add_media")]
internal static extern int LibVLCMediaListAddMedia(IntPtr mediaList, IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_list_insert_media")]
internal static extern int LibVLCMediaListInsertMedia(IntPtr mediaList, IntPtr media, int positionIndex);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_list_remove_index")]
internal static extern int LibVLCMediaListRemoveIndex(IntPtr mediaList, int positionIndex);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_list_count")]
internal static extern int LibVLCMediaListCount(IntPtr mediaList);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_list_item_at_index")]
internal static extern IntPtr LibVLCMediaListItemAtIndex(IntPtr mediaList, int positionIndex);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_list_index_of_item")]
internal static extern int LibVLCMediaListIndexOfItem(IntPtr mediaList, IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_list_is_readonly")]
internal static extern int LibVLCMediaListIsReadonly(IntPtr mediaList);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_list_lock")]
internal static extern void LibVLCMediaListLock(IntPtr mediaList);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_list_unlock")]
internal static extern void LibVLCMediaListUnlock(IntPtr mediaList);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_list_event_manager")]
internal static extern IntPtr LibVLCMediaListEventManager(IntPtr mediaList);
......
......@@ -10,621 +10,621 @@ namespace LibVLCSharp.Shared
{
struct Native
{
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_new")]
internal static extern IntPtr LibVLCMediaPlayerNew(IntPtr libvlc);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_release")]
internal static extern void LibVLCMediaPlayerRelease(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_new_from_media")]
internal static extern IntPtr LibVLCMediaPlayerNewFromMedia(IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_set_media")]
internal static extern void LibVLCMediaPlayerSetMedia(IntPtr mediaPlayer, IntPtr media);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_get_media")]
internal static extern IntPtr LibVLCMediaPlayerGetMedia(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_event_manager")]
internal static extern IntPtr LibVLCMediaPlayerEventManager(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_is_playing")]
internal static extern int LibVLCMediaPlayerIsPlaying(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_play")]
internal static extern int LibVLCMediaPlayerPlay(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_set_pause")]
internal static extern void LibVLCMediaPlayerSetPause(IntPtr mediaPlayer, bool pause);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_pause")]
internal static extern void LibVLCMediaPlayerPause(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_stop")]
internal static extern void LibVLCMediaPlayerStop(IntPtr mediaPlayer);
#if COCOA
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_set_nsobject")]
internal static extern void LibVLCMediaPlayerSetNsobject(IntPtr mediaPlayer, IntPtr drawable);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_get_nsobject")]
internal static extern IntPtr LibVLCMediaPlayerGetNsobject(IntPtr mediaPlayer);
#endif
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_set_xwindow")]
internal static extern void LibVLCMediaPlayerSetXwindow(IntPtr mediaPlayer, uint drawable);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_get_xwindow")]
internal static extern uint LibVLCMediaPlayerGetXwindow(IntPtr mediaPlayer);
#if DESKTOP
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_set_hwnd")]
internal static extern void LibVLCMediaPlayerSetHwnd(IntPtr mediaPlayer, IntPtr drawable);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_get_hwnd")]
internal static extern IntPtr LibVLCMediaPlayerGetHwnd(IntPtr mediaPlayer);
#endif
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_get_length")]
internal static extern long LibVLCMediaPlayerGetLength(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_get_time")]
internal static extern long LibVLCMediaPlayerGetTime(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_set_time")]
internal static extern void LibVLCMediaPlayerSetTime(IntPtr mediaPlayer, long time);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_get_position")]
internal static extern float LibVLCMediaPlayerGetPosition(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_set_position")]
internal static extern void LibVLCMediaPlayerSetPosition(IntPtr mediaPlayer, float position);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_set_chapter")]
internal static extern void LibVLCMediaPlayerSetChapter(IntPtr mediaPlayer, int chapter);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_get_chapter")]
internal static extern int LibVLCMediaPlayerGetChapter(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_get_chapter_count")]
internal static extern int LibVLCMediaPlayerGetChapterCount(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_will_play")]
internal static extern int LibVLCMediaPlayerWillPlay(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_get_chapter_count_for_title")]
internal static extern int LibVLCMediaPlayerGetChapterCountForTitle(IntPtr mediaPlayer, int title);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_set_title")]
internal static extern void LibVLCMediaPlayerSetTitle(IntPtr mediaPlayer, int title);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_get_title")]
internal static extern int LibVLCMediaPlayerGetTitle(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_get_title_count")]
internal static extern int LibVLCMediaPlayerGetTitleCount(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_previous_chapter")]
internal static extern void LibVLCMediaPlayerPreviousChapter(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_next_chapter")]
internal static extern void LibVLCMediaPlayerNextChapter(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_get_rate")]
internal static extern float LibVLCMediaPlayerGetRate(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_set_rate")]
internal static extern int LibVLCMediaPlayerSetRate(IntPtr mediaPlayer, float rate);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_get_state")]
internal static extern VLCState LibVLCMediaPlayerGetState(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_get_fps")]
internal static extern float LibVLCMediaPlayerGetFps(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_has_vout")]
internal static extern uint LibVLCMediaPlayerHasVout(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_is_seekable")]
internal static extern int LibVLCMediaPlayerIsSeekable(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_can_pause")]
internal static extern int LibVLCMediaPlayerCanPause(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_program_scrambled")]
internal static extern int LibVLCMediaPlayerProgramScrambled(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_next_frame")]
internal static extern void LibVLCMediaPlayerNextFrame(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_navigate")]
internal static extern void LibVLCMediaPlayerNavigate(IntPtr mediaPlayer, uint navigate);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_set_video_title_display")]
internal static extern void LibVLCMediaPlayerSetVideoTitleDisplay(IntPtr mediaPlayer, Position position, uint timeout);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_toggle_fullscreen")]
internal static extern void LibVLCToggleFullscreen(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_set_fullscreen")]
internal static extern void LibVLCSetFullscreen(IntPtr mediaPlayer, int fullscreen);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_get_fullscreen")]
internal static extern int LibVLCGetFullscreen(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_toggle_teletext")]
internal static extern void LibVLCToggleTeletext(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_set_equalizer")]
internal static extern int LibVLCMediaPlayerSetEqualizer(IntPtr mediaPlayer, IntPtr equalizer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_set_callbacks")]
internal static extern void LibVLCAudioSetCallbacks(IntPtr mediaPlayer, LibVLCAudioPlayCb play, LibVLCAudioPauseCb pause,
LibVLCAudioResumeCb resume, LibVLCAudioFlushCb flush, LibVLCAudioDrainCb drain, IntPtr opaque);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_set_volume_callback")]
internal static extern void LibVLCAudioSetVolumeCallback(IntPtr mediaPlayer, LibVLCVolumeCb volumeCallback);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_set_format_callbacks")]
internal static extern void LibVLCAudioSetFormatCallbacks(IntPtr mediaPlayer, LibVLCAudioSetupCb setup, LibVLCAudioCleanupCb cleanup);
// TODO: UTF8
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_set_format")]
internal static extern void LibVLCAudioSetFormat(IntPtr mediaPlayer, [MarshalAs(UnmanagedType.LPStr)] string format,
uint rate, uint channels);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_output_device_enum")]
internal static extern IntPtr LibVLCAudioOutputDeviceEnum(IntPtr mediaPlayer);
// TODO: UTF8
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_output_device_set")]
internal static extern void LibVLCAudioOutputDeviceSet(IntPtr mediaPlayer, [MarshalAs(UnmanagedType.LPStr)] string module,
[MarshalAs(UnmanagedType.LPStr)] string deviceId);
// TODO: UTF8
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_output_set")]
internal static extern int LibVLCAudioOutputSet(IntPtr mediaPlayer, [MarshalAs(UnmanagedType.LPStr)] string name);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_toggle_mute")]
internal static extern void LibVLCAudioToggleMute(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_get_mute")]
internal static extern int LibVLCAudioGetMute(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_set_mute")]
internal static extern void LibVLCAudioSetMute(IntPtr mediaPlayer, int status);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_get_volume")]
internal static extern int LibVLCAudioGetVolume(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_set_volume")]
internal static extern int LibVLCAudioSetVolume(IntPtr mediaPlayer, int volume);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_get_track_count")]
internal static extern int LibVLCAudioGetTrackCount(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_get_track_description")]
internal static extern IntPtr LibVLCAudioGetTrackDescription(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_get_track")]
internal static extern int LibVLCAudioGetTrack(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_set_track")]
internal static extern int LibVLCAudioSetTrack(IntPtr mediaPlayer, int track);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_get_channel")]
internal static extern int LibVLCAudioGetChannel(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_set_channel")]
internal static extern int LibVLCAudioSetChannel(IntPtr mediaPlayer, int channel);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_get_delay")]
internal static extern long LibVLCAudioGetDelay(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_audio_set_delay")]
internal static extern int LibVLCAudioSetDelay(IntPtr mediaPlayer, long delay);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_set_callbacks")]
internal static extern void LibVLCVideoSetCallbacks(IntPtr mediaPlayer, LibVLCVideoLockCb lockCallback,
LibVLCVideoUnlockCb unlock, LibVLCVideoDisplayCb display, IntPtr opaque);
//TODO: UTF8
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_set_format")]
internal static extern void LibVLCVideoSetFormat(IntPtr mediaPlayer, [MarshalAs(UnmanagedType.LPStr)] string chroma,
uint width, uint height, uint pitch);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_set_format_callbacks")]
internal static extern void LibVLCVideoSetFormatCallbacks(IntPtr mediaPlayer, LibVLCVideoFormatCb setup,
LibVLCVideoCleanupCb cleanup);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_set_key_input")]
internal static extern void LibVLCVideoSetKeyInput(IntPtr mediaPlayer, int enable);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_set_mouse_input")]
internal static extern void LibVLCVideoSetMouseInput(IntPtr mediaPlayer, int enable);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_get_size")]
internal static extern int LibVLCVideoGetSize(IntPtr mediaPlayer, uint num, ref uint px, ref uint py);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_get_cursor")]
internal static extern int LibVLCVideoGetCursor(IntPtr mediaPlayer, uint num, ref int px, ref int py);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_get_scale")]
internal static extern float LibVLCVideoGetScale(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_set_scale")]
internal static extern void LibVLCVideoSetScale(IntPtr mediaPlayer, float factor);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_get_aspect_ratio")]
internal static extern string LibVLCVideoGetAspectRatio(IntPtr mediaPlayer);
//TODO: UTF8
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_set_aspect_ratio")]
internal static extern void LibVLCVideoSetAspectRatio(IntPtr mediaPlayer, [MarshalAs(UnmanagedType.LPStr)] string aspect);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_get_spu")]
internal static extern int LibVLCVideoGetSpu(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_get_spu_count")]
internal static extern int LibVLCVideoGetSpuCount(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_get_spu_description")]
internal static extern IntPtr LibVLCVideoGetSpuDescription(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_set_spu")]
internal static extern int LibVLCVideoSetSpu(IntPtr mediaPlayer, int spu);
//TODO: UTF8
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_set_subtitle_file")]
internal static extern int LibVLCVideoSetSubtitleFile(IntPtr mediaPlayer,
[MarshalAs(UnmanagedType.LPStr)] string subtitle);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_get_spu_delay")]
internal static extern long LibVLCVideoGetSpuDelay(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_set_spu_delay")]
internal static extern int LibVLCVideoSetSpuDelay(IntPtr mediaPlayer, long delay);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_get_title_description")]
internal static extern IntPtr LibVLCVideoGetTitleDescription(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_get_full_title_descriptions")]
internal static extern int LibVLCMediaPlayerGetFullTitleDescriptions(IntPtr mediaPlayer, IntPtr titles);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_get_chapter_description")]
internal static extern IntPtr LibVLCVideoGetChapterDescription(IntPtr mediaPlayer,
int title);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_title_descriptions_release")]
internal static extern void LibVLCTitleDescriptionsRelease(IntPtr titles, uint count);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_media_player_get_full_chapter_descriptions")]
internal static extern int LibVLCMediaPlayerGetFullChapterDescriptions(IntPtr mediaPlayer, int titleIndex, ref IntPtr chapters);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_chapter_descriptions_release")]
internal static extern void LibVLCChapterDescriptionsRelease(IntPtr chapters, uint count);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_get_crop_geometry")]
internal static extern string LibVLCVideoGetCropGeometry(IntPtr mediaPlayer);
//TODO: UTF8
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_set_crop_geometry")]
internal static extern void LibVLCVideoSetCropGeometry(IntPtr mediaPlayer, [MarshalAs(UnmanagedType.LPStr)] string geometry);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_get_teletext")]
internal static extern int LibVLCVideoGetTeletext(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_set_teletext")]
internal static extern void LibVLCVideoSetTeletext(IntPtr mediaPlayer, int page);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_get_track_count")]
internal static extern int LibVLCVideoGetTrackCount(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_get_track_description")]
internal static extern IntPtr LibVLCVideoGetTrackDescription(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_get_track")]
internal static extern int LibVLCVideoGetTrack(IntPtr mediaPlayer);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_set_track")]
internal static extern int LibVLCVideoSetTrack(IntPtr mediaPlayer, int track);
// TODO: UTF8
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_take_snapshot")]
internal static extern int LibVLCVideoTakeSnapshot(IntPtr mediaPlayer, uint num,
[MarshalAs(UnmanagedType.LPStr)] string filepath, uint width, uint height);
// TODO: UTF8
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_set_deinterlace")]
internal static extern void LibVLCVideoSetDeinterlace(IntPtr mediaPlayer, [MarshalAs(UnmanagedType.LPStr)] string mode);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_get_marquee_int")]
internal static extern int LibVLCVideoGetMarqueeInt(IntPtr mediaPlayer, VideoMarqueeOption option);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_get_marquee_string")]
internal static extern string LibVLCVideoGetMarqueeString(IntPtr mediaPlayer, VideoMarqueeOption option);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_set_marquee_int")]
internal static extern void LibVLCVideoSetMarqueeInt(IntPtr mediaPlayer, VideoMarqueeOption option, int marqueeValue);
//TODO: UTF8
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_set_marquee_string")]
internal static extern void LibVLCVideoSetMarqueeString(IntPtr mediaPlayer, VideoMarqueeOption option, [MarshalAs(UnmanagedType.LPStr)] string marqueeValue);
[SuppressUnmanagedCodeSecurity]
[DllImport(Constants.LibraryName, CallingConvention = CallingConvention.Cdecl,
EntryPoint = "libvlc_video_get_logo_int")]
internal static extern int LibVLCVideoGetLogoInt(IntPtr mediaPlayer, VideoLogoOption option);