test: Coding style fixes
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Tue, 12 Jan 2010 15:28:16 +0000 (17:28 +0200)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Tue, 12 Jan 2010 15:35:13 +0000 (17:35 +0200)
src/plugins/test/rygel-test-audio-item.vala
src/plugins/test/rygel-test-video-item.vala

index 27d6ecb..541b272 100644 (file)
@@ -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;
         }
     }
 }
index d2b3f46..ed1f55f 100644 (file)
@@ -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;
         }
     }
 }