Update plugin bindings, remove playbin/decodebin bindings and add ximagesink bindings

This commit is contained in:
Sebastian Dröge 2009-11-25 10:07:42 +01:00
parent 811784dec7
commit 19fa46759b
13 changed files with 143 additions and 464 deletions

View file

@ -154,7 +154,7 @@ coreplugins/generated: $(API) $(srcdir)/coreplugins/*.metadata $(srcdir)/coreplu
$(MAKE) -C coreplugins
baseplugins/generated/*.cs: $(API) $(builddir)/baseplugins/generated
baseplugins/generated: $(API) $(srcdir)/baseplugins/*.custom $(srcdir)/baseplugins/*.metadata $(srcdir)/baseplugins/inspect/*.raw
baseplugins/generated: $(API) $(srcdir)/baseplugins/*.metadata $(srcdir)/baseplugins/inspect/*.raw
$(MAKE) -C baseplugins
$(KEYFILE): $(top_srcdir)/gstreamer-sharp.snk

View file

@ -1,13 +1,12 @@
ELEMENTS = decodebin playbin xvimagesink decodebin2 playbin2
ELEMENTS = ximagesink xvimagesink decodebin2 playbin2
NAMESPACE = Gst.BasePlugins
INSPECT_FILES = $(patsubst %,$(srcdir)/inspect/%.raw,$(ELEMENTS))
CUSTOM_FILES = $(srcdir)/playbin.custom
METADATA_FILES = $(srcdir)/decodebin.metadata $(srcdir)/playbin.metadata $(srcdir)/decodebin2.metadata $(srcdir)/playbin2.metadata
METADATA_FILES = $(srcdir)/decodebin2.metadata $(srcdir)/playbin2.metadata
CS_FILES = $(patsubst %,$(builddir)/generated/%.cs,$(ELEMENTS))
XML_FILES = $(patsubst %,$(builddir)/%.xml,$(ELEMENTS))
EXTRA_DIST = $(METADATA_FILES) $(CUSTOM_FILES) $(INSPECT_FILES)
EXTRA_DIST = $(METADATA_FILES) $(INSPECT_FILES)
CLEANFILES = $(XML_FILES) $(CS_FILES)
plugins-update: $(patsubst $(srcdir)/inspect/%.raw, inspect-%, $(INSPECT_FILES))
@ -17,7 +16,7 @@ inspect-%:
all: $(XML_FILES) $(CS_FILES)
touch generated
generated/%.cs: $(top_builddir)/elementgen/element-gen.exe $(top_builddir)/gstreamer-sharp/gstreamer-api.xml $(CUSTOM_FILES) $(builddir)/%.xml
generated/%.cs: $(top_builddir)/elementgen/element-gen.exe $(top_builddir)/gstreamer-sharp/gstreamer-api.xml $(builddir)/%.xml
@mkdir -p generated
$(MONO) $(top_builddir)/elementgen/element-gen.exe --namespace=$(NAMESPACE) \
--api=$(top_builddir)/gstreamer-sharp/gstreamer-api.xml --input=$(patsubst generated/%.cs,$(builddir)/%.xml,$@) --customfile=$(patsubst generated/%.cs,$(srcdir)/%.custom,$@) --interfacesdir=$(top_srcdir)/elementgen/interfaces > $@

View file

@ -1,8 +0,0 @@
<?xml version="1.0"?>
<metadata>
<attr path="/element/element-signals/signal/name[child::text()='new-decoded-pad']/../params/type[1]" name="name">Pad</attr>
<remove-node path="/element/element-signals/signal/name[child::text()='new-decoded-pad']/../params/type[2]" />
<attr path="/element/element-signals/signal/name[child::text()='removed-decoded-pad']/../params/type[1]" name="name">Pad</attr>
<attr path="/element/element-signals/signal/name[child::text()='unknown-type']/../params/type[1]" name="name">Pad</attr>
<attr path="/element/element-signals/signal/name[child::text()='unknown-type']/../params/type[2]" name="name">Caps</attr>
</metadata>

View file

@ -1,103 +0,0 @@
<element>
<name>decodebin</name>
<details>
<long-name>Decoder Bin</long-name>
<class>Generic/Bin/Decoder</class>
<description>Autoplug and decode to raw media</description>
<authors>Wim Taymans &lt;wim.taymans@gmail.com&gt;</authors>
</details>
<object name="GstDecodeBin">
<object name="GstBin">
<object name="GstElement">
<object name="GstObject">
<object name="GObject">
</object>
</object>
</object>
</object>
</object>
<interfaces>
<interface name="GstChildProxy" />
</interfaces>
<pad-templates>
<pad-template>
<name>src%d</name>
<direction>src</direction>
<presence>sometimes</presence>
<caps>ANY</caps>
</pad-template>
<pad-template>
<name>sink</name>
<direction>sink</direction>
<presence>always</presence>
<caps>ANY</caps>
</pad-template>
</pad-templates>
<element-flags>
</element-flags>
<bin-flags>
</bin-flags>
<element-implementation>
<state-change function="gst_decode_bin_change_state"/>
<save function="gst_bin_save_thyself"/>
<load function="gst_bin_restore_thyself"/>
</element-implementation>
<clocking-interaction>
<requires-clock/>
</clocking-interaction>
<indexing-capabilities/>
<pads>
<pad>
<name>sink</name>
<direction>sink</direction>
<implementation>
<chain-based function="gst_proxy_pad_do_chain"/>
<event-function function="gst_proxy_pad_do_event"/>
<query-function function="gst_proxy_pad_do_query"/>
<query-type-func function="gst_proxy_pad_do_query_type">
</query-type-func>
<bufferalloc-function function="gst_proxy_pad_do_bufferalloc"/>
</implementation>
</pad>
</pads>
<element-properties>
<element-property>
<name>sink-caps</name>
<type>GstCaps</type>
<nick>Sink Caps</nick>
<blurb>The caps of the input data. (NULL = use typefind element)</blurb>
<flags>RW</flags>
<default>NULL</default>
</element-property>
</element-properties>
<element-signals>
<signal>
<name>new-decoded-pad</name>
<return-type>void</return-type>
<object-type>GstDecodeBin</object-type>
<params>
<type>GstPad</type>
<type>gboolean</type>
</params>
</signal>
<signal>
<name>removed-decoded-pad</name>
<return-type>void</return-type>
<object-type>GstDecodeBin</object-type>
<params>
<type>GstPad</type>
</params>
</signal>
<signal>
<name>unknown-type</name>
<return-type>void</return-type>
<object-type>GstDecodeBin</object-type>
<params>
<type>GstPad</type>
<type>GstCaps</type>
</params>
</signal>
</element-signals>
<element-actions>
</element-actions>
</element>

View file

@ -1,215 +0,0 @@
<element>
<name>playbin</name>
<details>
<long-name>Player Bin</long-name>
<class>Generic/Bin/Player</class>
<description>Autoplug and play media from an uri</description>
<authors>Wim Taymans &lt;wim.taymans@gmail.com&gt;</authors>
</details>
<object name="GstPlayBin">
<object name="GstPlayBaseBin">
<object name="GstPipeline">
<object name="GstBin">
<object name="GstElement">
<object name="GstObject">
<object name="GObject">
</object>
</object>
</object>
</object>
</object>
</object>
</object>
<interfaces>
<interface name="GstChildProxy" />
</interfaces>
<pad-templates>
</pad-templates>
<element-flags>
</element-flags>
<bin-flags>
</bin-flags>
<element-implementation>
<state-change function="gst_play_bin_change_state"/>
<save function="gst_bin_save_thyself"/>
<load function="gst_bin_restore_thyself"/>
</element-implementation>
<clocking-interaction>
<requires-clock/>
</clocking-interaction>
<indexing-capabilities/>
<pads>
</pads>
<element-properties>
<element-property>
<name>uri</name>
<type>gchararray</type>
<nick>URI</nick>
<blurb>URI of the media to play</blurb>
<flags>RW</flags>
<default>NULL</default>
</element-property>
<element-property>
<name>suburi</name>
<type>gchararray</type>
<nick>.sub-URI</nick>
<blurb>Optional URI of a subtitle</blurb>
<flags>RW</flags>
<default>NULL</default>
</element-property>
<element-property>
<name>queue-size</name>
<type>guint64</type>
<nick>Queue size</nick>
<blurb>Size of internal queues in nanoseconds</blurb>
<flags>RW</flags>
<range min="0" max="9223372036854775807"/>
<default>3000000000</default>
</element-property>
<element-property>
<name>queue-threshold</name>
<type>guint64</type>
<nick>Queue threshold</nick>
<blurb>Buffering threshold of internal queues in nanoseconds</blurb>
<flags>RW</flags>
<range min="0" max="9223372036854775807"/>
<default>2850000000</default>
</element-property>
<element-property>
<name>queue-min-threshold</name>
<type>guint64</type>
<nick>Queue min threshold</nick>
<blurb>Buffering low threshold of internal queues in nanoseconds</blurb>
<flags>RW</flags>
<range min="0" max="9223372036854775807"/>
<default>900000000</default>
</element-property>
<element-property>
<name>nstreams</name>
<type>gint</type>
<nick>NStreams</nick>
<blurb>number of streams</blurb>
<flags>R</flags>
<range min="0" max="2147483647"/>
<default>0</default>
</element-property>
<element-property>
<name>stream-info</name>
<type>gpointer</type>
<nick>Stream info</nick>
<blurb>List of streaminfo</blurb>
<flags>R</flags>
</element-property>
<element-property>
<name>stream-info-value-array</name>
<type>GValueArray</type>
<nick>StreamInfo GValueArray</nick>
<blurb>value array of streaminfo</blurb>
<flags>R</flags>
</element-property>
<element-property>
<name>source</name>
<type>GstElement</type>
<nick>Source</nick>
<blurb>Source element</blurb>
<flags>R</flags>
<object-type>GstElement</object-type>
</element-property>
<element-property>
<name>current-video</name>
<type>gint</type>
<nick>Current video</nick>
<blurb>Currently playing video stream (-1 = none)</blurb>
<flags>RW</flags>
<range min="-1" max="2147483647"/>
<default>-1</default>
</element-property>
<element-property>
<name>current-audio</name>
<type>gint</type>
<nick>Current audio</nick>
<blurb>Currently playing audio stream (-1 = none)</blurb>
<flags>RW</flags>
<range min="-1" max="2147483647"/>
<default>-1</default>
</element-property>
<element-property>
<name>current-text</name>
<type>gint</type>
<nick>Current text</nick>
<blurb>Currently playing text stream (-1 = none)</blurb>
<flags>RW</flags>
<range min="-1" max="2147483647"/>
<default>-1</default>
</element-property>
<element-property>
<name>subtitle-encoding</name>
<type>gchararray</type>
<nick>subtitle encoding</nick>
<blurb>Encoding to assume if input subtitles are not in UTF-8 encoding. If not set, the GST_SUBTITLE_ENCODING environment variable will be checked for an encoding to use. If that is not set either, ISO-8859-15 will be assumed.</blurb>
<flags>RW</flags>
<default>NULL</default>
</element-property>
<element-property>
<name>connection-speed</name>
<type>guint</type>
<nick>Connection Speed</nick>
<blurb>Network connection speed in kbps (0 = unknown)</blurb>
<flags>RW</flags>
<range min="0" max="4294967295"/>
<default>0</default>
</element-property>
<element-property>
<name>audio-sink</name>
<type>GstElement</type>
<nick>Audio Sink</nick>
<blurb>the audio output element to use (NULL = default sink)</blurb>
<flags>RW</flags>
<object-type>GstElement</object-type>
</element-property>
<element-property>
<name>video-sink</name>
<type>GstElement</type>
<nick>Video Sink</nick>
<blurb>the video output element to use (NULL = default sink)</blurb>
<flags>RW</flags>
<object-type>GstElement</object-type>
</element-property>
<element-property>
<name>vis-plugin</name>
<type>GstElement</type>
<nick>Vis plugin</nick>
<blurb>the visualization element to use (NULL = none)</blurb>
<flags>RW</flags>
<object-type>GstElement</object-type>
</element-property>
<element-property>
<name>volume</name>
<type>gdouble</type>
<nick>volume</nick>
<blurb>volume</blurb>
<flags>RW</flags>
<range min="0" max="10"/>
<default>1,000000</default>
</element-property>
<element-property>
<name>frame</name>
<type>GstBuffer</type>
<nick>Frame</nick>
<blurb>The last frame (NULL = no video available)</blurb>
<flags>R</flags>
</element-property>
<element-property>
<name>subtitle-font-desc</name>
<type>gchararray</type>
<nick>Subtitle font description</nick>
<blurb>Pango font description of font to be used for subtitle rendering</blurb>
<flags>W</flags>
<default>NULL</default>
</element-property>
</element-properties>
<element-signals>
</element-signals>
<element-actions>
</element-actions>
</element>

View file

@ -20,6 +20,7 @@
</object>
<interfaces>
<interface name="GstChildProxy" />
<interface name="GstStreamVolume" />
</interfaces>
<pad-templates>
</pad-templates>
@ -190,7 +191,7 @@
<blurb>The audio volume, 1.0=100%</blurb>
<flags>RW</flags>
<range min="0" max="10"/>
<default>1,000000</default>
<default>1.000000</default>
</element-property>
<element-property>
<name>mute</name>

View file

@ -0,0 +1,117 @@
<element>
<name>ximagesink</name>
<details>
<long-name>Video sink</long-name>
<class>Sink/Video</class>
<description>A standard X based videosink</description>
<authors>Julien Moutte &lt;julien@moutte.net&gt;</authors>
</details>
<object name="GstXImageSink">
<object name="GstVideoSink">
<object name="GstBaseSink">
<object name="GstElement">
<object name="GstObject">
<object name="GObject">
</object>
</object>
</object>
</object>
</object>
</object>
<interfaces>
<interface name="GstImplementsInterface" />
<interface name="GstNavigation" />
<interface name="GstXOverlay" />
</interfaces>
<pad-templates>
<pad-template>
<name>sink</name>
<direction>sink</direction>
<presence>always</presence>
<caps>video/x-raw-rgb, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]</caps>
</pad-template>
</pad-templates>
<element-flags>
</element-flags>
<element-implementation>
<state-change function="0x2b81a6fc5480"/>
<save function="gst_element_save_thyself"/>
<load function="gst_element_restore_thyself"/>
</element-implementation>
<clocking-interaction>
</clocking-interaction>
<pads>
<pad>
<name>sink</name>
<direction>sink</direction>
<template>sink</template>
<implementation>
<chain-based function="gst_base_sink_chain"/>
<event-function function="gst_base_sink_event"/>
<bufferalloc-function function="gst_base_sink_pad_buffer_alloc"/>
</implementation>
</pad>
</pads>
<element-properties>
<element-property>
<name>show-preroll-frame</name>
<type>gboolean</type>
<nick>Show preroll frame</nick>
<blurb>Whether to render video frames during preroll</blurb>
<flags>RW</flags>
<default>TRUE</default>
</element-property>
<element-property>
<name>display</name>
<type>gchararray</type>
<nick>Display</nick>
<blurb>X Display name</blurb>
<flags>RW</flags>
<default>NULL</default>
</element-property>
<element-property>
<name>synchronous</name>
<type>gboolean</type>
<nick>Synchronous</nick>
<blurb>When enabled, runs the X display in synchronous mode. (used only for debugging)</blurb>
<flags>RW</flags>
<default>FALSE</default>
</element-property>
<element-property>
<name>pixel-aspect-ratio</name>
<type>gchararray</type>
<nick>Pixel Aspect Ratio</nick>
<blurb>The pixel aspect ratio of the device</blurb>
<flags>RW</flags>
<default>NULL</default>
</element-property>
<element-property>
<name>force-aspect-ratio</name>
<type>gboolean</type>
<nick>Force aspect ratio</nick>
<blurb>When enabled, reverse caps negotiation (scaling) will respect original aspect ratio</blurb>
<flags>RW</flags>
<default>FALSE</default>
</element-property>
<element-property>
<name>handle-events</name>
<type>gboolean</type>
<nick>Handle XEvents</nick>
<blurb>When enabled, XEvents will be selected and handled</blurb>
<flags>RW</flags>
<default>TRUE</default>
</element-property>
<element-property>
<name>handle-expose</name>
<type>gboolean</type>
<nick>Handle expose</nick>
<blurb>When enabled, the current frame will always be drawn in response to X Expose events</blurb>
<flags>RW</flags>
<default>TRUE</default>
</element-property>
</element-properties>
<element-signals>
</element-signals>
<element-actions>
</element-actions>
</element>

View file

@ -55,6 +55,14 @@
</pad>
</pads>
<element-properties>
<element-property>
<name>show-preroll-frame</name>
<type>gboolean</type>
<nick>Show preroll frame</nick>
<blurb>Whether to render video frames during preroll</blurb>
<flags>RW</flags>
<default>TRUE</default>
</element-property>
<element-property>
<name>contrast</name>
<type>gint</type>

View file

@ -1,124 +0,0 @@
[Gst.GLib.Property ("stream-info-value-array") ]
public StreamInfo[] StreamInfos {
get {
Gst.GLib.Value val = GetProperty ("stream-info-value-array");
Gst.GLib.ValueArray va = (Gst.GLib.ValueArray) val;
StreamInfo[] ret = new StreamInfo[va.Count];
for (int i = 0; i < va.Count; i++)
ret[i] = (StreamInfo) va[i];
va.Dispose ();
val.Dispose ();
return ret;
}
}
public class StreamInfo : Gst.GLib.Object {
[Gst.GLib.Property ("object") ]
public Gst.Object Object {
get {
Gst.GLib.Value val = GetProperty ("object");
Gst.Object ret = (Gst.Object) val;
val.Dispose ();
return ret;
}
}
[Gst.GLib.Property ("type") ]
public StreamType Type {
get {
Gst.GLib.Value val = GetProperty ("type");
StreamType ret = (StreamType) val;
val.Dispose ();
return ret;
}
}
[Gst.GLib.Property ("decoder") ]
public string Decoder {
get {
Gst.GLib.Value val = GetProperty ("decoder");
string ret = (string) val;
val.Dispose ();
return ret;
}
}
[Gst.GLib.Property ("mute") ]
public bool Mute {
get {
Gst.GLib.Value val = GetProperty ("mute");
bool ret = (bool) val;
val.Dispose ();
return ret;
} set {
Gst.GLib.Value val = new Gst.GLib.Value (this, "mute");
val.Val = value;
SetProperty ("mute", val);
val.Dispose ();
}
}
[Gst.GLib.Property ("caps") ]
public Gst.Caps Caps {
get {
Gst.GLib.Value val = GetProperty ("caps");
Gst.Caps ret = (Gst.Caps) val;
val.Dispose ();
return ret;
}
}
[Gst.GLib.Property ("language-code") ]
public string LanguageCode {
get {
Gst.GLib.Value val = GetProperty ("language-code");
string ret = (string) val;
val.Dispose ();
return ret;
}
}
[Gst.GLib.Property ("codec") ]
public string Codec {
get {
Gst.GLib.Value val = GetProperty ("codec");
string ret = (string) val;
val.Dispose ();
return ret;
}
}
public delegate void MutedHandler (object o, MutedArgs args);
public class MutedArgs : Gst.GLib.SignalArgs {
public bool Mute {
get {
return (bool) Args[0];
}
}
}
public event MutedHandler Muted {
add {
DynamicSignal.Connect (this, "muted", value);
}
remove {
DynamicSignal.Disconnect (this, "muted", value);
}
}
[GTypeName ("GstStreamType") ]
public enum StreamType {
Unknown = 0,
Audio = 1,
Video = 2,
Text = 3,
Subpicture = 4,
Element = 5
}
}

View file

@ -1,5 +0,0 @@
<?xml version="1.0"?>
<metadata>
<attr path="/element/element-properties/element-property/name[child::text()='stream-info']/.." name="hidden">1</attr>
<attr path="/element/element-properties/element-property/name[child::text()='stream-info-value-array']/.." name="hidden">1</attr>
</metadata>

View file

@ -11,4 +11,5 @@
<attr path="/element/element-signals/signal/name[child::text()='audio-tags-changed']/../params/type[1]" name="name">index</attr>
<attr path="/element/element-signals/signal/name[child::text()='text-tags-changed']/../params/type[1]" name="name">index</attr>
<add-node path="/element/element-properties/element-property/name[child::text()='flags']/.."><managed_name>PlayFlags</managed_name></add-node>
<remove-node path="/element/element-properties/element-property/name[child::text()='mute']/.." />
</metadata>

View file

@ -81,6 +81,14 @@
<range min="0" max="4294967295"/>
<default>65536</default>
</element-property>
<element-property>
<name>append</name>
<type>gboolean</type>
<nick>Append</nick>
<blurb>Append to an already existing file</blurb>
<flags>RW</flags>
<default>FALSE</default>
</element-property>
</element-properties>
<element-signals>
</element-signals>

View file

@ -87,8 +87,8 @@
<nick>Drop Probability</nick>
<blurb>The Probability a buffer is dropped</blurb>
<flags>RW</flags>
<range min="0,000000" max="1,000000"/>
<default>0,000000</default>
<range min="0.000000" max="1.000000"/>
<default>0.000000</default>
</element-property>
<element-property>
<name>datarate</name>