# IStreamRecorderFileVersionDelegate does not trigger

**URL:** <https://community.wowza.com/t/istreamrecorderfileversiondelegate-does-not-trigger/33618>\
**Category:** Wowza Streaming Engine\
**Created:** [February 4, 2015, 1:41am UTC](https://community.wowza.com/t/istreamrecorderfileversiondelegate-does-not-trigger/33618 "2015-02-04T01:41:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karel\_Boek](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/karel_boek/32/454_2.png) [@Karel\_Boek](https://community.wowza.com/u/Karel_Boek)\
**Post date:** [February 4, 2015, 1:41am UTC](https://community.wowza.com/t/istreamrecorderfileversiondelegate-does-not-trigger/33618/1 "2015-02-04T01:41:49Z")

</div>

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

```auto
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.

```auto
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)

---

<div class="post-metadata">

**Author:** ![Matt\_Young](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/matt_young/32/389_2.png) [@Matt\_Young](https://community.wowza.com/u/Matt_Young)\
**Post date:** [February 6, 2015, 10:49am UTC](https://community.wowza.com/t/istreamrecorderfileversiondelegate-does-not-trigger/33618/2 "2015-02-06T10:49:54Z")

</div>

This is being reviewed in ticket #117416.

Thanks,

Matt
