[farsight2/master] Add FsElementAddedNotifier to the python bindings

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:21:17 PST 2008


---
 python/pyfarsight.defs     |   55 +++++++++++++++++++++++++++++++++++++++++++-
 python/pyfarsight.override |    3 +-
 python/rebuild-defs.sh     |    1 +
 3 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/python/pyfarsight.defs b/python/pyfarsight.defs
index 1a5fa52..22762a9 100644
--- a/python/pyfarsight.defs
+++ b/python/pyfarsight.defs
@@ -515,7 +515,7 @@
   (c-name "fs_stream_emit_src_pad_added")
   (return-type "none")
   (parameters
-    '("GstPad*" "ghostpad")
+    '("GstPad*" "pad")
     '("FsCodec*" "codec")
   )
 )
@@ -523,6 +523,59 @@
 
 ;; -*- scheme -*-
 ; object definitions ...
+(define-object ElementAddedNotifier
+  (in-module "Fs")
+  (parent "GObject")
+  (c-name "FsElementAddedNotifier")
+  (gtype-id "FS_TYPE_ELEMENT_ADDED_NOTIFIER")
+)
+
+;; Enumerations and flags ...
+
+
+;; From fs-element-added-notifier.h
+
+(define-function fs_element_added_notifier_get_type
+  (c-name "fs_element_added_notifier_get_type")
+  (return-type "GType")
+)
+
+(define-function fs_element_added_notifier_new
+  (c-name "fs_element_added_notifier_new")
+  (is-constructor-of "FsElementAddedNotifier")
+  (return-type "FsElementAddedNotifier*")
+)
+
+(define-method add
+  (of-object "FsElementAddedNotifier")
+  (c-name "fs_element_added_notifier_add")
+  (return-type "none")
+  (parameters
+    '("GstBin*" "bin")
+  )
+)
+
+(define-method remove
+  (of-object "FsElementAddedNotifier")
+  (c-name "fs_element_added_notifier_remove")
+  (return-type "gboolean")
+  (parameters
+    '("GstBin*" "bin")
+  )
+)
+
+(define-method set_properties_from_keyfile
+  (of-object "FsElementAddedNotifier")
+  (c-name "fs_element_added_notifier_set_properties_from_keyfile")
+  (return-type "none")
+  (parameters
+    '("GKeyFile*" "keyfile")
+  )
+)
+
+
+;; -*- scheme -*-
+; object definitions ...
 ;; Enumerations and flags ...
 
 
diff --git a/python/pyfarsight.override b/python/pyfarsight.override
index 68d0a48..8d255c0 100644
--- a/python/pyfarsight.override
+++ b/python/pyfarsight.override
@@ -9,7 +9,7 @@ headers
 #include "fs-enum-types.h"
 
 #include "fs-transmitter.h"
-
+#include "fs-element-added-notifier.h"
 
 static PyObject *
 _fs_boxed_list_from_value (const GValue *value, GType listtype, GType type)
@@ -117,6 +117,7 @@ ignore
 %%
 import gobject.GObject as PyGObject_Type
 import gst.Pad as PyGstPad_Type
+import gst.Bin as PyGstBin_Type
 %%
 init
 pyg_register_gtype_custom (FS_TYPE_CODEC_LIST,
diff --git a/python/rebuild-defs.sh b/python/rebuild-defs.sh
index 42e478c..91b565e 100755
--- a/python/rebuild-defs.sh
+++ b/python/rebuild-defs.sh
@@ -7,6 +7,7 @@ HEADERS=" \
     fs-session.h \
     fs-participant.h \
     fs-stream.h \
+    fs-element-added-notifier.h \
     fs-enum-types.h"
 
 srcdir=../gst-libs/gst/farsight/
-- 
1.5.6.5




More information about the farsight-commits mailing list