Changeset 53
- Timestamp:
- 05/19/08 10:39:38
(3 months ago)
- Author:
- sip
- Message:
Added FLV preliminary support
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r33 |
r53 |
|
| 39 | 39 | private Integer slots[]; |
|---|
| 40 | 40 | private Profile profile; |
|---|
| | 41 | private Integer FLVWatcherPort; |
|---|
| 41 | 42 | |
|---|
| | 43 | |
|---|
| 42 | 44 | /** Creates a new instance of Conference */ |
|---|
| 43 | | protected Conference(Integer id,String name,String did,MediaMixer mixer,Profile profile) { |
|---|
| | 45 | protected Conference(Integer id,String name,String did,MediaMixer mixer,Integer size,Integer compType,Profile profile) { |
|---|
| 44 | 46 | //Save values |
|---|
| 45 | 47 | this.id = id; |
|---|
| … | … | |
| 49 | 51 | this.profile = profile; |
|---|
| 50 | 52 | //Default composition and size |
|---|
| 51 | | this.compType = XmlRpcMcuClient.MOSAIC2x2; |
|---|
| 52 | | this.size = XmlRpcMcuClient.CIF; |
|---|
| | 53 | this.compType = compType; |
|---|
| | 54 | this.size = size; |
|---|
| 53 | 55 | this.numSlots = XmlRpcMcuClient.getMosaicNumSlots(compType); |
|---|
| 54 | 56 | //Create conference slots |
|---|
| … | … | |
| 158 | 160 | return slots.clone(); |
|---|
| 159 | 161 | } |
|---|
| | 162 | |
|---|
| | 163 | public Integer getFLVWatcherPort() { |
|---|
| | 164 | return FLVWatcherPort; |
|---|
| | 165 | } |
|---|
| | 166 | |
|---|
| | 167 | public void setFLVWatcherPort(Integer FLVWatcherPort) { |
|---|
| | 168 | this.FLVWatcherPort = FLVWatcherPort; |
|---|
| | 169 | } |
|---|
| | 170 | |
|---|
| 160 | 171 | |
|---|
| 161 | 172 | } |
|---|
| r33 |
r53 |
|
| 47 | 47 | } |
|---|
| 48 | 48 | |
|---|
| 49 | | public Conference createConference(String name,String did, String mixerId,String profileId) { |
|---|
| | 49 | public Conference createConference(String name,String did, String mixerId,Integer size,Integer compType,String profileId) { |
|---|
| 50 | 50 | Integer confId; |
|---|
| 51 | 51 | Conference conf = null; |
|---|
| … | … | |
| 58 | 58 | confId = mixer.CreateConference(name); |
|---|
| 59 | 59 | //Create conference object |
|---|
| 60 | | conf = new Conference(confId, name, did, mixer, profile); |
|---|
| | 60 | conf = new Conference(confId, name, did, mixer, size, compType, profile); |
|---|
| 61 | 61 | //Lock conferences |
|---|
| 62 | 62 | synchronized (conferences) { |
|---|
| … | … | |
| 64 | 64 | conferences.put(conf.getUID(), conf); |
|---|
| 65 | 65 | } |
|---|
| | 66 | //Set composition type |
|---|
| | 67 | mixer.SetCompositionType(confId, compType, size); |
|---|
| | 68 | //Create watcher |
|---|
| | 69 | Integer port = mixer.CreateFLVWatcher(confId); |
|---|
| | 70 | //Set port |
|---|
| | 71 | conf.setFLVWatcherPort(port); |
|---|
| | 72 | |
|---|
| 66 | 73 | } catch (XmlRpcException ex) { |
|---|
| 67 | 74 | ex.printStackTrace(); |
|---|
| … | … | |
| 73 | 80 | //Get the conference |
|---|
| 74 | 81 | Conference conf = conferences.get(UID); |
|---|
| | 82 | //Get id |
|---|
| | 83 | Integer confId = conf.getId(); |
|---|
| 75 | 84 | //Remove conference from list |
|---|
| 76 | 85 | conferences.remove(UID); |
|---|
| … | … | |
| 79 | 88 | //Remove from it |
|---|
| 80 | 89 | try { |
|---|
| 81 | | mixer.DeleteConference(conf.getId()); |
|---|
| | 90 | //If it got a watcher |
|---|
| | 91 | if(conf.getFLVWatcherPort()!=0) |
|---|
| | 92 | //Remove it |
|---|
| | 93 | mixer.DeleteFLVWatcher(confId); |
|---|
| | 94 | //Remove conference |
|---|
| | 95 | mixer.DeleteConference(confId); |
|---|
| 82 | 96 | } catch (XmlRpcException ex) { |
|---|
| 83 | 97 | ex.printStackTrace(); |
|---|
| r14 |
r53 |
|
| 5 | 5 | <servlet-class>org.murillo.mcuWeb.MCUHttpServlet</servlet-class> |
|---|
| 6 | 6 | <load-on-startup>1</load-on-startup> |
|---|
| 7 | | </servlet> |
|---|
| | 7 | </servlet> |
|---|
| | 8 | <servlet> |
|---|
| | 9 | <servlet-name>FLVStreamer</servlet-name> |
|---|
| | 10 | <servlet-class>org.murillo.mcuWeb.FLVStreamer</servlet-class> |
|---|
| | 11 | <load-on-startup>2</load-on-startup> |
|---|
| | 12 | </servlet> |
|---|
| | 13 | <servlet-mapping> |
|---|
| | 14 | <servlet-name>FLVStreamer</servlet-name> |
|---|
| | 15 | <url-pattern>/FLVStreamer</url-pattern> |
|---|
| | 16 | </servlet-mapping> |
|---|
| 8 | 17 | <servlet-mapping> |
|---|
| 9 | 18 | <servlet-name>MCUHttpServlet</servlet-name> |
|---|
| 10 | 19 | <url-pattern>/controller/*</url-pattern> |
|---|
| 11 | 20 | </servlet-mapping> |
|---|
| | 21 | |
|---|
| 12 | 22 | <session-config> |
|---|
| 13 | 23 | <session-timeout> |
|---|
Download in other formats:
|
|