[rygel] test: Coding style fixes



commit f534f9bfd70cf71d1146025e751a187903170d54
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Jan 12 17:28:16 2010 +0200

    test: Coding style fixes

 src/plugins/test/rygel-test-audio-item.vala |   10 ++++++----
 src/plugins/test/rygel-test-video-item.vala |   12 ++++++++----
 2 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/src/plugins/test/rygel-test-audio-item.vala b/src/plugins/test/rygel-test-audio-item.vala
index 27d6ecb..541b272 100644
--- a/src/plugins/test/rygel-test-audio-item.vala
+++ b/src/plugins/test/rygel-test-audio-item.vala
@@ -30,7 +30,8 @@ using Gst;
  * Represents Test audio item.
  */
 public class Rygel.TestAudioItem : Rygel.TestItem {
-    const string TEST_MIMETYPE = "audio/x-wav";
+    private const string TEST_MIMETYPE = "audio/x-wav";
+    private const string PIPELINE = "audiotestsrc is-live=1 ! wavenc";
 
     public TestAudioItem (string         id,
                           MediaContainer parent,
@@ -44,10 +45,11 @@ public class Rygel.TestAudioItem : Rygel.TestItem {
 
     public override Element? create_stream_source () {
         try {
-          return Gst.parse_bin_from_description ("audiotestsrc is-live=1 ! wavenc", true);
+            return Gst.parse_bin_from_description (PIPELINE, true);
         } catch (Error err) {
-          warning ("Required plugin missing (%s)", err.message);
-          return null;
+            warning ("Required plugin missing (%s)", err.message);
+
+            return null;
         }
     }
 }
diff --git a/src/plugins/test/rygel-test-video-item.vala b/src/plugins/test/rygel-test-video-item.vala
index d2b3f46..ed1f55f 100644
--- a/src/plugins/test/rygel-test-video-item.vala
+++ b/src/plugins/test/rygel-test-video-item.vala
@@ -30,7 +30,10 @@ using Gst;
  * Represents Test video item.
  */
 public class Rygel.TestVideoItem : Rygel.TestItem {
-    const string TEST_MIMETYPE = "video/mpeg";
+    private const string TEST_MIMETYPE = "video/mpeg";
+    private const string PIPELINE = "videotestsrc is-live=1 ! " +
+                                    "ffenc_mpeg2video ! " +
+                                    "mpegtsmux";
 
     public TestVideoItem (string         id,
                           MediaContainer parent,
@@ -44,10 +47,11 @@ public class Rygel.TestVideoItem : Rygel.TestItem {
 
     public override Element? create_stream_source () {
         try {
-          return Gst.parse_bin_from_description ("videotestsrc is-live=1 ! ffenc_mpeg2video ! mpegtsmux", true);
+            return Gst.parse_bin_from_description (PIPELINE, true);
         } catch (Error err) {
-          warning ("Required plugin missing (%s)", err.message);
-          return null;
+            warning ("Required plugin missing (%s)", err.message);
+
+            return null;
         }
     }
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]