[Gtk-sharp-list] Gconf support for gst-sharp

Peter Johanson latexer@gentoo.org
Fri, 7 May 2004 01:19:10 -0400


--4bRzO86E/ozDv8r1
Content-Type: multipart/mixed; boundary="C7zPtVaVf+AK4Oqc"
Content-Disposition: inline


--C7zPtVaVf+AK4Oqc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

hey all,

glad to finally have anoncvs working for gst-sharp. Attached is a patch
to add support for the small bits of gconf support in gstreamer. In
particular, it lets you poll for the default sinks and sources, instead
of setting them by hand. Included in the patch is a change to
sample/PlayMp3.cs to demonstrate how this is done. I'd say this is
pretty important to bind, but that's just me. (:


-pete

--=20
Peter Johanson
<latexer@gentoo.org>

Key ID =3D 0x6EFA3917
Key fingerprint =3D A90A 2518 57B1 9D20 9B71  A2FF 8649 439B 6EFA 3917

--C7zPtVaVf+AK4Oqc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="gst-sharp-gconf-support.diff"
Content-Transfer-Encoding: quoted-printable

Index: gst-sharp/gst-api.raw
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /mono/gst-sharp/gst-sharp/gst-api.raw,v
retrieving revision 1.2
diff -u -b -B -r1.2 gst-api.raw
--- gst-sharp/gst-api.raw	5 May 2004 23:17:04 -0000	1.2
+++ gst-sharp/gst-api.raw	7 May 2004 05:16:24 -0000
@@ -5840,4 +5840,48 @@
       </method>
     </object>
   </namespace>
+  <namespace name=3D"Gst" library=3D"gstgconf-0.8">
+    <class name=3D"Gconf" cname=3D"GstGconf_">
+      <method name=3D"GetDefaultAudioSink" cname=3D"gst_gconf_get_default_=
audio_sink" shared=3D"true">
+        <return-type type=3D"GstElement*"/>
+      </method>
+      <method name=3D"GetDefaultAudioSrc" cname=3D"gst_gconf_get_default_a=
udio_src" shared=3D"true">
+        <return-type type=3D"GstElement*"/>
+      </method>
+      <method name=3D"GetDefaultVideoSink" cname=3D"gst_gconf_get_default_=
video_sink" shared=3D"true">
+        <return-type type=3D"GstElement*"/>
+      </method>
+      <method name=3D"GetDefaultVideoSrc" cname=3D"gst_gconf_get_default_v=
ideo_src" shared=3D"true">
+        <return-type type=3D"GstElement*"/>
+      </method>
+      <method name=3D"GetDefaultVisualizationElement" cname=3D"gst_gconf_g=
et_default_visualization_element" shared=3D"true">
+        <return-type type=3D"GstElement*"/>
+      </method>
+      <method name=3D"GetString" cname=3D"gst_gconf_get_string" shared=3D"=
true">
+        <return-type type=3D"gchar*"/>
+        <parameters>
+          <parameter type=3D"const-gchar*" name=3D"key"/>
+        </parameters>
+      </method>
+      <method name=3D"RenderBinFromDescription" cname=3D"gst_gconf_render_=
bin_from_description" shared=3D"true">
+        <return-type type=3D"GstElement*"/>
+        <parameters>
+          <parameter type=3D"const-gchar*" name=3D"description"/>
+        </parameters>
+      </method>
+      <method name=3D"RenderBinFromKey" cname=3D"gst_gconf_render_bin_from=
_key" shared=3D"true">
+        <return-type type=3D"GstElement*"/>
+        <parameters>
+          <parameter type=3D"const-gchar*" name=3D"key"/>
+        </parameters>
+      </method>
+      <method name=3D"SetString" cname=3D"gst_gconf_set_string" shared=3D"=
true">
+        <return-type type=3D"void"/>
+        <parameters>
+          <parameter type=3D"const-gchar*" name=3D"key"/>
+          <parameter type=3D"const-gchar*" name=3D"value"/>
+        </parameters>
+      </method>
+    </class>
+  </namespace>
 </api>
Index: gst-sharp/gst-sharp.dll.config.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /mono/gst-sharp/gst-sharp/gst-sharp.dll.config.in,v
retrieving revision 1.2
diff -u -b -B -r1.2 gst-sharp.dll.config.in
--- gst-sharp/gst-sharp.dll.config.in	5 May 2004 23:17:04 -0000	1.2
+++ gst-sharp/gst-sharp.dll.config.in	7 May 2004 05:16:24 -0000
@@ -3,4 +3,5 @@
   <dllmap dll=3D"libgobject-2.0-0.dll" target=3D"libgobject-2.0@LIB_PREFIX=
@.0@LIB_SUFFIX@"/>
   <dllmap dll=3D"gstreamer-0.8" target=3D"libgstreamer-0.8@LIB_PREFIX@.1@L=
IB_SUFFIX@"/>
   <dllmap dll=3D"gstplay-0.8" target=3D"libgstplay-0.8@LIB_PREFIX@.0@LIB_S=
UFFIX@"/>
+  <dllmap dll=3D"gstgconf-0.8" target=3D"libgstgconf-0.8@LIB_PREFIX@.0@LIB=
_SUFFIX@"/>
 </configuration>
Index: sample/PlayMp3.cs
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /mono/gst-sharp/sample/PlayMp3.cs,v
retrieving revision 1.1.1.1
diff -u -b -B -r1.1.1.1 PlayMp3.cs
--- sample/PlayMp3.cs	28 Apr 2004 13:39:09 -0000	1.1.1.1
+++ sample/PlayMp3.cs	7 May 2004 05:16:24 -0000
@@ -27,17 +27,17 @@
 		Element mad =3D ElementFactory.Make ("mad", "mad");
 	=09
 		// Create the audio sink
-		Element osssink =3D ElementFactory.Make ("osssink", "osssink");
+		Element sink =3D Gst.Gconf.DefaultAudioSink;
 	=09
=20
 		// add the elements to the main pipeline
 		bin.Add (filesrc);
 		bin.Add (mad);
-		bin.Add (osssink);
+		bin.Add (sink);
    =20
 		// connect the elements
 		filesrc.Link (mad);
-		mad.Link (osssink);
+		mad.Link (sink);
 	=09
 		// start playing
 		bin.SetState (ElementState.Playing);
Index: source/gst-sharp-source.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /mono/gst-sharp/source/gst-sharp-source.xml,v
retrieving revision 1.2
diff -u -b -B -r1.2 gst-sharp-source.xml
--- source/gst-sharp-source.xml	5 May 2004 23:17:05 -0000	1.2
+++ source/gst-sharp-source.xml	7 May 2004 05:16:24 -0000
@@ -14,5 +14,10 @@
 		<dir>gst-plugins-0.8.1/gst-libs/gst/play</dir>
       </namespace>
     </library>
+    <library name=3D"gstgconf-0.8">
+      <namespace name=3D"Gst">
+		<dir>gst-plugins-0.8.1/gst-libs/gst/gconf</dir>
+      </namespace>
+    </library>
   </api>
 </gapi-parser-input>

--C7zPtVaVf+AK4Oqc--

--4bRzO86E/ozDv8r1
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAmxxOhklDm276ORcRAkgRAKC2Y9zsshG/+VJ+S2xR0d2McViFbgCgoZpk
8fr22Pc5b1EobsjQ9BcH0Vk=
=d+41
-----END PGP SIGNATURE-----

--4bRzO86E/ozDv8r1--