[Red5] Re dBench

Daniel Rossi spam at electroteque.org
Sat Apr 19 11:38:29 PDT 2008


the streamevent handler was missing added it in but not sure if it  
will actually do anything

public void resultReceived(IPendingServiceCall call) {
			Integer streamIdInt = (Integer) call.getResult();
			RTMPConnection conn = connManager.getConnection();
			if (conn != null && streamIdInt != null) {
				NetStream stream = new NetStream();
				stream.setConnection(conn);
				stream.setStreamId(streamIdInt.intValue());
				conn.addClientStream(stream);
				NetStreamPrivateData streamData = new NetStreamPrivateData();
				streamData.outputStream =  
conn.createOutputStream(streamIdInt.intValue());
				streamData.handler = (INetStreamEventHandler) wrapped;
				streamData.connConsumer = new ConnectionConsumer(
						conn,
						streamData.outputStream.getVideo().getId(),
						streamData.outputStream.getAudio().getId(),
						streamData.outputStream.getData().getId()
						);
				streamDataMap.put(streamIdInt, streamData);
			}
			
		
			wrapped.resultReceived(call);
		}

it gets called around here


if (call.getServiceMethodName().equals("onStatus")) {
			// XXX better to serialize ObjectMap to Status object
			ObjectMap objMap = (ObjectMap) call.getArguments()[0];
			Integer clientId = (Integer) objMap.get("clientid");
			NetStreamPrivateData streamData = streamDataMap.get(clientId);
			if (streamData != null && streamData.handler != null) {
				streamData.handler.onStreamEvent(invoke);
			}
		}

On 20/04/2008, at 4:24 AM, Daniel Rossi wrote:

> i see this for onStreamEvent handlers
>
> streamData.handler.onStreamEvent(invoke);
>
> but the handler isnt even set so no callback
>
> i have my external class like
>
> public class Red5Bench implements INetStreamEventHandler,  
> IPendingServiceCallback {
>
> On 20/04/2008, at 3:57 AM, Peter Thomas wrote:
>>
>> On Sat, Apr 19, 2008 at 10:59 PM, Daniel Rossi  
>> <spam at electroteque.org> wrote:
>> Ok thanks heaps for that the jmeter ant tasks works well aswell  
>> assuming the correct parameters are set in the test plan file. It  
>> however crashes on osx for some reason when i try and bottleneck  
>> the server with 100 people at once. That syncronizer works well but  
>> i think its probably not right.
>>
>> Glad you got most of it working.  I have posted some code that can  
>> connect as well as save a remote stream to a local file over here:
>>
>> http://ptrthomas.wordpress.com/2008/04/19/how-to-record-rtmp-flash-video-streams-using-red5/
>>
>> You can probably use some of that code - you probably don't need  
>> the file-saving part.  I am able to detect the stream stop event  
>> (though I think there must be a better way), so it may help in  
>> getting answers on how to detect errors in the rtmp client, stop  
>> the sampler gracefully etc.
>>
>>
>>    [jmeter] Java HotSpot(TM) 64-Bit Server VM warning: Untested:  
>> pd_conjoint_jshorts_atomic in /SourceCache/HotSpot16/HotSpot16-45/ 
>> src/os_cpu/macosx_amd64/vm/copy_macosx_amd64.inline.hpp: 17
>>
>> Here is the updated zip which works standalone
>>
>> http://red5.electroteque.org/dev/bench/Red5Bench.zip
>>
>> have to run ant jmeter-start to configure the sampler data save the  
>> test plan and then run jmeter-test.
>>
>> the one last hurdle is detecting errors of playback in rtmp client  
>> and throwing exceptions so the sampler knows it was an errror and  
>> return a failure.
>>
>> On 20/04/2008, at 2:36 AM, Daniel Rossi wrote:
>>> well actually this works fine, just have to work out the proper  
>>> thread profile.
>>>
>>> <target name="jmeter-start">
>>> 	        <java classname="org.apache.jmeter.NewDriver" fork="true"  
>>> dir="${jmeter.home}/bin">
>>> 	            <classpath path="${jmeter.home}/bin/ApacheJMeter.jar"/>
>>> 	             <arg line="-t ../../Red5BenchPlan.jmx"/>
>>> 	            <jvmarg value="-Xmx512m"/>
>>> 	        </java>
>>> 	</target>
>>>
>>>
>>> _______________________________________________
>>> Red5 mailing list
>>> Red5 at osflash.org
>>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>>
>> _______________________________________________
>> Red5 mailing list
>> Red5 at osflash.org
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>>
>> _______________________________________________
>> Red5 mailing list
>> Red5 at osflash.org
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5_osflash.org/attachments/20080420/4c06311e/attachment-0001.html 


More information about the Red5 mailing list