Skip to content

RecordToNewFileNow

function

Delphi
function RecordToNewFileNow (NewRecordingFileName: string; ResetStreamTime: Boolean): Boolean;
C++Builder
bool __fastcall RecordToNewFileNow(System::UnicodeString NewRecordingFileName, bool ResetStreamTime);
C#
public bool RecordToNewFileNow(string NewRecordingFileName, bool ResetStreamTime);
VB.NET
Public Function RecordToNewFileNow(NewRecordingFileName As String, ResetStreamTime As Boolean) As Boolean
C++/Qt
BOOL RecordToNewFileNow (wchar_t *NewRecordingFileName, BOOL ResetStreamTime);

Creates a new file during recording: RecordToNewFileNow closes the current recording file and creates a new recording file according to the NewRecordingFileName parameter (used in place of the RecordingFileName property):

  • if NewRecordingFileName is empty, a new file name is generated automatically according to the StoragePath, AutoFileName and AutoFilePrefix properties;

  • if NewRecordingFileName specifies a file name, this file name is used to create the new file.

With the built-in Matroska writer (rm_MKV), the built-in MP4 writer (rm_MP4, and rm_MP3 / rm_WMA audio recordings) and the AVI recordings (rm_AVI), the file is switched while the capture goes on: the files follow each other without gap and the new file starts at a key frame. RecordToNewFileNow returns once the new file is started; meanwhile the messages of the application are processed (timers and events can be raised during the call).

The Datastead Multipurpose Encoder also switches the file without stopping the capture. With the other recording methods, and with the AVI recordings combined with network streaming, PreallocCapFileEnabled or CompressionMode = cm_CompressAfterRecording, the recording graph is stopped and started again, which leaves a short gap between the files.