Im also interested aswell, im also filling a hashmap with values to
fudge the FMS virtual directories feature, but applied in the
filenamegenerator bean for now. Im wondering what the most safe and
efficient way to add these values are ?

public void setVirtualDirectories(String virtualDirectories) {
vdirectories = new HashMap<String,String>();
directories = virtualDirectories.split(",");
for (int i = 0; i < directories.length; i++) {
directories[i] = directories[i].trim();
String[] paths = directories[i].split(";");

if (!paths[0].equals("") && !paths[1].equals(""))
{
vdirectories.put(paths[0], paths[1]);
}
}
}

public String generateFilename(IScope scope, String name,
String extension, GenerationType type) {
String filename;

filename = playbackPath + name;

String[] paths = name.split("/");


if ((vdirectories.size() > 0) && vdirectories.containsKey(paths[0]))
{
filename = vdirectories.get(paths[0]) + paths[1];
}

log.info("Generated FilePath: " + filename);
return filename;

}

the first path is split from the filename.

properties setting

virtualDirectories=dir1;file:C:/somedir, dir2;file:D:/somedir


Sam Bou wrote:
> Is Red5 single or multi-threaded?  I noticed that in 
> http://mirror1.cvsdude.com/trac/osflash/red5/changeset/1732 that the default 
> is multi-threaded but I'm not sure if that is only for the IO processes or 
> for other processes as well.  
>
> If it's multi-threaded, as a Java newbie I'm wondering if I need to 
> synchronize the appConnect and other methods if I have something like the 
> following, where many connections will be accessing the same variables 
> clientCount and clientsMap:
>
>
>
>
> public class Application extends ApplicationAdapter {
>     
>     private int clientCount = 0;
>     
>     private Map<String, List<String>> clientsMap = new HashMap<String, 
> List<String>>();
>
>     public boolean appConnect(IConnection conn, Object[] params) {
>
>              clientCount++;
>
>             clientsMap.put(clientId, clientInfoList);
>     }
>
>
>
>
> Any advice appreciated.   
>
> Sam
>
>  _______________________________________
>  YM - 離線訊息
>  就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
>  http://messenger.yahoo.com.hk
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Red5 mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/red5_osflash.org
>   


_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to