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

UI,cmake: Get default video path on Linux with GLib

Open tytan652 opened this issue 1 year ago • 2 comments

Description

Qt does not always rely on xdg-user-dirs behavior to get the video directory. So the GLib API that relies on this behavior is used.

Note that GLib is already used by Qt itself for its event loop on Linux, so adding GLib as a dependency of the UI is not an issue.

Closes #3746

Motivation and Context

Get the XDG video directory through a widespread UTF-8 implementation.

How Has This Been Tested?

  • Removed RecFilePath and FFFilePath from my profile config
  • Ran OBS and change a random profile setting and save it
  • Check the profile config and see that the value are the XDG video directory.

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

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.

tytan652 avatar Jul 13 '24 08:07 tytan652

If we were going to do this, not adding 224 lines of cmake is a strong benefit of #3746

kkartaltepe avatar Jul 13 '24 19:07 kkartaltepe

If we were going to do this, not adding 224 lines of cmake is a strong benefit of #3746

Half of it is because of the legacy path (duplication), also a finder does not usually need changes post merge (low maintenance burden).

tytan652 avatar Jul 13 '24 23:07 tytan652

Custom Glib2 was dropped for the one provided by ECM.

tytan652 avatar Aug 01 '25 18:08 tytan652