mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
Correctly bind the new API
This commit is contained in:
parent
cdc8704c89
commit
daa624932c
8 changed files with 156 additions and 25 deletions
|
@ -322,3 +322,22 @@ public void ParseLatency (out ulong latency) {
|
||||||
gst_event_parse_latency (Handle, out latency);
|
gst_event_parse_latency (Handle, out latency);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport("libgstreamer-0.10.dll") ]
|
||||||
|
static extern IntPtr gst_event_new_step (Gst.Format format, ulong amount, double rate, bool flush, bool intermediate);
|
||||||
|
|
||||||
|
public static Gst.Event NewStep (Gst.Format format, ulong amount, double rate, bool flush, bool intermediate) {
|
||||||
|
Gst.Event ev = (Gst.Event) Gst.MiniObject.GetObject (gst_event_new_step (format, amount, rate, flush, intermediate), true);
|
||||||
|
|
||||||
|
return ev;
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("libgstreamer-0.10.dll") ]
|
||||||
|
static extern void gst_event_parse_step (IntPtr ev, out Gst.Format format, out ulong amount, out double rate, out bool flush, out bool intermediate);
|
||||||
|
|
||||||
|
public void ParseStep (out Gst.Format format, out ulong amount, out double rate, out bool flush, out bool intermediate) {
|
||||||
|
if (Type != EventType.Step)
|
||||||
|
throw new ArgumentException ();
|
||||||
|
|
||||||
|
gst_event_parse_step (Handle, out format, out amount, out rate, out flush, out intermediate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,8 @@
|
||||||
<attr path="/api/namespace/enum[@name='BufferFlags']/member[@cname='GST_BUFFER_FLAG_LAST']" name="value">MiniObjectFlags.Last << 8</attr>
|
<attr path="/api/namespace/enum[@name='BufferFlags']/member[@cname='GST_BUFFER_FLAG_LAST']" name="value">MiniObjectFlags.Last << 8</attr>
|
||||||
|
|
||||||
<change-node-type path="/api/namespace/object[@name='BufferList']">mini-object</change-node-type>
|
<change-node-type path="/api/namespace/object[@name='BufferList']">mini-object</change-node-type>
|
||||||
|
<attr path="/api/namespace/mini-object[@name='BufferList']/method[@cname='gst_buffer_list_get']/return-type" name="owned">true</attr>
|
||||||
|
<attr path="/api/namespace/mini-object[@name='BufferList']/method[@cname='gst_buffer_list_iterate']/return-type" name="owned">true</attr>
|
||||||
|
|
||||||
<attr path="/api/namespace/object[@name='Bus']/method[@cname='gst_bus_post']/parameters/parameter[@name='message']" name="owned">true</attr>
|
<attr path="/api/namespace/object[@name='Bus']/method[@cname='gst_bus_post']/parameters/parameter[@name='message']" name="owned">true</attr>
|
||||||
<attr path="/api/namespace/object[@name='Bus']/method[@cname='gst_bus_peek']/return-type" name="owned">true</attr>
|
<attr path="/api/namespace/object[@name='Bus']/method[@cname='gst_bus_peek']/return-type" name="owned">true</attr>
|
||||||
|
@ -308,6 +310,7 @@
|
||||||
<attr path="/api/namespace/object[@name='Element']/method[@cname='gst_element_create_all_pads']" name="accessibility">protected</attr>
|
<attr path="/api/namespace/object[@name='Element']/method[@cname='gst_element_create_all_pads']" name="accessibility">protected</attr>
|
||||||
<attr path="/api/namespace/object[@name='Element']/method[@cname='gst_element_no_more_pads']" name="accessibility">protected</attr>
|
<attr path="/api/namespace/object[@name='Element']/method[@cname='gst_element_no_more_pads']" name="accessibility">protected</attr>
|
||||||
<attr path="/api/namespace/object[@name='Element']/method[@cname='gst_element_remove_pad']" name="accessibility">protected</attr>
|
<attr path="/api/namespace/object[@name='Element']/method[@cname='gst_element_remove_pad']" name="accessibility">protected</attr>
|
||||||
|
<attr path="/api/namespace/object[@name='Element']/method[@cname='gst_element_lost_state_full']" name="name">LostState</attr>
|
||||||
|
|
||||||
<attr path="/api/namespace/struct[@name='ElementDetails']" name="internal">1</attr>
|
<attr path="/api/namespace/struct[@name='ElementDetails']" name="internal">1</attr>
|
||||||
|
|
||||||
|
@ -527,6 +530,7 @@
|
||||||
<attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_get_parent']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_get_parent']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_check_uniqueness']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_check_uniqueness']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@name='Object']/signal[@cname='deep-notify']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@name='Object']/signal[@cname='deep-notify']" name="hidden">1</attr>
|
||||||
|
<attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_ref_sink']" name="hidden">1</attr>
|
||||||
|
|
||||||
<attr path="/api/namespace/enum[@name='ObjectFlags']/member[@cname='GST_OBJECT_FLAG_LAST']" name="name">Last</attr>
|
<attr path="/api/namespace/enum[@name='ObjectFlags']/member[@cname='GST_OBJECT_FLAG_LAST']" name="name">Last</attr>
|
||||||
|
|
||||||
|
@ -574,6 +578,7 @@
|
||||||
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_pull_range']/parameters/parameter[@name='buffer']" name="owned">true</attr>
|
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_pull_range']/parameters/parameter[@name='buffer']" name="owned">true</attr>
|
||||||
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_set_bufferalloc_function']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_set_bufferalloc_function']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_set_chain_function']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_set_chain_function']" name="hidden">1</attr>
|
||||||
|
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_set_chain_list_function']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_set_checkgetrange_function']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_set_checkgetrange_function']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_set_getrange_function']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_set_getrange_function']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_set_event_function']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_set_event_function']" name="hidden">1</attr>
|
||||||
|
@ -612,7 +617,9 @@
|
||||||
</add-node>
|
</add-node>
|
||||||
|
|
||||||
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_chain']/parameters/parameter[@name='buffer']" name="owned">true</attr>
|
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_chain']/parameters/parameter[@name='buffer']" name="owned">true</attr>
|
||||||
|
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_chain_list']/parameters/parameter[@name='list']" name="owned">true</attr>
|
||||||
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_push']/parameters/parameter[@name='buffer']" name="owned">true</attr>
|
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_push']/parameters/parameter[@name='buffer']" name="owned">true</attr>
|
||||||
|
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_push_list']/parameters/parameter[@name='list']" name="owned">true</attr>
|
||||||
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_push_event']/parameters/parameter[@name='event']" name="owned">true</attr>
|
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_push_event']/parameters/parameter[@name='event']" name="owned">true</attr>
|
||||||
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_send_event']/parameters/parameter[@name='event']" name="owned">true</attr>
|
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_send_event']/parameters/parameter[@name='event']" name="owned">true</attr>
|
||||||
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_event_default']/parameters/parameter[@name='event']" name="owned">true</attr>
|
<attr path="/api/namespace/object[@name='Pad']/method[@cname='gst_pad_event_default']/parameters/parameter[@name='event']" name="owned">true</attr>
|
||||||
|
@ -648,6 +655,7 @@
|
||||||
|
|
||||||
<attr path="/api/namespace/callback[@name='PadBufferAllocFunction']/parameters/parameter[@name='buf']" name="pass_as">out</attr>
|
<attr path="/api/namespace/callback[@name='PadBufferAllocFunction']/parameters/parameter[@name='buf']" name="pass_as">out</attr>
|
||||||
<attr path="/api/namespace/callback[@name='PadChainFunction']/parameters/parameter[@name='buffer']" name="owned">true</attr>
|
<attr path="/api/namespace/callback[@name='PadChainFunction']/parameters/parameter[@name='buffer']" name="owned">true</attr>
|
||||||
|
<attr path="/api/namespace/callback[@name='PadChainListFunction']/parameters/parameter[@name='list']" name="owned">true</attr>
|
||||||
<attr path="/api/namespace/callback[@name='PadGetCapsFunction']/return-type" name="owned">true</attr>
|
<attr path="/api/namespace/callback[@name='PadGetCapsFunction']/return-type" name="owned">true</attr>
|
||||||
|
|
||||||
<attr path="/api/namespace/enum[@name='PadFlags']/member[@cname='GST_PAD_FLAG_LAST']" name="name">Last</attr>
|
<attr path="/api/namespace/enum[@name='PadFlags']/member[@cname='GST_PAD_FLAG_LAST']" name="name">Last</attr>
|
||||||
|
@ -714,10 +722,10 @@
|
||||||
<attr path="/api/namespace/struct[@name='ParseContext']/method[@cname='gst_parse_context_get_missing_elements']/return-type" name="owned">true</attr>
|
<attr path="/api/namespace/struct[@name='ParseContext']/method[@cname='gst_parse_context_get_missing_elements']/return-type" name="owned">true</attr>
|
||||||
<attr path="/api/namespace/struct[@name='ParseContext']/method[@cname='gst_parse_context_get_missing_elements']/return-type" name="elements_owned">true</attr>
|
<attr path="/api/namespace/struct[@name='ParseContext']/method[@cname='gst_parse_context_get_missing_elements']/return-type" name="elements_owned">true</attr>
|
||||||
|
|
||||||
<attr path="/api/namespace/object[@name='Pipeline']/method[@cname='gst_pipeline_set_new_stream_time']" name="name">SetStreamTime</attr>
|
|
||||||
<attr path="/api/namespace/object[@name='Pipeline']/method[@cname='gst_pipeline_get_last_stream_time']" name="name">GetStreamTime</attr>
|
|
||||||
<attr path="/api/namespace/object[@name='Pipeline']/method[@cname='gst_pipeline_get_bus']/return-type" name="owned">true</attr>
|
<attr path="/api/namespace/object[@name='Pipeline']/method[@cname='gst_pipeline_get_bus']/return-type" name="owned">true</attr>
|
||||||
<attr path="/api/namespace/object[@name='Pipeline']/method[@cname='gst_pipeline_get_clock']/return-type" name="owned">true</attr>
|
<attr path="/api/namespace/object[@name='Pipeline']/method[@cname='gst_pipeline_get_clock']/return-type" name="owned">true</attr>
|
||||||
|
<attr path="/api/namespace/object[@name='Pipeline']/method[@cname='gst_pipeline_get_last_stream_time']" name="hidden">1</attr>
|
||||||
|
<attr path="/api/namespace/object[@name='Pipeline']/method[@cname='gst_pipeline_set_new_stream_time']" name="hidden">1</attr>
|
||||||
|
|
||||||
<attr path="/api/namespace/enum[@name='PipelineFlags']/member[@cname='GST_PIPELINE_FLAG_FIXED_CLOCK']" name="value">BinFlags.Last << 0</attr>
|
<attr path="/api/namespace/enum[@name='PipelineFlags']/member[@cname='GST_PIPELINE_FLAG_FIXED_CLOCK']" name="value">BinFlags.Last << 0</attr>
|
||||||
<attr path="/api/namespace/enum[@name='PipelineFlags']/member[@cname='GST_PIPELINE_FLAG_LAST']" name="value">BinFlags.Last << 4</attr>
|
<attr path="/api/namespace/enum[@name='PipelineFlags']/member[@cname='GST_PIPELINE_FLAG_LAST']" name="value">BinFlags.Last << 4</attr>
|
||||||
|
@ -735,6 +743,8 @@
|
||||||
|
|
||||||
<attr path="/api/namespace/struct[@name='PluginDesc']" name="hidden">1</attr>
|
<attr path="/api/namespace/struct[@name='PluginDesc']" name="hidden">1</attr>
|
||||||
|
|
||||||
|
<attr path="/api/namespace/callback[@name='PluginInitFullFunc']" name="hidden">1</attr>
|
||||||
|
|
||||||
<attr path="/api/namespace/object[@name='PluginFeature']/method[@cname='gst_plugin_feature_set_name']" name="name">SetFeatureName</attr>
|
<attr path="/api/namespace/object[@name='PluginFeature']/method[@cname='gst_plugin_feature_set_name']" name="name">SetFeatureName</attr>
|
||||||
<attr path="/api/namespace/object[@name='PluginFeature']/method[@cname='gst_plugin_feature_get_name']" name="name">GetFeatureName</attr>
|
<attr path="/api/namespace/object[@name='PluginFeature']/method[@cname='gst_plugin_feature_get_name']" name="name">GetFeatureName</attr>
|
||||||
<add-node path="/api/namespace/object[@name='PluginFeature']">
|
<add-node path="/api/namespace/object[@name='PluginFeature']">
|
||||||
|
@ -879,6 +889,10 @@
|
||||||
<attr path="/api/namespace/boxed[@name='Structure']/method[@cname='gst_structure_has_name']" name="hidden">1</attr>
|
<attr path="/api/namespace/boxed[@name='Structure']/method[@cname='gst_structure_has_name']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Structure']/method[@cname='gst_structure_get_field_type']" name="hidden">1</attr>
|
<attr path="/api/namespace/boxed[@name='Structure']/method[@cname='gst_structure_get_field_type']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='Structure']/method[@cname='gst_structure_nth_field_name']" name="accessibility">private</attr>
|
<attr path="/api/namespace/boxed[@name='Structure']/method[@cname='gst_structure_nth_field_name']" name="accessibility">private</attr>
|
||||||
|
<attr path="/api/namespace/boxed[@name='Structure']/method[@cname='gst_structure_get_valist']" name="hidden">1</attr>
|
||||||
|
<attr path="/api/namespace/boxed[@name='Structure']/method[@cname='gst_structure_id_get']" name="hidden">1</attr>
|
||||||
|
<attr path="/api/namespace/boxed[@name='Structure']/method[@cname='gst_structure_id_get_valist']" name="hidden">1</attr>
|
||||||
|
<attr path="/api/namespace/boxed[@name='Structure']/method[@cname='gst_structure_id_new']" name="hidden">1</attr>
|
||||||
|
|
||||||
<attr path="/api/namespace/callback[@name='StructureForeachFunc']" name="hidden">1</attr>
|
<attr path="/api/namespace/callback[@name='StructureForeachFunc']" name="hidden">1</attr>
|
||||||
|
|
||||||
|
@ -889,6 +903,8 @@
|
||||||
<attr path="/api/namespace/object[@name='Task']/field[@name='Func']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@name='Task']/field[@name='Func']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@name='Task']/field[@name='Data']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@name='Task']/field[@name='Data']" name="hidden">1</attr>
|
||||||
|
|
||||||
|
<attr path="/api/namespace/struct[@name='TaskThreadCallbacks']" name="hidden">1</attr>
|
||||||
|
|
||||||
<attr path="/api/namespace/class[@name='Tag']" name="disable_void_ctor">1</attr>
|
<attr path="/api/namespace/class[@name='Tag']" name="disable_void_ctor">1</attr>
|
||||||
<attr path="/api/namespace/class[@name='Tag']/method[@cname='gst_tag_merge_strings_with_comma']" name="hidden">1</attr>
|
<attr path="/api/namespace/class[@name='Tag']/method[@cname='gst_tag_merge_strings_with_comma']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/class[@name='Tag']/method[@cname='gst_tag_merge_use_first']" name="hidden">1</attr>
|
<attr path="/api/namespace/class[@name='Tag']/method[@cname='gst_tag_merge_use_first']" name="hidden">1</attr>
|
||||||
|
@ -938,12 +954,14 @@
|
||||||
<attr path="/api/namespace/boxed[@name='TagList']/method[@cname='gst_tag_list_get_value_index']" name="hidden">1</attr>
|
<attr path="/api/namespace/boxed[@name='TagList']/method[@cname='gst_tag_list_get_value_index']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='TagList']/method[@cname='gst_tag_list_copy_value']" name="hidden">1</attr>
|
<attr path="/api/namespace/boxed[@name='TagList']/method[@cname='gst_tag_list_copy_value']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/boxed[@name='TagList']/method[@cname='gst_tag_list_merge']/return-type" name="owned">true</attr>
|
<attr path="/api/namespace/boxed[@name='TagList']/method[@cname='gst_tag_list_merge']/return-type" name="owned">true</attr>
|
||||||
|
<attr path="/api/namespace/boxed[@name='TagList']/method[@cname='gst_tag_list_add_value']" name="accessibility">private</attr>
|
||||||
|
|
||||||
<attr path="/api/namespace/interface[@name='TagSetter']/method[@cname='gst_tag_setter_add_tag_valist']" name="hidden">1</attr>
|
<attr path="/api/namespace/interface[@name='TagSetter']/method[@cname='gst_tag_setter_add_tag_valist']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/interface[@name='TagSetter']/method[@cname='gst_tag_setter_add_tag_valist_values']" name="hidden">1</attr>
|
<attr path="/api/namespace/interface[@name='TagSetter']/method[@cname='gst_tag_setter_add_tag_valist_values']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/interface[@name='TagSetter']/method[@cname='gst_tag_setter_add_tag_values']" name="hidden">1</attr>
|
<attr path="/api/namespace/interface[@name='TagSetter']/method[@cname='gst_tag_setter_add_tag_values']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/interface[@name='TagSetter']/method[@cname='gst_tag_setter_add_tags']" name="hidden">1</attr>
|
<attr path="/api/namespace/interface[@name='TagSetter']/method[@cname='gst_tag_setter_add_tags']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/interface[@name='TagSetter']/method[@cname='gst_tag_setter_merge_tags']" name="name">AddTags</attr>
|
<attr path="/api/namespace/interface[@name='TagSetter']/method[@cname='gst_tag_setter_add_tag_value']" name="name">AddTag</attr>
|
||||||
|
<attr path="/api/namespace/interface[@name='TagSetter']/method[@cname='gst_tag_setter_merge_tags']" name="name">AddTag</attr>
|
||||||
|
|
||||||
<attr path="/api/namespace/callback[@name='TagMergeFunc']/parameters/parameter[@name='dest']" name="pass_as">out</attr>
|
<attr path="/api/namespace/callback[@name='TagMergeFunc']/parameters/parameter[@name='dest']" name="pass_as">out</attr>
|
||||||
<attr path="/api/namespace/callback[@name='TagMergeFunc']/parameters/parameter[@name='src']" name="pass_as">ref</attr>
|
<attr path="/api/namespace/callback[@name='TagMergeFunc']/parameters/parameter[@name='src']" name="pass_as">ref</attr>
|
||||||
|
|
|
@ -73,6 +73,25 @@ public uint Seqnum {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport("libgstreamer-0.10.dll") ]
|
||||||
|
static extern IntPtr gst_message_get_stream_status_object (IntPtr raw);
|
||||||
|
|
||||||
|
[DllImport("libgstreamer-0.10.dll") ]
|
||||||
|
static extern void gst_message_set_stream_status_object (IntPtr raw, ref Gst.GLib.Value o);
|
||||||
|
|
||||||
|
public GLib.Value StreamStatusObject {
|
||||||
|
get {
|
||||||
|
IntPtr raw_ret = gst_message_get_stream_status_object (Handle);
|
||||||
|
GLib.Value ret = (Gst.GLib.Value) Marshal.PtrToStructure (raw_ret, typeof (Gst.GLib.Value));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
if (!IsWritable)
|
||||||
|
throw new ApplicationException ();
|
||||||
|
|
||||||
|
gst_message_set_stream_status_object (Handle, ref value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private Gst.Structure cached_structure = null;
|
private Gst.Structure cached_structure = null;
|
||||||
|
|
||||||
|
@ -546,6 +565,8 @@ public void ParseInfo (out Enum error) {
|
||||||
|
|
||||||
[DllImport("libgstreamer-0.10.dll") ]
|
[DllImport("libgstreamer-0.10.dll") ]
|
||||||
static extern IntPtr gst_message_new_tag (IntPtr src, IntPtr tags);
|
static extern IntPtr gst_message_new_tag (IntPtr src, IntPtr tags);
|
||||||
|
[DllImport("libgstreamer-0.10.dll") ]
|
||||||
|
static extern IntPtr gst_message_new_tag_full (IntPtr src, IntPtr pad, IntPtr tags);
|
||||||
|
|
||||||
[DllImport("libgstreamer-0.10.dll") ]
|
[DllImport("libgstreamer-0.10.dll") ]
|
||||||
static extern IntPtr gst_tag_list_copy (IntPtr handle);
|
static extern IntPtr gst_tag_list_copy (IntPtr handle);
|
||||||
|
@ -556,20 +577,31 @@ public static Message NewTag (Gst.Object src, TagList tags) {
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport("libgstreamer-0.10.dll") ]
|
public static Message NewTag (Gst.Object src, Gst.Pad pad, TagList tags) {
|
||||||
static extern void gst_message_parse_tag (IntPtr msg, out IntPtr tags);
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_tag_full (src.Handle, pad.Handle, gst_tag_list_copy (tags.Handle)), true);
|
||||||
|
|
||||||
public void ParseTag (out TagList tags) {
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("libgstreamer-0.10.dll") ]
|
||||||
|
static extern void gst_message_parse_tag_full (IntPtr msg, out IntPtr pad, out IntPtr tags);
|
||||||
|
|
||||||
|
public void ParseTag (out Gst.Pad pad, out TagList tags) {
|
||||||
if (Type != MessageType.Tag)
|
if (Type != MessageType.Tag)
|
||||||
throw new ArgumentException ();
|
throw new ArgumentException ();
|
||||||
|
|
||||||
IntPtr raw_ptr;
|
IntPtr raw_ptr;
|
||||||
|
IntPtr raw_ptr2;
|
||||||
|
|
||||||
gst_message_parse_tag (Handle, out raw_ptr);
|
gst_message_parse_tag_full (Handle, out raw_ptr2, out raw_ptr);
|
||||||
if (raw_ptr == IntPtr.Zero)
|
if (raw_ptr == IntPtr.Zero)
|
||||||
tags = null;
|
tags = null;
|
||||||
else
|
else
|
||||||
tags = (TagList) Gst.GLib.Opaque.GetOpaque (raw_ptr, typeof (TagList), true);
|
tags = (TagList) Gst.GLib.Opaque.GetOpaque (raw_ptr, typeof (TagList), true);
|
||||||
|
if (raw_ptr2 == IntPtr.Zero)
|
||||||
|
pad = null;
|
||||||
|
else
|
||||||
|
pad = (Gst.Pad) Gst.GLib.Object.GetObject (raw_ptr2, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport("libgstreamer-0.10.dll") ]
|
[DllImport("libgstreamer-0.10.dll") ]
|
||||||
|
@ -861,3 +893,64 @@ public void ParseStructureChange (out StructureChangeType type, out Gst.Element
|
||||||
static Message () {
|
static Message () {
|
||||||
Gst.GLib.GType.Register (Message.GType, typeof (Message));
|
Gst.GLib.GType.Register (Message.GType, typeof (Message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport("libgstreamer-0.10.dll") ]
|
||||||
|
static extern IntPtr gst_message_new_step_done (IntPtr src, Gst.Format format, ulong amount, double rate, bool flush, bool intermediate, ulong duration, bool eos);
|
||||||
|
|
||||||
|
public static Message NewStepDone (Gst.Object src, Gst.Format format, ulong amount, double rate, bool flush, bool intermediate, ulong duration, bool eos) {
|
||||||
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_step_done (src.Handle, format, amount, rate, flush, intermediate, duration, eos), true);
|
||||||
|
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("libgstreamer-0.10.dll") ]
|
||||||
|
static extern void gst_message_parse_step_done (IntPtr msg, out Gst.Format format, out ulong amount, out double rate, out bool flush, out bool intermediate, out ulong duration, out bool eos);
|
||||||
|
|
||||||
|
public void ParseStepDone (out Gst.Format format, out ulong amount, out double rate, out bool flush, out bool intermediate, out ulong duration, out bool eos) {
|
||||||
|
if (Type != MessageType.StepDone)
|
||||||
|
throw new ArgumentException ();
|
||||||
|
|
||||||
|
gst_message_parse_step_done (Handle, out format, out amount, out rate, out flush, out intermediate, out duration, out eos);
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("libgstreamer-0.10.dll") ]
|
||||||
|
static extern IntPtr gst_message_new_step_start (IntPtr src, bool active, Gst.Format format, ulong amount, double rate, bool flush, bool intermediate);
|
||||||
|
|
||||||
|
public static Message NewStepDone (Gst.Object src, bool active, Gst.Format format, ulong amount, double rate, bool flush, bool intermediate) {
|
||||||
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_step_start (src.Handle, active, format, amount, rate, flush, intermediate), true);
|
||||||
|
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("libgstreamer-0.10.dll") ]
|
||||||
|
static extern void gst_message_parse_step_start (IntPtr msg, out bool active, out Gst.Format format, out ulong amount, out double rate, out bool flush, out bool intermediate);
|
||||||
|
|
||||||
|
public void ParseStepStart (out bool active, out Gst.Format format, out ulong amount, out double rate, out bool flush, out bool intermediate) {
|
||||||
|
if (Type != MessageType.StepStart)
|
||||||
|
throw new ArgumentException ();
|
||||||
|
|
||||||
|
gst_message_parse_step_start (Handle, out active, out format, out amount, out rate, out flush, out intermediate);
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("libgstreamer-0.10.dll") ]
|
||||||
|
static extern IntPtr gst_message_new_stream_status (IntPtr src, StreamStatusType type, IntPtr owner);
|
||||||
|
|
||||||
|
public static Message NewStreamStatus (Gst.Object src, StreamStatusType type, Gst.Element owner) {
|
||||||
|
Message msg = (Message) Gst.MiniObject.GetObject (gst_message_new_stream_status (src.Handle, type, owner.Handle), true);
|
||||||
|
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("libgstreamer-0.10.dll") ]
|
||||||
|
static extern void gst_message_parse_stream_status (IntPtr msg, out StreamStatusType type, out IntPtr owner);
|
||||||
|
|
||||||
|
public void ParseStreamStatus (out StreamStatusType type, out Gst.Element owner) {
|
||||||
|
if (Type != MessageType.StreamStatus)
|
||||||
|
throw new ArgumentException ();
|
||||||
|
|
||||||
|
IntPtr raw_ptr;
|
||||||
|
|
||||||
|
gst_message_parse_stream_status (Handle, out type, out raw_ptr);
|
||||||
|
owner = Gst.GLib.Object.GetObject (raw_ptr, false) as Gst.Element;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,9 +70,7 @@ public object Emit (string signal, params object[] parameters) {
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport("libgstreamer-0.10.dll") ]
|
[DllImport("libgstreamer-0.10.dll") ]
|
||||||
static extern void gst_object_sink (IntPtr raw);
|
static extern IntPtr gst_object_ref_sink (IntPtr raw);
|
||||||
[DllImport("libgstreamer-0.10.dll") ]
|
|
||||||
static extern IntPtr gst_object_ref (IntPtr raw);
|
|
||||||
|
|
||||||
protected override IntPtr Raw {
|
protected override IntPtr Raw {
|
||||||
get {
|
get {
|
||||||
|
@ -80,8 +78,7 @@ protected override IntPtr Raw {
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
if (value != IntPtr.Zero) {
|
if (value != IntPtr.Zero) {
|
||||||
gst_object_ref (value);
|
gst_object_ref_sink (value);
|
||||||
gst_object_sink (value);
|
|
||||||
}
|
}
|
||||||
base.Raw = value;
|
base.Raw = value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,20 @@ public Gst.PadChainFunction ChainFunction {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport("libgstreamer-0.10.dll") ]
|
||||||
|
static extern void gst_pad_set_chain_list_function (IntPtr raw, GstSharp.PadChainListFunctionNative chain);
|
||||||
|
|
||||||
|
public Gst.PadChainListFunction ChainListFunction {
|
||||||
|
set {
|
||||||
|
if (PersistentData["ChainListFunction"] != null)
|
||||||
|
PersistentData["ChainListFunction"] = null;
|
||||||
|
|
||||||
|
GstSharp.PadChainListFunctionWrapper value_wrapper = new GstSharp.PadChainListFunctionWrapper (value);
|
||||||
|
PersistentData["ChainListFunction"] = value_wrapper;
|
||||||
|
gst_pad_set_chain_list_function (Handle, value_wrapper.NativeDelegate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[DllImport("libgstreamer-0.10.dll") ]
|
[DllImport("libgstreamer-0.10.dll") ]
|
||||||
static extern void gst_pad_set_checkgetrange_function (IntPtr raw, GstSharp.PadCheckGetRangeFunctionNative check);
|
static extern void gst_pad_set_checkgetrange_function (IntPtr raw, GstSharp.PadCheckGetRangeFunctionNative check);
|
||||||
|
|
||||||
|
|
|
@ -57,17 +57,16 @@ public object this[string tag] {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport ("gstreamersharpglue-0.10.dll") ]
|
|
||||||
static extern void gstsharp_gst_tag_list_add_value (IntPtr list, Gst.TagMergeMode mode, IntPtr tag, ref Gst.GLib.Value v);
|
|
||||||
|
|
||||||
public void Add (Gst.TagMergeMode mode, string tag, object value) {
|
public void Add (Gst.TagMergeMode mode, string tag, object value) {
|
||||||
if (!Tag.Exists (tag))
|
if (!Tag.Exists (tag))
|
||||||
throw new ArgumentException (String.Format ("Invalid tag name '{0}'", tag));
|
throw new ArgumentException (String.Format ("Invalid tag name '{0}'", tag));
|
||||||
|
|
||||||
Gst.GLib.Value v = new Gst.GLib.Value (value);
|
Gst.GLib.Value v = new Gst.GLib.Value (value);
|
||||||
|
IntPtr raw_v = Gst.GLib.Marshaller.StructureToPtrAlloc (v);
|
||||||
|
|
||||||
IntPtr raw_string = Gst.GLib.Marshaller.StringToPtrGStrdup (tag);
|
IntPtr raw_string = Gst.GLib.Marshaller.StringToPtrGStrdup (tag);
|
||||||
gstsharp_gst_tag_list_add_value (Handle, mode, raw_string, ref v);
|
gst_tag_list_add_value (Handle, (int) mode, raw_string, raw_v);
|
||||||
|
Marshal.FreeHGlobal (raw_v);
|
||||||
v.Dispose ();
|
v.Dispose ();
|
||||||
Gst.GLib.Marshaller.Free (raw_string);
|
Gst.GLib.Marshaller.Free (raw_string);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,6 @@ libgstreamersharpglue_0_10_la_SOURCES = \
|
||||||
message.c \
|
message.c \
|
||||||
event.c \
|
event.c \
|
||||||
structure.c \
|
structure.c \
|
||||||
taglist.c \
|
|
||||||
task.c \
|
task.c \
|
||||||
object.c \
|
object.c \
|
||||||
pad.c \
|
pad.c \
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
#include <gst/gst.h>
|
|
||||||
|
|
||||||
void
|
|
||||||
gstsharp_gst_tag_list_add_value (GstTagList * list, GstTagMergeMode mode,
|
|
||||||
const gchar * tag, const GValue * v)
|
|
||||||
{
|
|
||||||
gst_tag_list_add_values (list, mode, tag, v, NULL);
|
|
||||||
}
|
|
Loading…
Reference in a new issue