[vlma-devel] commit: Fix some syntax errors in the sout. (Adrien Grand )

git version control git at videolan.org
Sun Jan 11 17:32:25 CET 2009


vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Sun Jan 11 17:30:19 2009 +0100| [08ebe9d41279c54430b2285426749b15e48be9df] | committer: Adrien Grand 

Fix some syntax errors in the sout.

> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=08ebe9d41279c54430b2285426749b15e48be9df
---

 .../java/org/videolan/vlma/order/OrderBuilder.java |   14 +++++++++-----
 .../java/org/videolan/vlma/order/OrderSender.java  |    2 +-
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/vlma-core/src/main/java/org/videolan/vlma/order/OrderBuilder.java b/vlma-core/src/main/java/org/videolan/vlma/order/OrderBuilder.java
index 27f9658..8b4495f 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/order/OrderBuilder.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/order/OrderBuilder.java
@@ -120,9 +120,9 @@ public class OrderBuilder {
         if (group.getMediaClass().isAssignableFrom(DVBMedia.class) || group.size() > 1) {
             sout.append("#duplicate{");
             for (Program program : group) {
-                sout.append("dst=\"");
+                sout.append("dst=");
                 buildDst(sout, program);
-                sout.append("\",");
+                sout.append(',');
             }
             sout.setCharAt(sout.length() - 1, '}');
         } else {
@@ -152,6 +152,7 @@ public class OrderBuilder {
 
     private void buildDst(StringBuilder dst, Program program) {
         if (program.getTranscodingStrategy() != null) {
+            dst.append('\'');
             buildTranscode(dst, program);
             dst.append(':');
         }
@@ -173,15 +174,18 @@ public class OrderBuilder {
                 program.getStreamingStrategy().getProtocol().getScheme(),
                 destination));
         if (program.getAnnouncingStrategy().isEnabled(Announcement.SAP)) {
-            dst.append(",sap,name=").append(program.getSapName());
+            dst.append(",sap,name=\"").append(program.getSapName()).append('\"');
             if (program.getSapGroup() != null && program.getSapGroup().length() > 0) {
-                dst.append(",group=").append(program.getSapGroup());
+                dst.append(",group=\"").append(program.getSapGroup()).append('\"');
             }
         }
+        dst.append('}');
         if (program.getMedia() instanceof DVBMedia) {
             dst.append(",select=\"program=").append(((DVBMedia)program.getMedia()).getSid()).append("\"");
         }
-        dst.append('}');
+        if (program.getTranscodingStrategy() != null) {
+            dst.append('\'');
+        }
     }
 
     /**
diff --git a/vlma-core/src/main/java/org/videolan/vlma/order/OrderSender.java b/vlma-core/src/main/java/org/videolan/vlma/order/OrderSender.java
index 107385b..735e48a 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/order/OrderSender.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/order/OrderSender.java
@@ -143,7 +143,7 @@ public class OrderSender {
             telnetCommand(conn, String.format("setup %s option %s", o.getName(), option), adapter);
         }
         if (o instanceof VLMBroadcast) {
-            telnetCommand(conn, String.format("setup %s output '%s'", o.getName(), o.getSout()), adapter);
+            telnetCommand(conn, String.format("setup %s output %s", o.getName(), o.getSout()), adapter);
         }
         telnetCommand(conn, String.format("control %s play", o.getName()), adapter);
     }



More information about the vlma-devel mailing list