gstreamer/subprojects/gstreamer-sharp/sources/generated/Gst/Global.cs
Andoni Morales Alastruey 4be602a137 csharp: update c# bindings
Update to C# bindings to use a more recent version of GtkSharp
and regenerate the bindings with that version

Fix #1718
2023-12-07 17:34:34 +01:00

638 lines
25 KiB
C#

// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gst {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class Global {
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_buffer_get_max_memory();
public static uint BufferGetMaxMemory() {
uint raw_ret = gst_buffer_get_max_memory();
uint ret = raw_ret;
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_buffer_list_replace(ref IntPtr old_list, IntPtr new_list);
public static bool BufferListReplace(ref Gst.BufferList old_list, Gst.BufferList new_list) {
IntPtr native_old_list = old_list == null ? IntPtr.Zero : old_list.Handle ;
bool raw_ret = gst_buffer_list_replace(ref native_old_list, new_list == null ? IntPtr.Zero : new_list.Handle);
bool ret = raw_ret;
old_list = native_old_list == IntPtr.Zero ? null : (Gst.BufferList) GLib.Opaque.GetOpaque (native_old_list, typeof (Gst.BufferList), true);
return ret;
}
public static bool BufferListReplace(ref Gst.BufferList old_list) {
return BufferListReplace (ref old_list, null);
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_buffer_list_take(ref IntPtr old_list, IntPtr new_list);
public static bool BufferListTake(ref Gst.BufferList old_list, Gst.BufferList new_list) {
IntPtr native_old_list = old_list == null ? IntPtr.Zero : old_list.Handle ;
new_list.Owned = false;
bool raw_ret = gst_buffer_list_take(ref native_old_list, new_list == null ? IntPtr.Zero : new_list.Handle);
bool ret = raw_ret;
old_list = native_old_list == IntPtr.Zero ? null : (Gst.BufferList) GLib.Opaque.GetOpaque (native_old_list, typeof (Gst.BufferList), true);
return ret;
}
public static bool BufferListTake(ref Gst.BufferList old_list) {
return BufferListTake (ref old_list, null);
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_caps_features_from_string(IntPtr features);
public static Gst.CapsFeatures CapsFeaturesFromString(string features) {
IntPtr native_features = GLib.Marshaller.StringToPtrGStrdup (features);
IntPtr raw_ret = gst_caps_features_from_string(native_features);
Gst.CapsFeatures ret = Gst.CapsFeatures.New (raw_ret);
GLib.Marshaller.Free (native_features);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_caps_from_string(IntPtr str1ng);
public static Gst.Caps CapsFromString(string str1ng) {
IntPtr native_str1ng = GLib.Marshaller.StringToPtrGStrdup (str1ng);
IntPtr raw_ret = gst_caps_from_string(native_str1ng);
Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
GLib.Marshaller.Free (native_str1ng);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_context_replace(IntPtr old_context, IntPtr new_context);
public static bool ContextReplace(ref Gst.Context old_context, Gst.Context new_context) {
IntPtr native_old_context = GLib.Marshaller.StructureToPtrAlloc (old_context);
IntPtr native_new_context = GLib.Marshaller.StructureToPtrAlloc (new_context);
bool raw_ret = gst_context_replace(native_old_context, native_new_context);
bool ret = raw_ret;
old_context = Gst.Context.New (native_old_context);
Marshal.FreeHGlobal (native_old_context);
Marshal.FreeHGlobal (native_new_context);
return ret;
}
public static bool ContextReplace(ref Gst.Context old_context) {
return ContextReplace (ref old_context, Gst.Context.Zero);
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_core_error_quark();
public static uint CoreErrorQuark() {
uint raw_ret = gst_core_error_quark();
uint ret = raw_ret;
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_deinit();
public static void Deinit() {
gst_deinit();
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_dynamic_type_register(IntPtr plugin, IntPtr type);
public static bool DynamicTypeRegister(Gst.Plugin plugin, GLib.GType type) {
bool raw_ret = gst_dynamic_type_register(plugin == null ? IntPtr.Zero : plugin.Handle, type.Val);
bool ret = raw_ret;
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_error_get_message(uint domain, int code);
public static string ErrorGetMessage(uint domain, int code) {
IntPtr raw_ret = gst_error_get_message(domain, code);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_event_type_get_flags(int type);
public static Gst.EventTypeFlags EventTypeGetFlags(Gst.EventType type) {
int raw_ret = gst_event_type_get_flags((int) type);
Gst.EventTypeFlags ret = (Gst.EventTypeFlags) raw_ret;
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_event_type_get_name(int type);
public static string EventTypeGetName(Gst.EventType type) {
IntPtr raw_ret = gst_event_type_get_name((int) type);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_event_type_to_quark(int type);
public static uint EventTypeToQuark(Gst.EventType type) {
uint raw_ret = gst_event_type_to_quark((int) type);
uint ret = raw_ret;
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_event_type_to_sticky_ordering(int type);
public static uint EventTypeToStickyOrdering(Gst.EventType type) {
uint raw_ret = gst_event_type_to_sticky_ordering((int) type);
uint ret = raw_ret;
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_flow_get_name(int _ret);
public static string FlowGetName(Gst.FlowReturn _ret) {
IntPtr raw_ret = gst_flow_get_name((int) _ret);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_flow_to_quark(int _ret);
public static uint FlowToQuark(Gst.FlowReturn _ret) {
uint raw_ret = gst_flow_to_quark((int) _ret);
uint ret = raw_ret;
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_get_main_executable_path();
public static string MainExecutablePath {
get {
IntPtr raw_ret = gst_get_main_executable_path();
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_is_caps_features(IntPtr obj);
public static bool IsCapsFeatures(IntPtr obj) {
bool raw_ret = gst_is_caps_features(obj);
bool ret = raw_ret;
return ret;
}
public static bool IsCapsFeatures() {
return IsCapsFeatures (IntPtr.Zero);
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_is_initialized();
public static bool IsInitialized {
get {
bool raw_ret = gst_is_initialized();
bool ret = raw_ret;
return ret;
}
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_library_error_quark();
public static uint LibraryErrorQuark() {
uint raw_ret = gst_library_error_quark();
uint ret = raw_ret;
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_message_take(ref IntPtr old_message, IntPtr new_message);
public static bool MessageTake(ref Gst.Message old_message, Gst.Message new_message) {
IntPtr native_old_message = old_message == null ? IntPtr.Zero : old_message.Handle ;
new_message.Owned = false;
bool raw_ret = gst_message_take(ref native_old_message, new_message == null ? IntPtr.Zero : new_message.Handle);
bool ret = raw_ret;
old_message = native_old_message == IntPtr.Zero ? null : (Gst.Message) GLib.Opaque.GetOpaque (native_old_message, typeof (Gst.Message), true);
return ret;
}
public static bool MessageTake(ref Gst.Message old_message) {
return MessageTake (ref old_message, null);
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_message_type_get_name(int type);
public static string MessageTypeGetName(Gst.MessageType type) {
IntPtr raw_ret = gst_message_type_get_name((int) type);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_message_type_to_quark(int type);
public static uint MessageTypeToQuark(Gst.MessageType type) {
uint raw_ret = gst_message_type_to_quark((int) type);
uint ret = raw_ret;
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_meta_api_type_has_tag(IntPtr api, uint tag);
public static bool MetaApiTypeHasTag(GLib.GType api, uint tag) {
bool raw_ret = gst_meta_api_type_has_tag(api.Val, tag);
bool ret = raw_ret;
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_meta_api_type_register(IntPtr api, IntPtr tags);
public static GLib.GType MetaApiTypeRegister(string api, string[] tags) {
IntPtr native_api = GLib.Marshaller.StringToPtrGStrdup (api);
IntPtr native_tags = GLib.Marshaller.StringArrayToStrvPtr(tags, true);
IntPtr raw_ret = gst_meta_api_type_register(native_api, native_tags);
GLib.GType ret = new GLib.GType(raw_ret);
GLib.Marshaller.Free (native_api);
GLib.Marshaller.StrFreeV (native_tags);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_meta_get_info(IntPtr impl);
public static Gst.MetaInfo MetaGetInfo(string impl) {
IntPtr native_impl = GLib.Marshaller.StringToPtrGStrdup (impl);
IntPtr raw_ret = gst_meta_get_info(native_impl);
Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret);
GLib.Marshaller.Free (native_impl);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_meta_register(IntPtr api, IntPtr impl, UIntPtr size, GstSharp.MetaInitFunctionNative init_func, GstSharp.MetaFreeFunctionNative free_func, GstSharp.MetaTransformFunctionNative transform_func);
public static Gst.MetaInfo MetaRegister(GLib.GType api, string impl, ulong size, Gst.MetaInitFunction init_func, Gst.MetaFreeFunction free_func, Gst.MetaTransformFunction transform_func) {
IntPtr native_impl = GLib.Marshaller.StringToPtrGStrdup (impl);
GstSharp.MetaInitFunctionWrapper init_func_wrapper = new GstSharp.MetaInitFunctionWrapper (init_func);
init_func_wrapper.PersistUntilCalled ();
GstSharp.MetaFreeFunctionWrapper free_func_wrapper = new GstSharp.MetaFreeFunctionWrapper (free_func);
free_func_wrapper.PersistUntilCalled ();
GstSharp.MetaTransformFunctionWrapper transform_func_wrapper = new GstSharp.MetaTransformFunctionWrapper (transform_func);
transform_func_wrapper.PersistUntilCalled ();
IntPtr raw_ret = gst_meta_register(api.Val, native_impl, new UIntPtr (size), init_func_wrapper.NativeDelegate, free_func_wrapper.NativeDelegate, transform_func_wrapper.NativeDelegate);
Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret);
GLib.Marshaller.Free (native_impl);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_meta_register_custom(IntPtr name, IntPtr tags, GstSharp.CustomMetaTransformFunctionNative transform_func, IntPtr user_data, GLib.DestroyNotify destroy_data);
public static Gst.MetaInfo MetaRegisterCustom(string name, string[] tags, Gst.CustomMetaTransformFunction transform_func) {
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
IntPtr native_tags = GLib.Marshaller.StringArrayToStrvPtr(tags, true);
GstSharp.CustomMetaTransformFunctionWrapper transform_func_wrapper = new GstSharp.CustomMetaTransformFunctionWrapper (transform_func);
IntPtr user_data;
GLib.DestroyNotify destroy_data;
if (transform_func == null) {
user_data = IntPtr.Zero;
destroy_data = null;
} else {
user_data = (IntPtr) GCHandle.Alloc (transform_func_wrapper);
destroy_data = GLib.DestroyHelper.NotifyHandler;
}
IntPtr raw_ret = gst_meta_register_custom(native_name, native_tags, transform_func_wrapper.NativeDelegate, user_data, destroy_data);
Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret);
GLib.Marshaller.Free (native_name);
GLib.Marshaller.StrFreeV (native_tags);
return ret;
}
public static Gst.MetaInfo MetaRegisterCustom(string name, string[] tags) {
return MetaRegisterCustom (name, tags, null);
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_parent_buffer_meta_api_get_type();
public static GLib.GType ParentBufferMetaApiGetType() {
IntPtr raw_ret = gst_parent_buffer_meta_api_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_parent_buffer_meta_get_info();
public static Gst.MetaInfo ParentBufferMetaGetInfo() {
IntPtr raw_ret = gst_parent_buffer_meta_get_info();
Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_plugin_error_quark();
public static uint PluginErrorQuark() {
uint raw_ret = gst_plugin_error_quark();
uint ret = raw_ret;
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_preset_get_app_dir();
public static string PresetGetAppDir() {
IntPtr raw_ret = gst_preset_get_app_dir();
string ret = GLib.Marshaller.FilenamePtrToString (raw_ret);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_preset_set_app_dir(IntPtr app_dir);
public static bool PresetSetAppDir(string app_dir) {
IntPtr native_app_dir = GLib.Marshaller.StringToFilenamePtr (app_dir);
bool raw_ret = gst_preset_set_app_dir(native_app_dir);
bool ret = raw_ret;
GLib.Marshaller.Free (native_app_dir);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_protection_filter_systems_by_available_decryptors(IntPtr system_identifiers);
public static string[] ProtectionFilterSystemsByAvailableDecryptors(string[] system_identifiers) {
IntPtr native_system_identifiers = GLib.Marshaller.StringArrayToStrvPtr(system_identifiers, true);
IntPtr raw_ret = gst_protection_filter_systems_by_available_decryptors(native_system_identifiers);
string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true);
GLib.Marshaller.StrFreeV (native_system_identifiers);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_protection_meta_api_get_type();
public static GLib.GType ProtectionMetaApiGetType() {
IntPtr raw_ret = gst_protection_meta_api_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_protection_meta_get_info();
public static Gst.MetaInfo ProtectionMetaGetInfo() {
IntPtr raw_ret = gst_protection_meta_get_info();
Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_protection_select_system(IntPtr system_identifiers);
public static string ProtectionSelectSystem(string[] system_identifiers) {
IntPtr native_system_identifiers = GLib.Marshaller.StringArrayToStrvPtr(system_identifiers, true);
IntPtr raw_ret = gst_protection_select_system(native_system_identifiers);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
GLib.Marshaller.StrFreeV (native_system_identifiers);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_query_take(ref IntPtr old_query, IntPtr new_query);
public static bool QueryTake(ref Gst.Query old_query, Gst.Query new_query) {
IntPtr native_old_query = old_query == null ? IntPtr.Zero : old_query.Handle ;
new_query.Owned = false;
bool raw_ret = gst_query_take(ref native_old_query, new_query == null ? IntPtr.Zero : new_query.Handle);
bool ret = raw_ret;
old_query = native_old_query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (native_old_query, typeof (Gst.Query), true);
return ret;
}
public static bool QueryTake(ref Gst.Query old_query) {
return QueryTake (ref old_query, null);
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gst_query_type_get_flags(int type);
public static Gst.QueryTypeFlags QueryTypeGetFlags(Gst.QueryType type) {
int raw_ret = gst_query_type_get_flags((int) type);
Gst.QueryTypeFlags ret = (Gst.QueryTypeFlags) raw_ret;
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_query_type_get_name(int type);
public static string QueryTypeGetName(Gst.QueryType type) {
IntPtr raw_ret = gst_query_type_get_name((int) type);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_query_type_to_quark(int type);
public static uint QueryTypeToQuark(Gst.QueryType type) {
uint raw_ret = gst_query_type_to_quark((int) type);
uint ret = raw_ret;
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_reference_timestamp_meta_api_get_type();
public static GLib.GType ReferenceTimestampMetaApiGetType() {
IntPtr raw_ret = gst_reference_timestamp_meta_api_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_reference_timestamp_meta_get_info();
public static Gst.MetaInfo ReferenceTimestampMetaGetInfo() {
IntPtr raw_ret = gst_reference_timestamp_meta_get_info();
Gst.MetaInfo ret = Gst.MetaInfo.New (raw_ret);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_resource_error_quark();
public static uint ResourceErrorQuark() {
uint raw_ret = gst_resource_error_quark();
uint ret = raw_ret;
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_segtrap_is_enabled();
public static bool SegtrapIsEnabled() {
bool raw_ret = gst_segtrap_is_enabled();
bool ret = raw_ret;
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_segtrap_set_enabled(bool enabled);
public static void SegtrapSetEnabled(bool enabled) {
gst_segtrap_set_enabled(enabled);
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_state_change_get_name(int transition);
public static string StateChangeGetName(Gst.StateChange transition) {
IntPtr raw_ret = gst_state_change_get_name((int) transition);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_static_caps_get_type();
public static GLib.GType StaticCapsGetType() {
IntPtr raw_ret = gst_static_caps_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_static_pad_template_get_type();
public static GLib.GType StaticPadTemplateGetType() {
IntPtr raw_ret = gst_static_pad_template_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gst_stream_error_quark();
public static uint StreamErrorQuark() {
uint raw_ret = gst_stream_error_quark();
uint ret = raw_ret;
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_stream_type_get_name(int stype);
public static string StreamTypeGetName(Gst.StreamType stype) {
IntPtr raw_ret = gst_stream_type_get_name((int) stype);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_toc_entry_type_get_nick(int type);
public static string TocEntryTypeGetNick(Gst.TocEntryType type) {
IntPtr raw_ret = gst_toc_entry_type_get_nick((int) type);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_tracing_get_active_tracers();
public static Gst.Tracer[] TracingGetActiveTracers() {
IntPtr raw_ret = gst_tracing_get_active_tracers();
Gst.Tracer[] ret = (Gst.Tracer[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, true, typeof(Gst.Tracer));
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_tracing_register_hook(IntPtr tracer, IntPtr detail, IntPtr func);
public static void TracingRegisterHook(Gst.Tracer tracer, string detail, IntPtr func) {
IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup (detail);
gst_tracing_register_hook(tracer == null ? IntPtr.Zero : tracer.Handle, native_detail, func);
GLib.Marshaller.Free (native_detail);
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gst_type_find_get_type();
public static GLib.GType TypeFindGetType() {
IntPtr raw_ret = gst_type_find_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_type_find_register(IntPtr plugin, IntPtr name, uint rank, GstSharp.TypeFindFunctionNative func, IntPtr extensions, IntPtr possible_caps, IntPtr data, GLib.DestroyNotify data_notify);
public static bool TypeFindRegister(Gst.Plugin plugin, string name, uint rank, Gst.TypeFindFunction func, string extensions, Gst.Caps possible_caps) {
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
GstSharp.TypeFindFunctionWrapper func_wrapper = new GstSharp.TypeFindFunctionWrapper (func);
IntPtr data;
GLib.DestroyNotify data_notify;
if (func == null) {
data = IntPtr.Zero;
data_notify = null;
} else {
data = (IntPtr) GCHandle.Alloc (func_wrapper);
data_notify = GLib.DestroyHelper.NotifyHandler;
}
IntPtr native_extensions = GLib.Marshaller.StringToPtrGStrdup (extensions);
bool raw_ret = gst_type_find_register(plugin == null ? IntPtr.Zero : plugin.Handle, native_name, rank, func_wrapper.NativeDelegate, native_extensions, possible_caps == null ? IntPtr.Zero : possible_caps.Handle, IntPtr.Zero, data_notify);
bool ret = raw_ret;
GLib.Marshaller.Free (native_name);
GLib.Marshaller.Free (native_extensions);
return ret;
}
public static bool TypeFindRegister(string name, uint rank, Gst.TypeFindFunction func) {
return TypeFindRegister (null, name, rank, func, null, null);
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gst_type_is_plugin_api(IntPtr type, out int flags);
public static bool TypeIsPluginApi(GLib.GType type, out Gst.PluginAPIFlags flags) {
int native_flags;
bool raw_ret = gst_type_is_plugin_api(type.Val, out native_flags);
bool ret = raw_ret;
flags = (Gst.PluginAPIFlags) native_flags;
return ret;
}
[DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gst_type_mark_as_plugin_api(IntPtr type, int flags);
public static void TypeMarkAsPluginApi(GLib.GType type, Gst.PluginAPIFlags flags) {
gst_type_mark_as_plugin_api(type.Val, (int) flags);
}
#endregion
}
}