Encoders_CreateInstanceForRecording
Delphi
function Encoders_CreateInstanceForRecording (OutputFile: string): LongInt;
C++Builder
System::LongInt __fastcall Encoders_CreateInstanceForRecording(System::UnicodeString OutputFile);
C#
public int Encoders_CreateInstanceForRecording(string OutputFile);
VB.NET
Public Function Encoders_CreateInstanceForRecording(OutputFile As String) As Integer
C++/Qt
int Encoders_CreateInstanceForRecording (wchar_t *OutputFile);
Adds a Datastead Encoder instance to the graph, to write to a new file.
Returns a unique ID for this encoder. This unique ID is required to invoke Encoder_SetInt, Encoder_GetInt, Encoder_SetStr, Encoder_Pause, Encoder_Resume, Encoder_NewOutputFile or Encoders_RemoveInstance.
The instance is used only once enabled with Encoder_SetInt: Enc_IsActive_bool = 1, plus Enc_Video_Enabled_bool = 1 and/or Enc_Audio_Enabled_bool = 1. TVideoGrabber is then started with StartPreview, which sends the audio/video samples to the active instances.
Invoke this function while the video is stopped. Returns -1 if the video is running or if the Datastead Multipurpose Encoder is not installed. If an instance already writes to the same file, its ID is returned.