[farsight2/master] Add "id" property to FsSession and FsStream

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


---
 gst-libs/gst/farsight/fs-session.c |   16 ++++++++++++++++
 gst-libs/gst/farsight/fs-stream.c  |   16 ++++++++++++++++
 2 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/gst-libs/gst/farsight/fs-session.c b/gst-libs/gst/farsight/fs-session.c
index 7a7c9e5..e9a5fd1 100644
--- a/gst-libs/gst/farsight/fs-session.c
+++ b/gst-libs/gst/farsight/fs-session.c
@@ -59,6 +59,7 @@ enum
 {
   PROP_0,
   PROP_MEDIA_TYPE,
+  PROP_ID,
   PROP_SINK_PAD,
   PROP_NATIVE_CODECS,
   PROP_NATIVE_CODECS_CONFIG,
@@ -147,6 +148,21 @@ fs_session_class_init (FsSessionClass *klass)
         G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
 
   /**
+   * FsSession:id:
+   *
+   * The ID of the session, the first number of the pads linked to this session
+   * will be this id
+   *
+   */
+  g_object_class_install_property (gobject_class,
+      PROP_ID,
+      g_param_spec_uint ("id",
+        "The ID of the session",
+        "This ID is used on pad related to this session",
+        0, G_MAXUINT, 0,
+        G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+
+  /**
    * FsSession:sink-pad:
    *
    * The Gstreamer sink pad that must be used to send media data on this
diff --git a/gst-libs/gst/farsight/fs-stream.c b/gst-libs/gst/farsight/fs-stream.c
index 6a6a13c..3eae44c 100644
--- a/gst-libs/gst/farsight/fs-stream.c
+++ b/gst-libs/gst/farsight/fs-stream.c
@@ -63,6 +63,7 @@ enum
 enum
 {
   PROP_0,
+  PROP_ID,
 #if 0
   /* TODO Do we really need this? */
   PROP_SOURCE_PADS,
@@ -155,6 +156,21 @@ fs_stream_class_init (FsStreamClass *klass)
   gobject_class->set_property = fs_stream_set_property;
   gobject_class->get_property = fs_stream_get_property;
 
+  /**
+   * FsStream:id:
+   *
+   * The ID of the stream, the second number of the pads linked to this stream
+   * will be this id
+   *
+   */
+  g_object_class_install_property (gobject_class,
+      PROP_ID,
+      g_param_spec_uint ("id",
+        "The ID of the stream",
+        "This ID is used on pad related to this stream",
+        0, G_MAXUINT, 0,
+        G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+
 #if 0
   /**
    * FsStream:source-pads:
-- 
1.5.6.5




More information about the farsight-commits mailing list