disable unused mpv events
This commit is contained in:
@@ -118,6 +118,18 @@ namespace mpvnet
|
||||
|
||||
Handle = mpv_create();
|
||||
|
||||
mpv_event_id[] events = {
|
||||
mpv_event_id.MPV_EVENT_START_FILE,
|
||||
mpv_event_id.MPV_EVENT_AUDIO_RECONFIG,
|
||||
mpv_event_id.MPV_EVENT_FILE_LOADED,
|
||||
mpv_event_id.MPV_EVENT_VIDEO_RECONFIG,
|
||||
mpv_event_id.MPV_EVENT_PLAYBACK_RESTART,
|
||||
mpv_event_id.MPV_EVENT_END_FILE
|
||||
};
|
||||
|
||||
foreach (mpv_event_id i in events)
|
||||
mpv_request_event(Handle, i, 0);
|
||||
|
||||
mpv_request_log_messages(Handle, "no");
|
||||
|
||||
App.RunTask(() => MainEventLoop());
|
||||
|
||||
@@ -65,6 +65,9 @@ public class libmpv
|
||||
[DllImport("mpv-2.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr mpv_wait_event(IntPtr mpvHandle, double timeout);
|
||||
|
||||
[DllImport("mpv-2.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern mpv_error mpv_request_event(IntPtr mpvHandle, mpv_event_id id, int enable);
|
||||
|
||||
public enum mpv_error
|
||||
{
|
||||
MPV_ERROR_SUCCESS = 0,
|
||||
|
||||
Reference in New Issue
Block a user