示例#1
0
void OBS::StopRecording()
{
    if(!bRecording) return;

    VideoFileStream *tempStream = NULL;

    tempStream = fileStream;
    // Prevent the encoder thread from trying to write to fileStream while it's closing
    fileStream = NULL;

    delete tempStream;
    tempStream = NULL;
    bRecording = false;

    ReportStopRecordingTrigger();

    SetWindowText(GetDlgItem(hwndMain, ID_TOGGLERECORDING), Str("MainWindow.StartRecording"));

    if(!bStreaming) Stop();
}
示例#2
0
文件: OBSCapture.cpp 项目: agante/OBS
void OBS::StopRecording()
{
    if (!bStreaming && !bRecordingReplayBuffer && bRunning && bRecording) Stop(true);

    if(!bRecording) return;

    VideoFileStream *tempStream = NULL;

    tempStream = fileStream;
    // Prevent the encoder thread from trying to write to fileStream while it's closing
    fileStream = NULL;

    delete tempStream;
    tempStream = NULL;
    bRecording = false;

    ReportStopRecordingTrigger();

    ConfigureStreamButtons();
}