Commit Graph

13 Commits (master)

Author SHA1 Message Date
mvji a427d69d76 UI/importers: Fix compiler warning
Fix comparison of integers of different signs.
Use string::npos instead of -1
2022-04-23 16:12:45 -07:00
gxalpha 3dbdd4b312 UI/importers: Automatically detect SL Collections on macOS 2021-11-30 23:19:13 -08:00
Ryan Foster 651f01cfef UI: Import Streamlabs Screen Capture source type
Add support for importing the Screen Capture source type from Streamlabs
scene collections. Since the Screen Capture source type is essentially
an abstraction layer for Display Capture, Game Capture, and Window
Capture, this adds some translation logic to translate Screen Capture
sources into one of those source types.
2021-11-21 14:46:14 +13:00
VodBox 19ced32c58 UI: Translate to current OS for all colection imports
Importers are written to convert third-party collection formats to a
Windows OBS scene collection. The Studio importer is capable of
translating scene collections to the correct types for the current
operating system. This change makes it so all imports will be ran
through the Studio translation, not just Studio and SL collections.
2021-10-16 15:34:53 -07:00
VodBox 8a132ad69f UI: Resolve relative paths on scene collection import
This change makes it so any strings in a scene collection that start
with "./" are checked as being a relative path. As long as the resulting
absolute path is contained within the same directory as the collection
being imported, it will be replaced with an absolute path.

This allows scene collections to be effectively "packaged" with assets,
so long as the assets are contained somewhere within the folder the
collection is being imported from.
2021-10-16 15:34:53 -07:00
Ryan Foster 0a3cd9021b UI: Add versioned sources to scene collection importer
Versioned sources were added in commit
b2302902a3 after the scene collection
importer was added in commit 191165c721.
When a versioned source gets converted in TranslateOSStudio, it can end
up with a translated "id" but an untranslated "versioned_id". When OBS
loads the resulting JSON, it will rely on the versioned_id, and rewrite
the id to the corresponding value. Use obs_get_latest_input_type_id on
the translated source id to get the correct versioned_id when using
TranslateOSStudio.
2021-05-14 20:44:19 -07:00
Ryan Foster 183fb20dde UI: Fix scene collection importer OS translation
The OS translation in the Scene Collection Importer seems to have been
broken since the feature was added because the translated sources were
not added back to the output JSON object. Add the translated sources to
the output JSON object to get the feature to work.
2021-05-14 20:44:19 -07:00
Richard Stanway 7d3fa7315a UI: Miscellaneous code cleanups
Remove a few unused variables and other minor changes. No functional
differences. Issues detected by PVS Studio.
2020-09-27 19:03:21 +02:00
VodBox 6319973b2f UI: Fix silent scenes with imported SL scenes
Previously, the importer assumed scenes had fields that sources did for
audio, namely volume, sync, mute and monitoring type. SL scenes do not
have these fields. This resulted in mistakes in importing, such as
imported scenes having a volume of 0.0.

This change gets rid of the non-existent fields, and explicitly sets the
volume of the scenes to 1.0 as a precaution.
2020-03-23 23:32:02 +13:00
jpark37 27fa979d73 UI: Make Importer destructor virtual
Allows unique_ptr to clean up without warnings.
2020-03-19 11:19:26 -07:00
VodBox 7553fda3e5 UI: Fix scenes as sources for SL import
The previous fix for repeated names accidentally meant that if a scene
item in a scene was meant to show another scene that was lower in the
list, it would fail to create the item, and wouldn't make it into the
imported collection.

This fix makes sure that scenes as sources still works properly in that
situation.
2020-03-05 22:38:45 +13:00
VodBox 6b5459fbe7 UI: Fix importing SL collections with repeated names 2020-03-05 10:37:37 +13:00
VodBox 191165c721 UI: Add advanced scene collection importer
This replaces the previous Open File dialog for importing collections
with a window for importing many collections at once, based on the remux
window, along with support for importing from OBS Classic, XSplit
Broadcaster and from Streamlabs' fork. This also translates sources
between OSes that Studio supports.
2020-02-16 17:56:06 +13:00