Skip to content

Migrate performance statistics to new API #1526

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 1 commit into
base: staging
Choose a base branch
from

Conversation

mhoyer-streamlabs
Copy link
Contributor

@mhoyer-streamlabs mhoyer-streamlabs commented May 9, 2025

Description

Update the performance statistics to the new API.
-laggedFrames and totalFrames remain in osn::Global
-skippedFrames and encodedFrames remain in osn::Video
-droppedFrames, totalFrames, kbitsPerSec, dataOutput move to osn::Streaming and are based on a Streaming object ID
-cpuPercentage, currentFrameRate, averageTimeToRender, diskSpaceAvailable, and memoryUsage move out of nodeobs_api (OBS_API_getPerformanceStatistics) into individual functions in osn::Global
-OBS_API_getPerformanceStatistics remains to keep current functionality but will be deprecated

There is a new StopCPUMonitoring functin in osn::Global to destroy the CPU usage object. It is currently called in OBS_API_destroyOBS_API (nodeobs_api.cpp) but will need to be called elsewhere when that is deprecated.

Motivation and Context

Updating to the new API.

How Has This Been Tested?

OSN test files have been updated to test new functionality.

Types of changes

New feature (non-breaking change which adds functionality)
Tweak (non-breaking change to improve existing functionality)

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.

@mhoyer-streamlabs mhoyer-streamlabs changed the title Mh perf stats update Migrate performance statistics to new API May 12, 2025
Formatting

Formatting, null checks, and destroy CPU usage object
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.

1 participant