[vlma-devel] commit: Replace UDP streaming strategy by UDP_Multicast streaming strategy in order to specify a bit more the meaning of this option . (Adrien Maglo )

git version control git at videolan.org
Sat Jul 19 15:52:33 CEST 2008


vlma | branch: master | Adrien Maglo <magsoft at videolan.org> | Sat Jul 19 15:54:33 2008 +0200| [f2c433213ecf2e3d43f51379ec04a6e54d82fcf5]

Replace UDP streaming strategy by UDP_Multicast streaming strategy in order to specify a bit more the meaning of this option.

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

 .../src/main/java/org/videolan/vlma/IpBank.java    |    2 +-
 .../java/org/videolan/vlma/VLMaServiceImpl.java    |   12 ++++++------
 vlma-daemon/src/main/resources/config.properties   |    2 +-
 .../org/videolan/vlma/model/StreamingStrategy.java |    4 ++--
 .../java/org/videolan/vlma/model/order/Order.java  |    4 ++--
 .../videolan/vlma/model/program/ProgramImpl.java   |    2 +-
 6 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/vlma-core/src/main/java/org/videolan/vlma/IpBank.java b/vlma-core/src/main/java/org/videolan/vlma/IpBank.java
index 739dde9..e6fbf4b 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/IpBank.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/IpBank.java
@@ -68,7 +68,7 @@ public class IpBank {
 
         for (Media m : vlmaService.getMedias()) {
             Program p = m.getProgram();
-            if (p == null || !p.getStreamingStrategy().getProtocol().equals(StreamingStrategy.Protocol.UDP)) {
+            if (p == null || !p.getStreamingStrategy().getProtocol().equals(StreamingStrategy.Protocol.UDP_Multicast)) {
                 continue;
             }
             logger.log(Level.DEBUG, "The media " + m.getName()
diff --git a/vlma-core/src/main/java/org/videolan/vlma/VLMaServiceImpl.java b/vlma-core/src/main/java/org/videolan/vlma/VLMaServiceImpl.java
index 9e87c42..08a9f86 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/VLMaServiceImpl.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/VLMaServiceImpl.java
@@ -415,7 +415,7 @@ public class VLMaServiceImpl implements VLMaService {
         if (program != null) {
             if (program.getStreamingStrategy().getProtocol().equals(StreamingStrategy.Protocol.HTTP)) {
                 return "http://" + program.getPlayer().getHostAddress() + ":" + configuration.getInt("vlma.streaming.http.port") + "/" + program.hashCode();
-            } else if (program.getStreamingStrategy().getProtocol().equals(StreamingStrategy.Protocol.UDP)) {
+            } else if (program.getStreamingStrategy().getProtocol().equals(StreamingStrategy.Protocol.UDP_Multicast)) {
                 return "udp://@" + program.getIp().getHostAddress();
             }
         }
@@ -447,14 +447,14 @@ public class VLMaServiceImpl implements VLMaService {
             Program program) throws MediaDoesNotExistException {
         Media m = this.getMedia(media);
         if (m.getProgram() != null
-                && m.getProgram().getStreamingStrategy().getProtocol().equals(StreamingStrategy.Protocol.UDP)
+                && m.getProgram().getStreamingStrategy().getProtocol().equals(StreamingStrategy.Protocol.UDP_Multicast)
                 && (program == null
-                        || !program.getStreamingStrategy().getProtocol().equals(StreamingStrategy.Protocol.UDP))) {
+                        || !program.getStreamingStrategy().getProtocol().equals(StreamingStrategy.Protocol.UDP_Multicast))) {
             ipBank.releaseIp(m.getProgram().getIp());
         } else if (program != null
                 && (m.getProgram() == null
-                        || !m.getProgram().getStreamingStrategy().getProtocol().equals(StreamingStrategy.Protocol.UDP))
-                && program.getStreamingStrategy().getProtocol().equals(StreamingStrategy.Protocol.UDP)) {
+                        || !m.getProgram().getStreamingStrategy().getProtocol().equals(StreamingStrategy.Protocol.UDP_Multicast))
+                && program.getStreamingStrategy().getProtocol().equals(StreamingStrategy.Protocol.UDP_Multicast)) {
             program.setIp(ipBank.getIp());
         }
         m.setProgram(program);
@@ -464,7 +464,7 @@ public class VLMaServiceImpl implements VLMaService {
 
     synchronized public Program getProgram() {
         Program program = programFactory.getProgram();
-        if (program.getStreamingStrategy().getProtocol().equals(StreamingStrategy.Protocol.UDP)) {
+        if (program.getStreamingStrategy().getProtocol().equals(StreamingStrategy.Protocol.UDP_Multicast)) {
             InetAddress a = ipBank.getIp();
             program.setIp(a);
         }
diff --git a/vlma-daemon/src/main/resources/config.properties b/vlma-daemon/src/main/resources/config.properties
index 57ca08c..111157d 100644
--- a/vlma-daemon/src/main/resources/config.properties
+++ b/vlma-daemon/src/main/resources/config.properties
@@ -33,7 +33,7 @@ vlma.notification.msn.login =
 vlma.notification.msn.pass =
 vlma.notification.msn.recipients =
 vlma.streaming.http.port = 8001
-vlma.streaming = UDP
+vlma.streaming = UDP_Multicast
 vlma.streaming.udp.ipbank.min = 239.127.0.1
 vlma.streaming.udp.ipbank.max = 239.127.255.255
 vlma.ui.command.queue.size = 500
diff --git a/vlma-model/src/main/java/org/videolan/vlma/model/StreamingStrategy.java b/vlma-model/src/main/java/org/videolan/vlma/model/StreamingStrategy.java
index 3c7e8cc..6798e24 100644
--- a/vlma-model/src/main/java/org/videolan/vlma/model/StreamingStrategy.java
+++ b/vlma-model/src/main/java/org/videolan/vlma/model/StreamingStrategy.java
@@ -35,7 +35,7 @@ public class StreamingStrategy implements Serializable {
     private static final long serialVersionUID = -75919931677731393L;
 
     public static enum Protocol {
-        UDP, HTTP;
+        UDP_Multicast, HTTP;
     }
 
     public static enum Announcement {
@@ -46,7 +46,7 @@ public class StreamingStrategy implements Serializable {
         TS, PS, MPEG1, OGG, ASF, ASFH, AVI, MPJPEG;
     }
 
-    private static final Protocol DEFAULT_PROTOCOL = Protocol.UDP;
+    private static final Protocol DEFAULT_PROTOCOL = Protocol.UDP_Multicast;
     private static final Encapsulation DEFAULT_ENCAPSULATION = Encapsulation.TS;
 
     private Protocol protocol = DEFAULT_PROTOCOL;
diff --git a/vlma-model/src/main/java/org/videolan/vlma/model/order/Order.java b/vlma-model/src/main/java/org/videolan/vlma/model/order/Order.java
index feb2af9..174fe9d 100644
--- a/vlma-model/src/main/java/org/videolan/vlma/model/order/Order.java
+++ b/vlma-model/src/main/java/org/videolan/vlma/model/order/Order.java
@@ -189,7 +189,7 @@ public abstract class Order {
      */
     public String getAccess(Program program) {
         StreamingStrategy streamingStrategy = program.getStreamingStrategy();
-        if (streamingStrategy.getProtocol().equals(StreamingStrategy.Protocol.UDP)) {
+        if (streamingStrategy.getProtocol().equals(StreamingStrategy.Protocol.UDP_Multicast)) {
             return "udp";
         } else if (streamingStrategy.getProtocol().equals(StreamingStrategy.Protocol.HTTP)) {
             return "http";
@@ -205,7 +205,7 @@ public abstract class Order {
      */
     public String getDst(Program program) {
         StreamingStrategy streamingStrategy = program.getStreamingStrategy();
-        if (streamingStrategy.getProtocol().equals(StreamingStrategy.Protocol.UDP)) {
+        if (streamingStrategy.getProtocol().equals(StreamingStrategy.Protocol.UDP_Multicast)) {
             return program.getIp().getHostAddress();
         } else if (streamingStrategy.getProtocol().equals(StreamingStrategy.Protocol.HTTP)) {
             Integer port = VLMa.getInstance().getInt("vlma.streaming.http.port");
diff --git a/vlma-model/src/main/java/org/videolan/vlma/model/program/ProgramImpl.java b/vlma-model/src/main/java/org/videolan/vlma/model/program/ProgramImpl.java
index 0b2bc6b..b9d7d17 100644
--- a/vlma-model/src/main/java/org/videolan/vlma/model/program/ProgramImpl.java
+++ b/vlma-model/src/main/java/org/videolan/vlma/model/program/ProgramImpl.java
@@ -189,7 +189,7 @@ public class ProgramImpl implements Program, Serializable {
     }
 
     private void updateStreamWatcher() {
-        if (streamingStrategy.getProtocol().equals(StreamingStrategy.Protocol.UDP)) {
+        if (streamingStrategy.getProtocol().equals(StreamingStrategy.Protocol.UDP_Multicast)) {
             streamWatcher = new DirectMulticastStreamWatcher();
         } else if (streamingStrategy.getProtocol().equals(StreamingStrategy.Protocol.HTTP)) {
             streamWatcher = new HttpStreamWatcher();



More information about the vlma-devel mailing list