Skip to content

Add pause-resume feature to ffmpeg plugin to auto pause when switching away#7541

Closed
dcmouser wants to merge 1 commit intoobsproject:masterfrom
dcmouser:pull-ffmpeg
Closed

Add pause-resume feature to ffmpeg plugin to auto pause when switching away#7541
dcmouser wants to merge 1 commit intoobsproject:masterfrom
dcmouser:pull-ffmpeg

Conversation

@dcmouser
Copy link

@dcmouser dcmouser commented Oct 6, 2022

Added option for ffmpeg (video) sources to say they want to be paused on deactivate and resumed on activate, instead of default to stop and restart.

Description

This patch adds a checkbox option to video sources (after "close file when inactive"), labeled "pause and resume"; when enabled the video source will be PAUSED when the source is deactivated, and then RESUMED when it is later reactivated. This is in contrast to the other options which allow EITHER that video sources are stopped/unloaded and restarted, or are left playing in the background.

Motivation and Context

This is based on this request:
https://obsproject.com/forum/threads/request-for-video-media-source-pause-and-unpause-when-showing-hiding.154270/#post-565354
The two motivations are: 1) to allow video sources to be paused when switched away from and then resumed and 2) to reduce cpu use when not showing a scene with a video that you will return to.

How Has This Been Tested?

Tested on windows OBS version 28; it's a super simple modification which makes no assumptions about the video sources.

Types of changes

New feature (non-breaking change which adds functionality)

Checklist:

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

NOTE: This is my first contribution to OBS -- please feel free to modify it as you see fit.

…g away

Add pause-resume feature to ffmpeg plugin to auto pause when switching away
Copy link
Member

@gxalpha gxalpha left a comment

Choose a reason for hiding this comment

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

See the unresolved comment on #6112 (review).
The part about commit messages applies to all your recently opened Pull Requests.

@gxalpha gxalpha added New Feature New feature or plugin UI/UX Anything to do with changes or additions to UI/UX elements. labels Oct 6, 2022
@dcmouser
Copy link
Author

dcmouser commented Oct 6, 2022

I'm happy to withdraw this pull request in favor of this one: #6739

@dcmouser dcmouser closed this Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Feature New feature or plugin UI/UX Anything to do with changes or additions to UI/UX elements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants