Hate to resurrect and old thread.. but I do have the need to redirect a play request to a new container.
So my base streamDir in the Application xml is something like this:
/content/
That is used for recording. When someone requests to play a stream I want the content to be served from something like this:
/processed_content/
I have tried switching the stream storage dir in the onPlay and onPublish handlers.. like so:
Code:
public void onPlay(IMediaStream stream, String streamName, double playStart, double playLen, int playReset)
{
log("onPlay: "+stream.getName());
stream.getClient().getAppInstance().setStreamStorageDir("/processed_content/");
}
public void onPublish(IMediaStream stream, String streamName, boolean isRecord, boolean isAppend)
{
log("onPublish: "+streamName);
stream.getClient().getAppInstance().setStreamStorageDir("/content/");
}
That doesn't seem to be working.. I've even tried to switch the stream name for the stream. I've started to look into the IMediaStreamPlay object to see if I can use that.
Thanks for any and all help.
Jake