summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/lib/telepathy-farstream-sections.txt1
-rw-r--r--python/pytpfarstream.defs10
-rw-r--r--telepathy-farstream/content-priv.h3
-rw-r--r--telepathy-farstream/content.c26
-rw-r--r--telepathy-farstream/content.h3
5 files changed, 43 insertions, 0 deletions
diff --git a/doc/lib/telepathy-farstream-sections.txt b/doc/lib/telepathy-farstream-sections.txt
index f1acf12..bec8dda 100644
--- a/doc/lib/telepathy-farstream-sections.txt
+++ b/doc/lib/telepathy-farstream-sections.txt
@@ -9,6 +9,7 @@ tf_init
TfContent
TfContentClass
tf_content_error
+tf_content_iterate_src_pads
<SUBSECTION Private>
TfContentPrivate
<SUBSECTION Standard>
diff --git a/python/pytpfarstream.defs b/python/pytpfarstream.defs
index de62900..86cacf2 100644
--- a/python/pytpfarstream.defs
+++ b/python/pytpfarstream.defs
@@ -105,6 +105,16 @@
(varargs #t)
)
+(define-method iterate_src_pads
+ (of-object "TfContent")
+ (c-name "tf_content_iterate_src_pads")
+ (return-type "GstIterator*")
+ (parameters
+ '("guint*" "handle")
+ '("guint" "handle_count")
+ )
+)
+
;; -*- scheme -*-
; object definitions ...
diff --git a/telepathy-farstream/content-priv.h b/telepathy-farstream/content-priv.h
index bc642bf..d1ffc21 100644
--- a/telepathy-farstream/content-priv.h
+++ b/telepathy-farstream/content-priv.h
@@ -22,6 +22,9 @@ struct _TfContentClass{
guint reason, /* TfFutureContentRemovalReason */
const gchar *detailed_reason,
const gchar *message);
+
+ GstIterator * (*iterate_src_pads) (TfContent *content, guint *handle,
+ guint handle_count);
};
gboolean _tf_content_start_sending (TfContent *self);
diff --git a/telepathy-farstream/content.c b/telepathy-farstream/content.c
index 09f0ce0..033bdf5 100644
--- a/telepathy-farstream/content.c
+++ b/telepathy-farstream/content.c
@@ -288,3 +288,29 @@ tf_content_error (TfContent *content,
tf_content_error_literal (content, reason, detailed_reason, message);
g_free (message);
}
+
+/**
+ * tf_content_iterate_src_pads:
+ * @content: a #TfContent
+ * @handles: a 0 terminated array of #guint representing Telepathy handles
+ * @handle_count: the numner of handles in @handles
+ *
+ * Provides a iterator that can be used to iterate through all of the src
+ * pads that are are used to receive from a group of Telepathy handles.
+ *
+ * Returns: a #GstIterator
+ */
+
+GstIterator *
+tf_content_iterate_src_pads (TfContent *content, guint *handles,
+ guint handle_count)
+{
+ TfContentClass *klass = TF_CONTENT_GET_CLASS (content);
+
+ if (klass->iterate_src_pads)
+ return klass->iterate_src_pads (content, handles, handle_count);
+ else
+ GST_WARNING ("iterate_src_pads not defined in class");
+
+ return NULL;
+}
diff --git a/telepathy-farstream/content.h b/telepathy-farstream/content.h
index abd2a98..e6b6d3b 100644
--- a/telepathy-farstream/content.h
+++ b/telepathy-farstream/content.h
@@ -56,6 +56,9 @@ void tf_content_error (TfContent *content,
const gchar *detailed_reason,
const gchar *message, ...) G_GNUC_PRINTF (4, 5);
+GstIterator *tf_content_iterate_src_pads (TfContent *content,
+ guint *handle, guint handle_count);
+
G_END_DECLS
#endif /* __TF_CONTENT_H__ */