mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 00:06:36 +00:00
aa7bb8fa1c
glib-sharp will only get a new release with the new API that we need for 3.0 in a year or something. Instead of waiting a year before we can release something we now have our own internal copy of glib-sharp trunk that will be dropped once glib-sharp 3.0 is released. Everything is now compilable and working without any additional patches.
45 lines
2.1 KiB
Text
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 Gst.GLib.Value [] { new Gst.GLib.Value (index), new Gst.GLib.Value (untranslated_label) });
|
|
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*) ( ( (byte*) Handle) + label_offset);
|
|
*raw_ptr = Gst.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;
|
|
}
|
|
|
|
}
|