How can I get Wowza to initiate restreaming in response to, say, a request by a Flash client?
You can use netconnection.call and the MediaCaster API:
client-side:
netconnection.call("startMediaCasterStream", "somestream.stream");
Where “some.stream” is a text file in content folder that might have an RTSP url to an IP camera, for example. Or you could just send the rtsp url as a parameter or other MediaCaster source.
Server-side:
package com.wowza.wms.example.module;
import com.wowza.wms.amf.*;
import com.wowza.wms.client.*;
import com.wowza.wms.module.*;
import com.wowza.wms.request.*;
public class ModuleMediaCasterExample extends ModuleBase {
public void startMediaCasterStream(IClient client,
RequestFunction function, AMFDataList params) {
String streamName = params.getString(PARAM1);
client.getAppInstance().startMediaCasterStream(streamName, "rtp");
}
}
Richard