|
List Info
Thread: Fwd: add cue points to a recording stream
|
|
| Fwd: add cue points to a recording
stream |

|
2008-03-01 10:02:25 |
|
Hi All,
this is the first time I've posted, apologies if any of it is not clear. First I just want to say what a great product Red5 is, i've found it incredibly useful, thanks to all involved in dev work.
I am trying to add cue points to a recording as it is being recorded from a clients webcam, the reason for this is that I need the data in the cuepoint to be synchronised almost exactly with the recording. I have googled high and low to find how to do this and so far all I have come across this post: http://www.underbrush.ca/read.php?id=1189176972 .
My code looks like this, on as3 side:
//once the nc Netconnection, ns netstream, has been established:
ns.publish(sessionId, "record"); nc.call("CuePointHandler.embedCuePoint", res, 1,5 );
where res is the result handler, and 1,5 are the 2 variables I want to send to the red5 server to create the cuePoint. And on the red5 side:
public class CuePointHandler {
public String embedCuePoint( int x, int y)
{ MetaCue cue = new MetaCue(); cue.setTime( 0 ); // Time in seconds cue.setType( "event" ); // cue type, "event" or "navigation" cue.setName( "myCuePoint" ); // name for this event
cue.put("x" , x ); // property "that", value "this" cue.put("y", y); return "your cue point is:" + cue.toString();
} }
This initial code works very roughly, but i have a few questions about it, as there is much I haven't solved:
- is NetConnection.call() the right method to use in this situation, should I be using NetStream.send() instead? if so how do i use it?
- the time variable in the java code is currently hardcoded, how do I access the current time of the recording stream?
- I guess to write the cuepoints into the stream I need to override the appDisconnect method of the Application class, to add the cuepoints once the stream has finished recording, do people think this is the write approach?
- -- if it is the right approach how do I get a handle on the FLV to append the data to it?
thanks
Luke
|
[1]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|