Wowza Community

IStreamRecorderFileVersionDelegate does not trigger

I’ve created a module based on the ModuleAutoRecordAdvancedExample. It has a “startRecording” method that can be called from Flash/AS3 clients, with a simple implementation

public void startRecording(IClient client, RequestFunction function, AMFDataList params) {
    StreamRecorderParameters recordParams = new StreamRecorderParameters(_appInstance);
    recordParams.fileVersionDelegate = new FileVersionDelegate();
    String  streamName  = params.getString(PARAM1);
    // ...
    _vhost.getLiveStreamRecordManager().startRecording(_appInstance, streamName, params); 
}

In the FileVersionDelegate, I implement the IStreamRecorderFileVersionDelegate, because I want to add a timestamp to the filename of every file that is recorded.

public class FileVersionDelegate implements IStreamRecorderFileVersionDelegate {
    @Override
    public String getFilename(IStreamRecorder recContext) {
        File file = new File(recContext.getBaseFilePath());
        String basePath = file.getParent();
        String fileName = file.getName();
        return basePath + "/" + fileName + "_myTimestamp";
    }
}

I set a breakpoint at the first line in getFilename, but when I start recording and a file with the original filename does not exist, this method is not triggered. However, when I split recording or when a file with the original name exists, it’s triggered and works as expected.

What’s going wrong here?

Edit: Wowza 4.1.0 (build 12602)

This is being reviewed in ticket #117416.

Thanks,

Matt