Changeset 53

Show
Ignore:
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
  • mcuWeb/src/java/org/murillo/mcuWeb/Conference.java

    r33 r53  
    3939    private Integer slots[]; 
    4040    private Profile profile; 
     41    private Integer FLVWatcherPort; 
    4142 
     43     
    4244    /** 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) { 
    4446        //Save values 
    4547        this.id = id; 
     
    4951        this.profile = profile; 
    5052        //Default composition and size 
    51         this.compType = XmlRpcMcuClient.MOSAIC2x2
    52         this.size = XmlRpcMcuClient.CIF
     53        this.compType = compType
     54        this.size = size
    5355        this.numSlots = XmlRpcMcuClient.getMosaicNumSlots(compType); 
    5456        //Create conference slots 
     
    158160        return slots.clone(); 
    159161    } 
     162     
     163    public Integer getFLVWatcherPort() { 
     164        return FLVWatcherPort; 
     165    } 
     166 
     167    public void setFLVWatcherPort(Integer FLVWatcherPort) { 
     168        this.FLVWatcherPort = FLVWatcherPort; 
     169    } 
     170 
    160171  
    161172} 
  • mcuWeb/src/java/org/murillo/mcuWeb/ConferenceMngr.java

    r33 r53  
    4747    } 
    4848 
    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) { 
    5050        Integer confId; 
    5151        Conference conf = null; 
     
    5858            confId = mixer.CreateConference(name); 
    5959            //Create conference object 
    60             conf = new Conference(confId, name, did, mixer, profile); 
     60            conf = new Conference(confId, name, did, mixer, size, compType, profile); 
    6161            //Lock conferences 
    6262            synchronized (conferences) { 
     
    6464                conferences.put(conf.getUID(), conf); 
    6565            } 
     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 
    6673        } catch (XmlRpcException ex) { 
    6774            ex.printStackTrace(); 
     
    7380        //Get the conference 
    7481        Conference conf = conferences.get(UID); 
     82        //Get id 
     83        Integer confId = conf.getId(); 
    7584        //Remove conference from list 
    7685        conferences.remove(UID); 
     
    7988        //Remove from it 
    8089        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); 
    8296        } catch (XmlRpcException ex) { 
    8397            ex.printStackTrace(); 
  • mcuWeb/web/WEB-INF/web.xml

    r14 r53  
    55        <servlet-class>org.murillo.mcuWeb.MCUHttpServlet</servlet-class> 
    66        <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> 
    817    <servlet-mapping> 
    918        <servlet-name>MCUHttpServlet</servlet-name> 
    1019        <url-pattern>/controller/*</url-pattern> 
    1120    </servlet-mapping> 
     21     
    1222    <session-config> 
    1323        <session-timeout> 
Copyright 2006 - Sergio García Murillo
Powered by Trac - Edgewall Software