Skip to content

Expose obs_output_force_stop on the NodeObs API #1533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: staging
Choose a base branch
from

Conversation

aza547
Copy link

@aza547 aza547 commented Jun 7, 2025

Description

Adds the OBS_service_stopRecordingForce function to the NodeObs API. This wraps the obs_output_force_stop function within libobs.

Motivation and Context

My application has a use case where I often want to stop recording and don't care about the resulting video file, so a force stop is appropriate.

How Has This Been Tested?

Manually, although I think adding tests for this is in theory trivial as it should fit in the existing framework. I had a go and couldn't get them to run on my PC. Figured I'd see if you're interested in this before I spend more time here. If you are keen to have this function, I'd be happy to take another look at some tests.

Types of changes

Exposes a new function on the NodeObs API. No changes to existing functions.

Checklist:

  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@CLAassistant
Copy link

CLAassistant commented Jun 7, 2025

CLA assistant check
All committers have signed the CLA.

{
blog(LOG_WARNING, "stopRecordingForce called");

if (recordingOutput && obs_output_active(recordingOutput))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor codestyle issue. wrong indentation.

@summeroff
Copy link
Contributor

to test this function using tests.

create copy of this test

it('Simple mode - Start recording and stop', async function() {

name it something like "Simple mode - Start recording and force stop"

In console in repo folder(after build was completed).

yarn install
yarn test -g "Simple mode - Start recording and force stop"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants