Changeset 23
- Timestamp:
- 10/14/07 19:11:47
(1 year ago)
- Author:
- sip
- Message:
Profiles, DID and fixed bye
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r21 |
r23 |
|
| 31 | 31 | private Integer id; |
|---|
| 32 | 32 | private String name; |
|---|
| | 33 | private String did; |
|---|
| 33 | 34 | private MediaMixer mixer; |
|---|
| 34 | 35 | private HashMap<Integer,Participant> participants; |
|---|
| 35 | 36 | private Integer compType; |
|---|
| 36 | 37 | private Integer size; |
|---|
| | 38 | private Profile profile; |
|---|
| 37 | 39 | |
|---|
| 38 | 40 | /** Creates a new instance of Conference */ |
|---|
| 39 | | protected Conference(Integer id,String name,MediaMixer mixer) { |
|---|
| | 41 | protected Conference(Integer id,String name,String did,MediaMixer mixer,Profile profile) { |
|---|
| 40 | 42 | //Save values |
|---|
| 41 | 43 | this.id = id; |
|---|
| 42 | 44 | this.mixer = mixer; |
|---|
| 43 | 45 | this.name = name; |
|---|
| | 46 | this.did = did; |
|---|
| | 47 | this.profile = profile; |
|---|
| 44 | 48 | //Default composition and size |
|---|
| 45 | 49 | this.compType = XmlRpcMcuClient.MOSAIC2x2; |
|---|
| … | … | |
| 72 | 76 | return participants; |
|---|
| 73 | 77 | } |
|---|
| | 78 | |
|---|
| | 79 | public int getNumParcitipants() { |
|---|
| | 80 | return participants.size(); |
|---|
| | 81 | } |
|---|
| | 82 | |
|---|
| 74 | 83 | public Integer getId() { |
|---|
| 75 | 84 | return id; |
|---|
| … | … | |
| 84 | 93 | } |
|---|
| 85 | 94 | |
|---|
| | 95 | public String getDID() { |
|---|
| | 96 | return did; |
|---|
| | 97 | } |
|---|
| | 98 | |
|---|
| 86 | 99 | public MediaMixer getMixer() { |
|---|
| 87 | 100 | return mixer; |
|---|
| 88 | 101 | } |
|---|
| 89 | | |
|---|
| 90 | | void removeParticitpant(Integer id) { |
|---|
| 91 | | throw new UnsupportedOperationException("Not yet implemented"); |
|---|
| | 102 | |
|---|
| | 103 | public Profile getProfile() { |
|---|
| | 104 | return profile; |
|---|
| 92 | 105 | } |
|---|
| 93 | 106 | |
|---|
| | 107 | public void setProfile(Profile profile) { |
|---|
| | 108 | this.profile = profile; |
|---|
| | 109 | } |
|---|
| | 110 | |
|---|
| | 111 | public void removeParticitpant(Integer id) { |
|---|
| | 112 | participants.remove(id); |
|---|
| | 113 | } |
|---|
| | 114 | |
|---|
| | 115 | |
|---|
| | 116 | |
|---|
| | 117 | |
|---|
| 94 | 118 | } |
|---|
| r18 |
r23 |
|
| 24 | 24 | import java.net.MalformedURLException; |
|---|
| 25 | 25 | import java.util.HashMap; |
|---|
| 26 | | import java.util.Vector; |
|---|
| | 26 | import java.util.Iterator; |
|---|
| 27 | 27 | import java.util.logging.Level; |
|---|
| 28 | 28 | import java.util.logging.Logger; |
|---|
| … | … | |
| 36 | 36 | public class ConferenceMngr extends Object implements Serializable { |
|---|
| 37 | 37 | |
|---|
| 38 | | private Vector<MediaMixer> mixers; |
|---|
| 39 | | private HashMap<String, Conference> conferences; |
|---|
| | 38 | private HashMap<String,MediaMixer> mixers; |
|---|
| | 39 | private HashMap<String,Conference> conferences; |
|---|
| | 40 | private HashMap<String,Profile> profiles; |
|---|
| 40 | 41 | |
|---|
| 41 | 42 | public ConferenceMngr() { |
|---|
| 42 | 43 | //Create arrays |
|---|
| 43 | | mixers = new Vector<MediaMixer>(); |
|---|
| 44 | | conferences = new HashMap<String, Conference>(); |
|---|
| 45 | | } |
|---|
| 46 | | |
|---|
| 47 | | public Conference createConference(String name,Integer mixerId) { |
|---|
| | 44 | mixers = new HashMap<String,MediaMixer>(); |
|---|
| | 45 | conferences = new HashMap<String,Conference>(); |
|---|
| | 46 | profiles = new HashMap<String,Profile>(); |
|---|
| | 47 | } |
|---|
| | 48 | |
|---|
| | 49 | public Conference createConference(String name,String did, String mixerId,String profileId) { |
|---|
| 48 | 50 | Integer confId; |
|---|
| 49 | 51 | Conference conf = null; |
|---|
| … | … | |
| 51 | 53 | MediaMixer mixer = mixers.get(mixerId); |
|---|
| 52 | 54 | try { |
|---|
| | 55 | //Get profile |
|---|
| | 56 | Profile profile = profiles.get(profileId); |
|---|
| 53 | 57 | //Create conference |
|---|
| 54 | 58 | confId = mixer.CreateConference(name); |
|---|
| 55 | 59 | //Create conference object |
|---|
| 56 | | conf = new Conference(confId, name, mixer); |
|---|
| | 60 | conf = new Conference(confId, name, did, mixer, profile); |
|---|
| 57 | 61 | //Lock conferences |
|---|
| 58 | 62 | synchronized (conferences) { |
|---|
| … | … | |
| 81 | 85 | } |
|---|
| 82 | 86 | |
|---|
| 83 | | public Vector<MediaMixer> getMcus() { |
|---|
| | 87 | public HashMap<String,MediaMixer> getMcus() { |
|---|
| 84 | 88 | return mixers; |
|---|
| 85 | 89 | } |
|---|
| … | … | |
| 87 | 91 | public HashMap<String, Conference> getConferences() { |
|---|
| 88 | 92 | return conferences; |
|---|
| | 93 | } |
|---|
| | 94 | |
|---|
| | 95 | public HashMap<String, Profile> getProfiles() { |
|---|
| | 96 | return profiles; |
|---|
| 89 | 97 | } |
|---|
| 90 | 98 | |
|---|
| … | … | |
| 123 | 131 | //Get conference for participant |
|---|
| 124 | 132 | Conference conf = part.getConference(); |
|---|
| | 133 | //Get default profile |
|---|
| | 134 | Profile profile = conf.getProfile(); |
|---|
| 125 | 135 | //Get mixer for conference |
|---|
| 126 | 136 | MediaMixer mixer = conf.getMixer(); |
|---|
| … | … | |
| 129 | 139 | Integer partId = part.getId(); |
|---|
| 130 | 140 | //Setup audio & video |
|---|
| 131 | | mixer.SetAudioCodec(confId, partId, MediaMixer.PCMU); |
|---|
| 132 | | mixer.SetVideoCodec(confId, partId, MediaMixer.H263_1998, MediaMixer.QCIF, 15, 512, 1, 31); |
|---|
| | 141 | mixer.SetAudioCodec(confId, partId, part.getAudioCodec()); |
|---|
| | 142 | mixer.SetVideoCodec(confId, partId, part.getVideoCodec(), profile.getVideoSize() , profile.getVideoFPS(), profile.getVideoBitrate(), profile.getVideoQmin(), profile.getVideoQmax()); |
|---|
| 133 | 143 | //Send video & audio |
|---|
| 134 | 144 | mixer.StartSendingAudio(confId, partId, part.getSendIp(), part.getSendAudioPort()); |
|---|
| … | … | |
| 152 | 162 | |
|---|
| 153 | 163 | public String getMappedConference(String uri) { |
|---|
| 154 | | //Return first conference |
|---|
| 155 | | return conferences.keySet().iterator().next(); |
|---|
| | 164 | //Get iterator |
|---|
| | 165 | Iterator<Conference> itConf = conferences.values().iterator(); |
|---|
| | 166 | //Loop |
|---|
| | 167 | while(itConf.hasNext()) { |
|---|
| | 168 | //Get conference |
|---|
| | 169 | Conference conf = itConf.next(); |
|---|
| | 170 | //Check did |
|---|
| | 171 | if(uri.equals(conf.getDID())) |
|---|
| | 172 | //Return conference |
|---|
| | 173 | return conf.getUID(); |
|---|
| | 174 | } |
|---|
| | 175 | //No conference |
|---|
| | 176 | return null; |
|---|
| 156 | 177 | } |
|---|
| 157 | 178 | |
|---|
| … | … | |
| 276 | 297 | MediaMixer mixer = new MediaMixer(name,url,ip); |
|---|
| 277 | 298 | //Append |
|---|
| 278 | | mixers.add(mixer); |
|---|
| | 299 | mixers.put(mixer.getUID(),mixer); |
|---|
| 279 | 300 | //Exit |
|---|
| 280 | 301 | return mixer; |
|---|
| 281 | 302 | } |
|---|
| 282 | | |
|---|
| | 303 | public Profile addProfile(String name, Integer videoSize, Integer videoBitrate, Boolean videoBitrateStrict, Integer videoFPS, Integer videoQmin, Integer videoQmax) |
|---|
| | 304 | { |
|---|
| | 305 | //Create Profile |
|---|
| | 306 | Profile profile = new Profile(name, videoSize, videoBitrate, videoBitrateStrict, videoFPS, videoQmin, videoQmax); |
|---|
| | 307 | //Append |
|---|
| | 308 | profiles.put(profile.getUID(),profile); |
|---|
| | 309 | //Exit |
|---|
| | 310 | return profile; |
|---|
| | 311 | } |
|---|
| | 312 | |
|---|
| 283 | 313 | public void removeParticipant(Participant part) { |
|---|
| 284 | 314 | //Get conference |
|---|
| … | … | |
| 298 | 328 | } |
|---|
| 299 | 329 | |
|---|
| | 330 | void setCompositionType(String confId, Integer compType, Integer size, String profileId) { |
|---|
| | 331 | //Get conference |
|---|
| | 332 | Conference conf = conferences.get(confId); |
|---|
| | 333 | //Get Mixer |
|---|
| | 334 | MediaMixer mixer = conf.getMixer(); |
|---|
| | 335 | //Get profile |
|---|
| | 336 | Profile profile = profiles.get(profileId); |
|---|
| | 337 | //Set composition type |
|---|
| | 338 | try { |
|---|
| | 339 | mixer.SetCompositionType(conf.getId(), compType, size); |
|---|
| | 340 | } catch (XmlRpcException ex) { |
|---|
| | 341 | ex.printStackTrace(); |
|---|
| | 342 | } |
|---|
| | 343 | //Set values in conference |
|---|
| | 344 | conf.setCompType(compType); |
|---|
| | 345 | conf.setSize(size); |
|---|
| | 346 | conf.setProfile(profile); |
|---|
| | 347 | } |
|---|
| | 348 | |
|---|
| 300 | 349 | } |
|---|
| r18 |
r23 |
|
| 70 | 70 | Logger.getLogger("global").log(Level.SEVERE, null, ex); |
|---|
| 71 | 71 | } |
|---|
| | 72 | //Create default profiles |
|---|
| | 73 | confMngr.addProfile("High Quality",MediaMixer.CIF,2048,false,30,2,6); |
|---|
| | 74 | confMngr.addProfile("Medium Quality", MediaMixer.CIF,512,true,15,2,8); |
|---|
| | 75 | confMngr.addProfile("Low Quality", MediaMixer.QCIF,128,true,10,4,12); |
|---|
| | 76 | |
|---|
| 72 | 77 | } |
|---|
| 73 | 78 | |
|---|
| … | … | |
| 106 | 111 | if (method.equals("createConference")) { |
|---|
| 107 | 112 | //Get parameters |
|---|
| 108 | | String name = request.getParameter("name"); |
|---|
| 109 | | Integer mixerId = Integer.parseInt(request.getParameter("mixerId")); |
|---|
| | 113 | String name = request.getParameter("name"); |
|---|
| | 114 | String did = request.getParameter("did"); |
|---|
| | 115 | String mixerId = request.getParameter("mixerId"); |
|---|
| | 116 | String profileId = request.getParameter("profileId"); |
|---|
| 110 | 117 | Integer compType = Integer.parseInt(request.getParameter("compType")); |
|---|
| 111 | 118 | //Call |
|---|
| 112 | | Conference conf = createConference(name,mixerId,compType); |
|---|
| | 119 | Conference conf = createConference(name,did,mixerId,compType,profileId); |
|---|
| 113 | 120 | //Redirect |
|---|
| 114 | 121 | response.sendRedirect("/mcuWeb/conference.jsp?uid=" + conf.getUID()); |
|---|
| … | … | |
| 140 | 147 | //Redirect |
|---|
| 141 | 148 | response.sendRedirect("/mcuWeb"); |
|---|
| 142 | | |
|---|
| | 149 | } else if (method.equals("setCompositionType")) { |
|---|
| | 150 | //Get parameters |
|---|
| | 151 | String confId = request.getParameter("confId"); |
|---|
| | 152 | Integer compType = Integer.parseInt(request.getParameter("compType")); |
|---|
| | 153 | Integer size = Integer.parseInt(request.getParameter("size")); |
|---|
| | 154 | String profileId = request.getParameter("profileId"); |
|---|
| | 155 | //Call |
|---|
| | 156 | setCompositionType(confId,compType,size,profileId); |
|---|
| | 157 | //Redirect |
|---|
| | 158 | response.sendRedirect("/mcuWeb/conference.jsp?uid=" + confId); |
|---|
| 143 | 159 | } else { |
|---|
| 144 | 160 | response.setContentType("text/html;charset=UTF-8"); |
|---|
| … | … | |
| 171 | 187 | } |
|---|
| 172 | 188 | |
|---|
| 173 | | private Conference createConference(String name, Integer mixerId, Integer compType) { |
|---|
| | 189 | private Conference createConference(String name, String did, String mixerId, Integer compType,String profileId) { |
|---|
| 174 | 190 | //Create conference |
|---|
| 175 | | return confMngr.createConference(name,mixerId); |
|---|
| | 191 | return confMngr.createConference(name,did,mixerId,profileId); |
|---|
| 176 | 192 | } |
|---|
| 177 | 193 | |
|---|
| … | … | |
| 220 | 236 | } |
|---|
| 221 | 237 | |
|---|
| | 238 | private void setCompositionType(String confId, Integer compType, Integer size, String profileId) { |
|---|
| | 239 | //Set composition type |
|---|
| | 240 | confMngr.setCompositionType(confId,compType,size,profileId); |
|---|
| | 241 | } |
|---|
| | 242 | |
|---|
| 222 | 243 | } |
|---|
| r18 |
r23 |
|
| 33 | 33 | import javax.servlet.sip.SipSessionEvent; |
|---|
| 34 | 34 | import javax.servlet.sip.SipSessionListener; |
|---|
| | 35 | import javax.servlet.sip.SipURI; |
|---|
| 35 | 36 | |
|---|
| 36 | 37 | /** |
|---|
| … | … | |
| 71 | 72 | return; |
|---|
| 72 | 73 | } |
|---|
| 73 | | |
|---|
| | 74 | //Get caller |
|---|
| | 75 | SipURI uri = (SipURI) request.getRequestURI(); |
|---|
| 74 | 76 | //Get default conference |
|---|
| 75 | | String confId = confMngr.getMappedConference("caller"); |
|---|
| | 77 | String confId = confMngr.getMappedConference(uri.getUser()); |
|---|
| 76 | 78 | //Get sip session |
|---|
| 77 | 79 | SipSession session = request.getSession(); |
|---|
| … | … | |
| 152 | 154 | } |
|---|
| 153 | 155 | |
|---|
| 154 | | public void sessionCreated(SipSessionEvent session) { |
|---|
| 155 | | |
|---|
| 156 | | Logger.getLogger("global").log(Level.WARNING, "sessionCreated!"); |
|---|
| | 156 | public void sessionCreated(SipSessionEvent event) { |
|---|
| | 157 | Logger.getLogger("global").log(java.util.logging.Level.WARNING, "sessionCreated!"); |
|---|
| | 158 | try { |
|---|
| | 159 | //Set session handler |
|---|
| | 160 | event.getSession().setHandler("MCUSipServlet"); |
|---|
| | 161 | } catch (ServletException ex) { |
|---|
| | 162 | Logger.getLogger("global").log(Level.SEVERE, "Could not set session handler", ex); |
|---|
| | 163 | } |
|---|
| 157 | 164 | } |
|---|
| 158 | 165 | |
|---|
| r16 |
r23 |
|
| 52 | 52 | return ip; |
|---|
| 53 | 53 | } |
|---|
| | 54 | |
|---|
| | 55 | public String getUID() { |
|---|
| | 56 | return name+"@"+url; |
|---|
| | 57 | } |
|---|
| 54 | 58 | } |
|---|
| r21 |
r23 |
|
| 56 | 56 | <fieldset style="width:48%;"> |
|---|
| 57 | 57 | <legend><img src="icons/image.png"> Conference</legend> |
|---|
| 58 | | <table class="form" method="POST" action="controller/setCompositionType"> |
|---|
| 59 | | <form> |
|---|
| | 58 | <table class="form"> |
|---|
| | 59 | <form method="POST" action="controller/setCompositionType"> |
|---|
| | 60 | <input type="hidden" name="confId" value="<%=conf.getUID()%>"> |
|---|
| 60 | 61 | <tr> |
|---|
| 61 | 62 | <td>Name:</td> |
|---|
| 62 | 63 | <td><%=conf.getName()%></td> |
|---|
| | 64 | </tr> |
|---|
| | 65 | <tr> |
|---|
| | 66 | <td>DID:</td> |
|---|
| | 67 | <td><%=conf.getDID()%></td> |
|---|
| 63 | 68 | </tr> |
|---|
| 64 | 69 | <tr> |
|---|
| … | … | |
| 69 | 74 | <td>Composition:</td> |
|---|
| 70 | 75 | <td><select name="compType" value="<%=conf.getCompType()%>"> |
|---|
| 71 | | <option value="0">Mosaic 1x1 |
|---|
| 72 | | <option value="1">Mosaic 2x2 |
|---|
| 73 | | <option value="2">Mosaic 3x3 |
|---|
| | 76 | <option value="0" <%=conf.getCompType()==0?"selected":""%>>Mosaic 1x1 |
|---|
| | 77 | <option value="1" <%=conf.getCompType()==1?"selected":""%>>Mosaic 2x2 |
|---|
| | 78 | <option value="2" <%=conf.getCompType()==2?"selected":""%>>Mosaic 3x3 |
|---|
| 74 | 79 | </select> |
|---|
| 75 | 80 | </td> |
|---|
| … | … | |
| 78 | 83 | <td>Size</td> |
|---|
| 79 | 84 | <td><select name="size" value="<%=conf.getSize()%>"> |
|---|
| 80 | | <option value="0">QCIF |
|---|
| 81 | | <option value="1">CIF |
|---|
| | 85 | <option value="0" <%=conf.getSize()==0?"selected":""%>>QCIF |
|---|
| | 86 | <option value="1" <%=conf.getSize()==1?"selected":""%>>CIF |
|---|
| 82 | 87 | </select> |
|---|
| | 88 | </td> |
|---|
| | 89 | </tr> |
|---|
| | 90 | <tr> |
|---|
| | 91 | <td>Default profile:</td> |
|---|
| | 92 | <td><select name="profileId"> |
|---|
| | 93 | <% |
|---|
| | 94 | //Get profiles |
|---|
| | 95 | Iterator<org.murillo.mcuWeb.Profile> itProf = confMngr.getProfiles().values().iterator(); |
|---|
| | 96 | //Loop |
|---|
| | 97 | while(itProf.hasNext()) { |
|---|
| | 98 | // Get mixer |
|---|
| | 99 | org.murillo.mcuWeb.Profile profile = itProf.next(); |
|---|
| | 100 | //If it's the selected profile |
|---|
| | 101 | if (profile.getUID().equals(conf.getProfile().getUID())) { |
|---|
| | 102 | %><option value="<%=profile.getUID()%>" selected><%=profile.getName()%><% |
|---|
| | 103 | } else { |
|---|
| | 104 | %><option value="<%=profile.getUID()%>"><%=profile.getName()%><% |
|---|
| | 105 | } |
|---|
| | 106 | } |
|---|
| | 107 | %> |
|---|
| 83 | 108 | </td> |
|---|
| 84 | 109 | </tr> |
|---|
| r21 |
r23 |
|
| 1 | 1 | <%@page contentType="text/html"%> |
|---|
| 2 | 2 | <%@page pageEncoding="UTF-8"%> |
|---|
| 3 | | <%@page import="java.util.Vector"%> |
|---|
| | 3 | <%@page import="java.util.Iterator"%> |
|---|
| 4 | 4 | <jsp:useBean id="confMngr" class="org.murillo.mcuWeb.ConferenceMngr" scope="application" /> |
|---|
| 5 | 5 | <fieldset> |
|---|
| … | … | |
| 12 | 12 | </tr> |
|---|
| 13 | 13 | <tr> |
|---|
| | 14 | <td>DID:</td> |
|---|
| | 15 | <td><input type="text" name="did"></td> |
|---|
| | 16 | </tr> |
|---|
| | 17 | <tr> |
|---|
| 14 | 18 | <td>MediaMixer:</td> |
|---|
| 15 | 19 | <td><select name="mixerId"> |
|---|
| 16 | 20 | <% |
|---|
| 17 | 21 | //Get mixers |
|---|
| 18 | | Vector<org.murillo.mcuWeb.MediaMixer> mixers = confMngr.getMcus(); |
|---|
| 19 | | //Loop |
|---|
| 20 | | for (int i = new Integer(0);i<mixers.size();i++) { |
|---|
| 21 | | %><option value="<%=i%>"><%=mixers.get(i).getName()%><% |
|---|
| | 22 | Iterator<org.murillo.mcuWeb.MediaMixer> it = confMngr.getMcus().values().iterator(); |
|---|
| | 23 | //Loop |
|---|
| | 24 | while(it.hasNext()) { |
|---|
| | 25 | // Get mixer |
|---|
| | 26 | org.murillo.mcuWeb.MediaMixer mixer = it.next(); |
|---|
| | 27 | %><option value="<%=mixer.getUID()%>"><%=mixer.getName()%><% |
|---|
| 22 | 28 | } |
|---|
| 23 | 29 | %> |
|---|
| … | … | |
| 33 | 39 | </tr> |
|---|
| 34 | 40 | <tr> |
|---|
| 35 | | <td>Size:</td> |
|---|
| 36 | | <td><select name="sizw"> |
|---|
| | 41 | <td>Mosaic size:</td> |
|---|
| | 42 | <td><select name="size"> |
|---|
| 37 | 43 | <option value="0">QCIF |
|---|
| 38 | 44 | <option value="1">CIF |
|---|
| 39 | 45 | </select> |
|---|
| | 46 | </td> |
|---|
| | 47 | </tr> |
|---|
| | 48 | <tr> |
|---|
| | 49 | <td>Default profile:</td> |
|---|
| | 50 | <td><select name="profileId"> |
|---|
| | 51 | <% |
|---|
| | 52 | //Get profiles |
|---|
| | 53 | Iterator<org.murillo.mcuWeb.Profile> itProf = confMngr.getProfiles().values().iterator(); |
|---|
| | 54 | //Loop |
|---|
| | 55 | while(itProf.hasNext()) { |
|---|
| | 56 | // Get mixer |
|---|
| | 57 | org.murillo.mcuWeb.Profile profile = itProf.next(); |
|---|
| | 58 | %><option value="<%=profile.getUID()%>"><%=profile.getName()%><% |
|---|
| | 59 | } |
|---|
| | 60 | %> |
|---|
| 40 | 61 | </td> |
|---|
| 41 | 62 | </tr> |
|---|
| r18 |
r23 |
|
| 8 | 8 | var param = {uid:uid}; |
|---|
| 9 | 9 | return callController("removeConference",param); |
|---|
| | 10 | } |
|---|
| | 11 | function removeMixer(uid) |
|---|
| | 12 | { |
|---|
| | 13 | var param = {uid:uid}; |
|---|
| | 14 | return callController("removeMixer",param); |
|---|
| 10 | 15 | } |
|---|
| 11 | 16 | </script> |
|---|
| … | … | |
| 21 | 26 | <% |
|---|
| 22 | 27 | //Get mixer iterator |
|---|
| 23 | | Iterator<org.murillo.mcuWeb.MediaMixer> it = confMngr.getMcus().iterator(); |
|---|
| | 28 | Iterator<org.murillo.mcuWeb.MediaMixer> it = confMngr.getMcus().values().iterator(); |
|---|
| 24 | 29 | //Loop |
|---|
| 25 | 30 | while(it.hasNext()) { |
|---|
| 26 | 31 | // Get mixer |
|---|
| 27 | | org.murillo.mcuWeb. MediaMixer mm = it.next(); |
|---|
| | 32 | org.murillo.mcuWeb.MediaMixer mm = it.next(); |
|---|
| 28 | 33 | //Print values |
|---|
| 29 | 34 | %> |
|---|
| … | … | |
| 32 | 37 | <td><%=mm.getUrl()%></td> |
|---|
| 33 | 38 | <td> Up and running...</td> |
|---|
| 34 | | <td></td> |
|---|
| | 39 | <td><a href="#" onClick="removeMixer('<%=mm.getUID()%>');return false;"><img src="icons/bin_closed.png"><span>Remove conference</span></a></td> |
|---|
| 35 | 40 | </tr><% |
|---|
| 36 | 41 | } |
|---|
| … | … | |
| 39 | 44 | <form><input type="submit" class="add" onClick="document.location.href='addMixer.jsp';return false;" value="Add"></form> |
|---|
| 40 | 45 | </fieldset> |
|---|
| | 46 | <fieldset> |
|---|
| | 47 | <legend><img src="icons/table_multiple.png"> Profile List</legend> |
|---|
| | 48 | <table class="list"> |
|---|
| | 49 | <tr> |
|---|
| | 50 | <th>Name</th> |
|---|
| | 51 | <th>Parameters</th> |
|---|
| | 52 | <th>Actions</th> |
|---|
| | 53 | </tr> |
|---|
| | 54 | <% |
|---|
| | 55 | //Get mixer iterator |
|---|
| | 56 | Iterator<org.murillo.mcuWeb.Profile> itProf = confMngr.getProfiles().values().iterator(); |
|---|
| | 57 | //Loop |
|---|
| | 58 | while(itProf.hasNext()) { |
|---|
| | 59 | // Get mixer |
|---|
| | 60 | org.murillo.mcuWeb.Profile profile = itProf.next(); |
|---|
| | 61 | //Print values |
|---|
| | 62 | %> |
|---|
| | 63 | <tr> |
|---|
| | 64 | <td><%=profile.getName()%></td> |
|---|
| | 65 | <td><% |
|---|
| | 66 | switch(profile.getVideoSize()) |
|---|
| | 67 | { |
|---|
| | 68 | case 0: |
|---|
| | 69 | %>CIF<% |
|---|
| | 70 | break; |
|---|
| | 71 | case 1: |
|---|
| | 72 | %>QCIF<% |
|---|
| | 73 | break; |
|---|
| | 74 | } |
|---|
| | 75 | %><%=profile.getVideoBitrate()%>Kbs <%=profile.getVideoFPS()%>fps</td> |
|---|
| | 76 | <td> |
|---|
| | 77 | <a href="#" onClick="removeProfile('<%=profile.getUID()%>');return false;"><img src="icons/bin_closed.png"><span>Remove conference</span></a> |
|---|
| | 78 | </td> |
|---|
| | 79 | </tr><% |
|---|
| | 80 | } |
|---|
| | 81 | %> |
|---|
| | 82 | </table> |
|---|
| | 83 | <form><input class="add" type="button" onClick="document.location.href='createProfile.jsp';return false;" value="Create"></form> |
|---|
| | 84 | </fieldset> |
|---|
| 41 | 85 | <% |
|---|
| 42 | | //Only if there are available mixers |
|---|
| 43 | | if (confMngr.getMcus().size()>0) { |
|---|
| | 86 | //Only if there are available mixers and profiles |
|---|
| | 87 | if (confMngr.getMcus().size()>0 && confMngr.getProfiles().size()>0) { |
|---|
| 44 | 88 | %> |
|---|
| 45 | 89 | <fieldset> |
|---|
| … | … | |
| 48 | 92 | <tr> |
|---|
| 49 | 93 | <th>ID</th> |
|---|
| | 94 | <th>DID</th> |
|---|
| | 95 | <th>#</th> |
|---|
| 50 | 96 | <th>Name</th> |
|---|
| 51 | 97 | <th>Mixer</th> |
|---|
| … | … | |
| 63 | 109 | <tr> |
|---|
| 64 | 110 | <td><%=conf.getId()%></td> |
|---|
| | 111 | <td><%=conf.getDID()%></td> |
|---|
| | 112 | <td><%=conf.getNumParcitipants()%></td> |
|---|
| 65 | 113 | <td><%=conf.getName()%></td> |
|---|
| 66 | 114 | <td><%=conf.getMixer().getName()%></td> |
|---|
Download in other formats:
|
|