[vlma-devel] commit: Ensure the update of the player field. (Adrien Grand )
git version control
git at videolan.org
Sun Nov 16 01:26:12 CET 2008
vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Sat Nov 15 22:57:29 2008 +0100| [fb1ae3718409ca7af6204f12ee8438cb5a48eafd] | committer: Adrien Grand
Ensure the update of the player field.
> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=fb1ae3718409ca7af6204f12ee8438cb5a48eafd
---
.../main/java/org/videolan/vlma/OrderGiver.java | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/vlma-core/src/main/java/org/videolan/vlma/OrderGiver.java b/vlma-core/src/main/java/org/videolan/vlma/OrderGiver.java
index b5ef652..07c4088 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/OrderGiver.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/OrderGiver.java
@@ -345,22 +345,25 @@ public class OrderGiver {
order.getAdapter().setBusy(false);
}
+ for (Order order : newOrders) {
+ for(Media media : order.getMedias()) {
+ media.getProgram().setPlayer(order.getAdapter().getServer().getIp());
+ media.getProgram().setAdapterName(order.getAdapter().getName());
+ }
+ order.getAdapter().setBusy(false);
+ }
+
// Send newly computed orders in parallel
newOrders.removeAll(orders);
if (logger.isDebugEnabled())
logger.debug(newOrders.size() + " new orders to send");
Map<Server, SendOrder> sendThreads = new HashMap<Server, SendOrder>();
for (Order order : newOrders) {
- for(Media media : order.getMedias()) {
- media.getProgram().setPlayer(order.getAdapter().getServer().getIp());
- media.getProgram().setAdapterName(order.getAdapter().getName());
- }
SendOrder sendThread = sendThreads.get(order.getAdapter().getServer());
if(sendThread == null) {
sendThread = new SendOrder();
sendThreads.put(order.getAdapter().getServer(), sendThread);
}
- order.getAdapter().setBusy(true);
sendThread.addOrder(order);
}
// Start threads, one per server
More information about the vlma-devel
mailing list