Re: [Red5] Pls help me with RED5.

2007-06-04 Thread Red5

Hi ,

I tried with some basic concepts in JAVA and I got succeed in the user
list maintenance in Red5 server. I have attached my source here :)

//

///



package mydemo;

import org.red5.server.adapter.ApplicationAdapter;
import org.red5.server.api.IConnection;
import org.red5.server.api.IScope;
import org.red5.server.api.IClient;
import org.red5.server.api.Red5;
import org.red5.server.api.service.IServiceCapableConnection;
import org.red5.server.api.service.ServiceUtils;

public class Application extends ApplicationAdapter {

ListString MyUsersList = new ArrayListString();
String UserNames[];
int UserCount;
String listitems = ;
public void getUserlists() {
listitems = ;
IteratorString it = MyUsersList.iterator();
while (it.hasNext()) {
String user = it.next();
if (user != )
listitems += user + ,;
}
IConnection Iconn = Red5.getConnectionLocal();
IScope scope = Iconn.getScope();
IteratorIConnection itr = scope.getConnections();
while (itr.hasNext()) {
IConnection conn = itr.next();
if (conn instanceof IServiceCapableConnection) {
((IServiceCapableConnection) conn).invoke(
updateUsersListPannel, new 
Object[] { listitems });
}
}

}

public void addToUserList(String newUser, String id) {
boolean canadd = true;
IteratorString it = MyUsersList.iterator();
while (it.hasNext()) {
String existingUser = it.next();
if (existingUser.equals(newUser)) {
canadd = false;
return;
}
}
int idval = Integer.parseInt(id);
if (canadd) {
MyUsersList.add(idval, newUser);
IConnection Iconn = Red5.getConnectionLocal();
IScope scope = Iconn.getScope();
IteratorIConnection itr = scope.getConnections();
while (itr.hasNext()) {
IConnection conn = itr.next();
if (conn instanceof IServiceCapableConnection) {
((IServiceCapableConnection) conn)

.invoke(ShowNewUserEntry,
new 
Object[] { newUser });
}
}
}
}

@Override
public boolean appStart(IScope room) {
MyUsersList.removeAll(MyUsersList);
return true;
}

@Override
public boolean appConnect(IConnection conn, Object[] params) {
addToUserList(params[0].toString(), conn.getClient().getId());
return true;
}

public void appDisconnect(IConnection Iconn) {
IClient client = Iconn.getClient();
IScope scope = Iconn.getScope();
String connid = client.getId();
IteratorIConnection it = scope.getConnections();
while (it.hasNext()) {
IConnection conn = it.next();
if (conn instanceof IServiceCapableConnection) {
((IServiceCapableConnection) 
conn).invoke(QuitUser,
new Object[] { MyUsersList

.get(Integer.parseInt(connid)) });
}
}
MyUsersList.set(Integer.parseInt(connid), );
getUserlists();
}

public void sendMyLobbyMessage(String Msg, String MsgSender) {
ServiceUtils.invokeOnAllConnections(sendMsgToLobby, new 
Object[] {
MsgSender, Msg });
}
}

///

//


I am using the LISTs concept is java. But, if anyone knows better idea
than this , keep posting to this forum..




Thanks and Regards,

Arun.A


-- 
a_arunonline

Re: [Red5] Pls help me with RED5.

2007-06-03 Thread Red5

Hi everyone...

I found the solution and its only by my hard work. Anyway, thanks a
lot...


Regards,

Arun.A


-- 
a_arunonline

a_arunonline's Profile: 12
View this thread: http://www.nixspot.com/red5/showthread.php?t=1101


___
Red5 mailing list
Red5@osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org


[Red5] Pls help me with RED5.

2007-06-01 Thread Red5

I am a newbie to RED5 server.
I have developed a chat application in FMS and I am migrating that to
RED5. Moreover, I have learned well about the ant server, red5 server
and red5 connections.
But, i am struggling with the big problem of maintaining the user
lists. Here is my Application.class code.

///

package testchat;

import org.red5.server.adapter.ApplicationAdapter;
import org.red5.server.api.IConnection;
import org.red5.server.api.IScope;
import org.red5.server.api.so.ISharedObject;
import org.red5.server.api.Red5;
import java.util.HashMap;

public class Application extends ApplicationAdapter {


String Uname;
public Object sendMsg() {
ISharedObject so;
IScope a = Red5.getConnectionLocal().getScope();
so = getSharedObject(a, so_users, false);
return so;
}

String userNames[];
int UserCount;
public boolean appStart(IScope room) {
createSharedObject(room, userlists, false);
return true;
}

@Override
public boolean appConnect(IConnection conn, Object[] params) {
ISharedObject so;
IScope a = Red5.getConnectionLocal().getScope();
so = getSharedObject(a, so_users, false);
so.beginUpdate();
HashMapString, Object hm = new HashMapString, Object();
hm.put(username, params[0]);
so.setAttribute(conn.getClient().getId(), hm);
so.endUpdate();
return true;
}

}



Here , i dont know whether i am right at this moment or not. Just , i
want to maintain the active connections information with the client
names. Here, I have tried with SharedObject and when try to get this
object in Flash the server cannot be connected and even doesnt do
anything when i try to complile the flash files. If possible, can you
anyone give me the server side code for this needs


Thanks in advance..
Regards,

Arun.A


-- 
a_arunonline

a_arunonline's Profile: 12
View this thread: http://www.nixspot.com/red5/showthread.php?t=1101


___
Red5 mailing list
Red5@osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org


Re: [Red5] Red5 showcase: spreed.com

2007-05-15 Thread Red5

Hi Joachim!

I joined spreed... looking forward to trying it out with some friends!

Oh, wait a minute, I spend so much time on my computer that I don't
think I have any friends.:-)


-- 
webwheeler

Good judgement comes from experience. Experience comes from bad
judgement.

webwheeler's Profile: 7
View this thread: http://www.nixspot.com/red5/showthread.php?t=936


___
Red5 mailing list
Red5@osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org


[Red5] Selection of video codec on flash app

2007-04-20 Thread Dave Red5

Dear all,

I'm working with red5 right now, I would appreciate if anybody could tell me
how flash plugin 8 or 9 select either the Sorenson or the VP6 codec for live
stream publishing. Is it configurable or it's automatically selected by the
flash player based on quality, bw, etc..?

BTW, any good profile for 320x240 and 300 kbps BW to achieve a decent frame
rate?

Perhaps I'm a bit offtopic but I would appreciate your help!

Best regards and thanks in advance!

Dave
___
Red5 mailing list
Red5@osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org


[Red5] Maximum Simultaneous Connections

2007-04-05 Thread RED5
Hello? 

Nice to meet you. 

This is the first time to post in mailing list. 

 

I wanna know the max. simultaneous connections of RED5.

Is there anybody who knows that? 

I searched web site and help information, but I couldn’t find that. 

Please let me know. 

 

Thanks a lot. 

Bye. 

 

 

 

___
Red5 mailing list
Red5@osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org


Re: [Red5] Red5 and Mysql

2007-03-17 Thread Red5

yes, unless you purchased the mysql package

information that i could find on using mysql with red5 was few
and far between. this worked so i thought i would share it...

. m a r c o s   a u g u s t o;113 Wrote: 
 Hmmm... the Connector/J uses GPL license... so...
 Anything I do that use it, need to be open source ?
 
 
 On 3/16/07, Red5 Forum red5 (AT) nixspot (DOT) com wrote:
 
  I spent a lot of time reading different sites on how to use mysql and
  red5
  this is what i got put together to get a basic connection and
  insert some data into the database and retrieve it back from the
  database.
 
 
  you will need to download the jconnector from the mysql site
  http://dev.mysql.com/downloads/connector/j/5.0.html
  and extract it into you WEB-INF/lib folder for your project
 
  Server Side Java code
 
  package demo;
 
  import org.red5.server.adapter.ApplicationAdapter;
  import java.sql.*;
 
  public class Application extends ApplicationAdapter {
  int id_num = 0;
  String name = ;
 
  ///MYSQL SECTION
  public String mysql() {
  try {
  Statement stmt;
  ResultSet queryresult;
  Class.forName(com.mysql.jdbc.Driver);
  String url = jdbc:mysql://localhost/dbname;
  Connection mysql_conn = DriverManager.getConnection(
  url,dbuser, dbpassword);
  stmt = mysql_conn.createStatement();
  stmt.executeUpdate(INSERT INTO table (id , name) VALUES
  (null , 'somevalue'));
  queryresult = stmt.executeQuery(SELECT * from table
  ORDER BY id LIMIT 1);
  while(queryresult.next()){
  int var1= queryresult.getInt(id);
  String var2= queryresult.getString(name);
  id_num = var1;
  name = var2;
  }
  mysql_conn.close();
  }catch( Exception e ) {
  e.printStackTrace();
  }
  return name + / + id_num;
  }
  //END MYSQL SECTION
  }
  Client Side Flash code
 
  mysql.onRelease = function() {
  var mysqlObj:Object = new Object();
  nc.call(mysql, mysqlObj);
  mysqlObj.onResult = function(test) {
  var my_str:String = test;
  var my_array:Array = my_str.split(/);
  id.text = (my_array[0]);
  id_name.text = (my_array[1]);
  };
  };
 
 
  --
  Donald
 
  'NixSpot' (http://www.nixspot.com)'
  ' (http://www.nixspot.com/red5/../)
 
 
  Donald's Profile: 1
  View this thread: http://www.nixspot.com/red5/showthread.php?t=42
 
 
  ___
  Red5 mailing list
  Red5 (AT) osflash (DOT) org
  http://osflash.org/mailman/listinfo/red5_osflash.org
 
 
 
 -- 
 .. m a r c o sa u g u s t o  ;
 
 ..eu vim para confundir e não para explicar!. . . - Chacrinha
 
 ___
 Red5 mailing list
 Red5 (AT) osflash (DOT) org
 http://osflash.org/mailman/listinfo/red5_osflash.org


-- 
Donald

'NixSpot.com' (http://www.nixspot.com/red5)'
' (http://www.nixspot.com/red5/../)

Donald's Profile: 1
View this thread: http://www.nixspot.com/red5/showthread.php?t=42


___
Red5 mailing list
Red5@osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org


Re: [Red5] Red5 forum?

2007-03-16 Thread red5

after i went back and looked i saw the link to it,
I put together a forum that imports all the posts from the mailing
list to threads. 
if anyone else wants to use thats great but i find 
it easier to read in a forum setting, and i got this extra vbulletin 
license just sitting here :)

this is the first try at it so maybe it is working and this message
will get sent back to the mailing list.

Donald


-- 
Donald

Donald's Profile: 1
View this thread: http://www.nixspot.com/red5/showthread.php?t=23


___
Red5 mailing list
Red5@osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org


Re: [Red5] osflash: red5 page restructured

2007-03-16 Thread Red5 Forum

looks a lot cleaner, easier to navigate


-- 
Donald

Donald's Profile: 1
View this thread: http://www.nixspot.com/red5/showthread.php?t=25


___
Red5 mailing list
Red5@osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org


[Red5] Red5 and Mysql

2007-03-16 Thread Red5 Forum

I spent a lot of time reading different sites on how to use mysql and
red5
this is what i got put together to get a basic connection and
insert some data into the database and retrieve it back from the
database.


you will need to download the jconnector from the mysql site
http://dev.mysql.com/downloads/connector/j/5.0.html
and extract it into you WEB-INF/lib folder for your project

Server Side Java code

package demo;

import org.red5.server.adapter.ApplicationAdapter;
import java.sql.*;

public class Application extends ApplicationAdapter {
int id_num = 0;
String name = ;

///MYSQL SECTION
public String mysql() {
try {
Statement stmt;
ResultSet queryresult;
Class.forName(com.mysql.jdbc.Driver);
String url = jdbc:mysql://localhost/dbname;
Connection mysql_conn = DriverManager.getConnection(
url,dbuser, dbpassword);
stmt = mysql_conn.createStatement();
stmt.executeUpdate(INSERT INTO table (id , name) VALUES
(null , 'somevalue'));
queryresult = stmt.executeQuery(SELECT * from table
ORDER BY id LIMIT 1);
while(queryresult.next()){
int var1= queryresult.getInt(id);
String var2= queryresult.getString(name);
id_num = var1;
name = var2;
}
mysql_conn.close();
}catch( Exception e ) {
e.printStackTrace();
}
return name + / + id_num;
}
//END MYSQL SECTION
}
Client Side Flash code

mysql.onRelease = function() {
var mysqlObj:Object = new Object();
nc.call(mysql, mysqlObj);
mysqlObj.onResult = function(test) {
var my_str:String = test;
var my_array:Array = my_str.split(/);
id.text = (my_array[0]);
id_name.text = (my_array[1]);
};
};


-- 
Donald

'NixSpot' (http://www.nixspot.com)'
' (http://www.nixspot.com/red5/../)

Donald's Profile: 1
View this thread: http://www.nixspot.com/red5/showthread.php?t=42


___
Red5 mailing list
Red5@osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org


Re: [Red5] adobe flash media encoder

2007-03-16 Thread Red5 Forum

FME crashed red5 was still running fine, i tired it using windows XP
with a server running locally and with my main red5 server (Linux -
Centos)
crashed every time, and also as far as FME goes i could not get it to 
run at all on Vista.


Thijs Triemstra | Collab;68 Wrote: 
 
 Donald,
 
 what crashed, Red5 or FME? I don't have a windows machine to test it  
 with atm but mabye anyone can tell us how it performs with red5 vs.  
 flash media server..
 
 Thijs
 
 Op 16-mrt-2007, om 2:05 heeft Donald het volgende geschreven:
 
  I have tried it a few times with different cams and it crashed every
  time, would be a great option
  once it is stable.
 
  Joachim Bauch wrote:
  Hey guys,
 
  Chris Allen schrieb:
 
  Well I bet it's possible to figure out what they are doing and add
  that to Red5 so that it is compatible.
 
 
  Yep, and this was done in r1760 ;) FME can now connect and broadcast
  to Red5!
 
  FME seems to be not too stable, at least it crashed a lot of times
  with AVs while trying to connect it to Red5. They seem to expect
  certain objects (like the response to connect) to be serialized
  in a given order, so that took a while to figure out...
 
  Joachim
 
 
  ___
  Red5 mailing list
  Red5 (AT) osflash (DOT) org
  http://osflash.org/mailman/listinfo/red5_osflash.org
 
 
 
 
 
 
  ___
  Red5 mailing list
  Red5 (AT) osflash (DOT) org
  http://osflash.org/mailman/listinfo/red5_osflash.org
 
 
 ___
 Red5 mailing list
 Red5 (AT) osflash (DOT) org
 http://osflash.org/mailman/listinfo/red5_osflash.org


-- 
Donald

'NixSpot' (http://www.nixspot.com)'
' (http://www.nixspot.com/red5/../)

Donald's Profile: 1
View this thread: http://www.nixspot.com/red5/showthread.php?t=41


___
Red5 mailing list
Red5@osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org


[Red5] Flash admin interface

2007-03-16 Thread Red5

Is there a flash based interface similar to Flash Media Server admin
interface
for Red5? If not is it possible to to get total users connected to the
server?
something similar to getclients().size() for a single app, but used all
apps on the server?


-- 
Donald

'NixSpot.com' (http://www.nixspot.com/red5)'
' (http://www.nixspot.com/red5/../)

Donald's Profile: 1
View this thread: http://www.nixspot.com/red5/showthread.php?t=52


___
Red5 mailing list
Red5@osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org