--- /dev/null
+ [DllImport("gstreamer-0.10")]
+ static extern IntPtr gst_mini_object_ref (IntPtr buf);
+
+ public void Ref()
+ {
+ IntPtr tmp = gst_mini_object_ref(this.Handle);
+ }
+
+ [DllImport("gstreamer-0.10")]
+ static extern void gst_mini_object_unref(IntPtr buf);
+
+ public void Unref()
+ {
+ gst_mini_object_unref(this.Handle);
+ }
+
+ [DllImport("gstreamersharpglue-0.10")]
+ static extern uint gstsharp_gst_buffer_refcount(IntPtr buf);
+
+ public uint Refcount
+ {
+ get {
+ return gstsharp_gst_buffer_refcount(this.Handle);
+ }
+ }
<attr path="/api/namespace/object[@cname='GstPipeline']/method[@name='GetBus']/return-type" name="owned">true</attr>
<attr path="/api/namespace/object[@name='ElementFactory']/method[@name='Make']/return-type" name="owned">true</attr>
+ <!-- for GstController's object func -->
+ <attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_control_properties']" name="hidden">true</attr>
+ <attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_get_controller']" name="hidden">true</attr>
+ <attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_get_value_array']" name="hidden">true</attr>
+ <attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_get_value_arrays']" name="hidden">true</attr>
+ <attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_set_controller']" name="hidden">true</attr>
+ <attr path="/api/namespace/object[@name='Object']/method[@cname='gst_object_sync_values']" name="hidden">true</attr>
+
<attr path="/api/namespace/boxed[@name='Caps']/method[@name='FromString']/return-type" name="owned">true</attr>
<attr path="/api/namespace/object[@name='Buffer']/method[@name='GetCaps']/return-type" name="owned">true</attr>
<attr path="/api/namespace/object[@name='Object']/field[@name='Refcount']" name="hidden">1</attr>
--- /dev/null
+
+ public int Refcount {
+ get { return this.RefCount; }
+ }
+
+
+ public override void Dispose() {
+ if(this.Handle != IntPtr.Zero) {
+ Gst.Object.Unref(this.Handle);
+ this.Raw = IntPtr.Zero;
+ }
+ }
+
<?xml version="1.0"?>
-<api
- ><!--
+<api>
+ <!--
This file was automatically generated.
Please DO NOT MODIFY THIS FILE, modify .metadata files instead.
---><namespace name="Gst" library="gstreamer-0.10.dll">
+-->
+ <namespace name="Gst" library="gstreamer-0.10.dll">
<enum name="ActivateMode" cname="GstActivateMode" type="enum">
<member cname="GST_ACTIVATE_NONE" name="None" />
<member cname="GST_ACTIVATE_PUSH" name="Push" />
<parameter type="const-GValue*" name="value2" />
</parameters>
</method>
- </class></namespace></api>
\ No newline at end of file
+ </class>
+ </namespace>
+</api>
\ No newline at end of file
metadata.exe: $(srcdir)/MetaData.cs $(assemblies)
$(CSC) -out:$@ $(GLIBSHARP_LIBS) $(references) $(srcdir)/MetaData.cs
+mp3launchparse.exe: $(srcdir)/MP3LaunchParse.cs $(assemblies)
+ $(CSC) -out:$@ $(GLIBSHARP_LIBS) $(references) $(srcdir)/MP3LaunchParse.cs
+
link:
ln -sf $(top_builddir)/gstreamer-sharp/gstreamer-sharp.dll gstreamer-sharp.dll
ln -sf $(top_builddir)/gstreamer-sharp/gstreamer-sharp.dll.config gstreamer-sharp.dll.config
static void PrintTag( TagList list, string tag) {
uint count = list.GetTagSize(tag);
-
+ Console.WriteLine("Tags found = " + count);
for(uint i =0; i < count; i++)
{
string str;
}
}
- static bool MessageLoop(Element element, TagList tags)
+ static bool MessageLoop(Element element, ref TagList tags)
{
Bus bus = element.Bus;
bool done = false;
case MessageType.Error:
string error;
message.ParseError(out error);
- Console.Error.WriteLine("Error: {0}", error);
message.Dispose();
return true;
case MessageType.Eos:
else {
tags = new_tags;
}
- new_tags.Dispose();
+ //tags.Foreach(PrintTag);
+ //new_tags.Dispose();
break;
}
default:
bin.AddMany(source, decodebin);
if(!source.Link(decodebin))
Console.Error.WriteLine("filesrc could not be linked with decodebin");
- //decodebin.Dispose();
+ decodebin.Dispose();
}
public static void Main(string [] args)
continue;
}
- if(!MessageLoop(pipeline, tags)) {
+ if(!MessageLoop(pipeline, ref tags)) {
Console.Error.WriteLine("Failed in message reading for {0}", args[i]);
}
if(tags != null) {
Console.WriteLine("Metadata for {0}:", args[i]);
- tags.Foreach(PrintTag);
+ tags.Foreach(new TagForeachFunc(PrintTag));
tags.Dispose();
tags = null;
} else Console.Error.WriteLine("No metadata found for {0}", args[0]);
<gapi-parser-input>
<api filename="../gstreamer-sharp/gstreamer-api.raw">
+<!--
+ <library name="gstcontroller-0.10.dll">
+ <namespace name="Gst">
+ <dir>gstreamer-0.10.3/libs/gst/controller</dir>
+ </namespace>
+ </library>
+-->
<library name="gstreamer-0.10.dll">
<namespace name="Gst">
<dir>gstreamer-0.10.3/gst</dir>
<exclude>gstreamer-0.10.3/gst/gsturi.h</exclude>
</namespace>
</library>
-<!--
- <library name="gstcontroller-0.10.dll">
- <namespace name="Gst">
- <dir>gstreamer-0.10.3/libs/gst/controller</dir>
- </namespace>
- </library>
--->
</api>
</gapi-parser-input>