From 4eddb6d8a30a27eb5273c93f1b1aa6b019d8552b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 23 Apr 2009 16:01:57 +0200 Subject: [PATCH] Add a helper function to get the number of an event type --- gstreamer-sharp/Event.custom | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gstreamer-sharp/Event.custom b/gstreamer-sharp/Event.custom index 704fbf4e65..62e7c4503d 100644 --- a/gstreamer-sharp/Event.custom +++ b/gstreamer-sharp/Event.custom @@ -135,6 +135,10 @@ public static Gst.EventType MakeType (uint num, Gst.EventTypeFlags flags) { return (Gst.EventType) ( (num << 4) | (uint) flags); } +public static uint GetTypeNumber (Gst.EventType type) { + return ((uint) type) >> 4; +} + [DllImport ("gstreamer-0.10.dll") ] static extern IntPtr gst_event_new_custom (Gst.EventType type, IntPtr structure);