gstreamer/gstreamer-sharp/MixerTrack.custom
Maarten Bosmans 6cb104a67a Add .dll to gstreamersharpglue DllImport
Nescessary for .NET compatibility, where .dll isn't
added for libraries with a . in the filename.
2009-05-25 12:12:35 +02:00

45 lines
2.1 KiB
Text

[DllImport ("gstreamersharpglue-0.10.dll") ]
extern static uint gst__interfacessharp_gst__interfaces_mixertrack_get_label_offset ();
static uint label_offset = gst__interfacessharp_gst__interfaces_mixertrack_get_label_offset ();
[DllImport ("gstreamersharpglue-0.10.dll") ]
extern static uint gst__interfacessharp_gst__interfaces_mixertrack_get_flags_offset ();
static uint flags_offset = gst__interfacessharp_gst__interfaces_mixertrack_get_flags_offset ();
[DllImport ("gstreamersharpglue-0.10.dll") ]
extern static uint gst__interfacessharp_gst__interfaces_mixertrack_get_num_channels_offset ();
static uint num_channels_offset = gst__interfacessharp_gst__interfaces_mixertrack_get_num_channels_offset ();
[DllImport ("gstreamersharpglue-0.10.dll") ]
extern static uint gst__interfacessharp_gst__interfaces_mixertrack_get_min_volume_offset ();
static uint min_volume_offset = gst__interfacessharp_gst__interfaces_mixertrack_get_min_volume_offset ();
[DllImport ("gstreamersharpglue-0.10.dll") ]
extern static uint gst__interfacessharp_gst__interfaces_mixertrack_get_max_volume_offset ();
static uint max_volume_offset = gst__interfacessharp_gst__interfaces_mixertrack_get_max_volume_offset ();
public MixerTrack (uint index, string untranslated_label, string label, MixerTrackFlags flags, int num_channels, int min_volume, int max_volume) : base (IntPtr.Zero) {
CreateNativeObject (new string [] {"index", "untranslated-label"}, new GLib.Value [] { new GLib.Value (index), new GLib.Value (untranslated_label) });
unsafe {
IntPtr* raw_ptr = (IntPtr*) ( ( (byte*) Handle) + label_offset);
*raw_ptr = GLib.Marshaller.StringToPtrGStrdup (label);
}
unsafe {
int* raw_ptr = (int*) ( ( (byte*) Handle) + flags_offset);
*raw_ptr = (int) flags;
}
unsafe {
int* raw_ptr = (int*) ( ( (byte*) Handle) + num_channels_offset);
*raw_ptr = num_channels;
}
unsafe {
int* raw_ptr = (int*) ( ( (byte*) Handle) + min_volume_offset);
*raw_ptr = min_volume;
}
unsafe {
int* raw_ptr = (int*) ( ( (byte*) Handle) + max_volume_offset);
*raw_ptr = max_volume;
}
}