Add a helper function to get the number of an event type

This commit is contained in:
Sebastian Dröge 2009-04-23 16:01:57 +02:00
parent 48fc341b06
commit 4eddb6d8a3

View file

@ -135,6 +135,10 @@ public static Gst.EventType MakeType (uint num, Gst.EventTypeFlags flags) {
return (Gst.EventType) ( (num << 4) | (uint) flags); return (Gst.EventType) ( (num << 4) | (uint) flags);
} }
public static uint GetTypeNumber (Gst.EventType type) {
return ((uint) type) >> 4;
}
[DllImport ("gstreamer-0.10.dll") ] [DllImport ("gstreamer-0.10.dll") ]
static extern IntPtr gst_event_new_custom (Gst.EventType type, IntPtr structure); static extern IntPtr gst_event_new_custom (Gst.EventType type, IntPtr structure);