obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

libobs, plugins: Remove unnecessary output implementation calls

Open tt2468 opened this issue 1 year ago • 0 comments

Description

Moves the initial calling of two output methods to libobs, and deprecates them:

  • obs_output_can_begin_data_capture()
  • obs_output_initialize_encoders()

Motivation and Context

After noticing that every output does effectively the same thing regarding these two functions, I determined that they could actually be moved to libobs entirely without any change in behavior. This cleans up a good amount of code and opens the door for further refactors of the outputs code later down the line.

How Has This Been Tested?

Ubuntu 22.04

Tested with every combination of:

  • Starting/stopping stream
  • RTMP, WHIP
  • Enabling/disabling stream delay
    • Stopping both forcefully and gracefully
  • Streaming to services which deny the incoming connection, causing output failure

Types of changes

  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Documentation (a change to documentation pages)

Checklist:

  • [x] My code has been run through clang-format.
  • [x] I have read the contributing document.
  • [x] My code is not on the master branch.
  • [x] The code has been tested.
  • [x] All commit messages are properly formatted and commits squashed where appropriate.
  • [x] I have included updates to all appropriate documentation.

tt2468 avatar May 08 '24 08:05 tt2468