[vlma-devel] commit: Update the player in every case. (Adrien Grand )

git version control git at videolan.org
Wed Dec 17 23:04:59 CET 2008


vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Wed Dec 17 23:01:29 2008 +0100| [3a844fc43e07941e3531d52b9f96e64233d87f05] | committer: Adrien Grand 

Update the player in every case.

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

 .../main/java/org/videolan/vlma/OrderManager.java  |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/vlma-core/src/main/java/org/videolan/vlma/OrderManager.java b/vlma-core/src/main/java/org/videolan/vlma/OrderManager.java
index c5f510f..9c038b8 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/OrderManager.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/OrderManager.java
@@ -138,6 +138,17 @@ public class OrderManager {
         for(Map.Entry<String, Map.Entry<Order, State>> entry : orders.entrySet()) {
             Order order = entry.getValue().getKey();
             switch(entry.getValue().getValue()) {
+            case TO_STOP:
+                order.getAdapter().setBusy(false);
+                for(Media media : order.getMedias()) {
+                    Program program = media.getProgram();
+                    if(program != null) {
+                        program.setAdapterName(null);
+                        program.setBroadcastState(false);
+                        program.setPlayer(null);
+                    }
+                }
+                break;
             case TO_START:
                 order.getAdapter().setBusy(true);
                 for(Media media : order.getMedias()) {
@@ -149,9 +160,6 @@ public class OrderManager {
                     }
                 }
                 break;
-            case TO_STOP:
-                order.getAdapter().setBusy(false);
-                break;
             default:
                 break;
             }



More information about the vlma-devel mailing list