0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

10279 Commits

Author SHA1 Message Date
jp9000
243880b9ce libobs: Fix add/remove of raw audio callbacks 2021-11-28 02:49:04 -08:00
Matt Gajownik
f2592624db obs-browser: Update to 2.17.0, add CEF 4638 support
This also fixes a flickering texture issue in browser sources.
2021-11-28 09:11:04 +11:00
Georges Basile Stavracas Neto
0d91bfd281 UI: Add kudos to AppData file
Kudos are read by app centers such as GNOME Software and Discover
to calculate the "awesomeness" level of the application. OBS Studio
qualifies for two of these kudos: the "hi-dpi icon" kudo, since we
have 128x128 and bigger icons; and the "modern toolkit" icon, since
we use Qt5.

Add these kudos to the AppData file, and let app centers tell the
world how awesome OBS Studio is :)
2021-11-26 13:49:33 -03:00
VodBox
c3409b5bb5 frontend-tools: Cleanup libobs C++ type use 2021-11-26 23:23:52 +13:00
VodBox
3d544653e8 UI: Cleanup libobs C++ type use 2021-11-26 23:23:51 +13:00
VodBox
a8c30373d6 libobs: Add AutoRelease OBSRef wrappers for OBS types
These AutoRelease versions of the C++ OBSRef types do not add a ref on
construction, which is useful when accepting the result of a function
that turns a raw C pointer type that has had a reference added.

Not having these types has resulted in multiple awkward anti-patterns.
Such as immediately releasing after construction to account for the
extra addref, or avoiding using the C++ type entirely and manually
releasing it later.

Example:
```
OBSSource source = obs_get_source_by_name(name.c_str());
obs_source_release(source);
```

The whole point of these types is to avoid the need for manual releases,
and rely on the RAII mechanisms inside of C++. Additionally, the
immediate release isn't commented anywhere, resulting in confusion for
other developers looking at the code as to why things are being
immediately released.

The AutoRelease types and names are taken from obs-websocket.
2021-11-26 22:35:03 +13:00
Matt Gajownik
ab5d41c445 UI: Add separator before Custom Browser Docks in Dock menu 2021-11-26 18:06:51 +11:00
Matt Gajownik
a150fe7573 UI: Remove unused/nonexistent signal/slot connections 2021-11-26 17:28:34 +11:00
Warchamp7
a33c5c6be1 UI: Move Docks into top level menu
Managing the OBS UI docks is a core feature and as such should be
at the top level of the menu
2021-11-25 11:30:55 -08:00
Georges Basile Stavracas Neto
0d3ce3dfe6 CI: Allow Flatpak audio plugins be found
Add an extension point for org.freedesktop.LinuxAudio.Plugins,
and create the corresponding folder at post-install time.

Commit originally made by @hfiguiere for Flathub.
2021-11-25 09:20:05 -03:00
Georges Basile Stavracas Neto
baead91374 CI: Add extension point to Flatpak plugins
This is what the Flathub manifest does, which allows for plugins
distributed through Flatpak extension points.

Add extension point for Flatpak-distributed plugins.
2021-11-25 09:20:05 -03:00
Georges Basile Stavracas Neto
4453cca6a7 CI: Update Flatpak's v4l-utils to 1.22
No functional changes.
2021-11-25 09:20:05 -03:00
Georges Basile Stavracas Neto
b36b204eed CI: Update Flatpak's x264
In the future, a full FFMPEG build with x264 and nvenc will be
provided as an extension to the org.freedesktop.Platform runtime,
but for now we have to manually build it.

Update x264 to the latest git commit.
2021-11-25 09:20:05 -03:00
Vainock
e390b4bf7c CI: Add Crowdin Synchronization 2021-11-25 20:59:11 +11:00
Matt Gajownik
c45c261a9c UI: Add missing Interact tooltip in compact source toolbar 2021-11-25 20:09:46 +11:00
Matt Gajownik
13390b24b7 UI: Expose cURL error if Remote Text error text is empty 2021-11-25 00:57:00 -08:00
gxalpha
f2fda20572 UI: Minimize context bar when too small
This change removes the minimum total size from the context bar, instead
removing certain elements when the size is too small. This means that
users will still be able to make OBS smaller in width while keeping the
context bar enabled.

First, the properties, filter and interact buttons will get reduced to
just the symbols, if it gets even smaller the source specific menus are
hidden.
2021-11-24 13:40:29 -08:00
Georges Basile Stavracas Neto
c085ae025f CI: Drop "(Experimental)" from the Flatpak workflow
It just cannot get more official than this!
2021-11-24 17:48:26 -03:00
Georges Basile Stavracas Neto
5acfa27c74 CI: Publish releases on Flathub
Now that Flatpak has achieved full feature parity with non-Flatpak
builds, it is time to publish it directly into Flathub.

Add a new "publish" job to the Flatpak workflow that builds and
publishes to Flathub Beta, and to Flathub (if the release tag
doesn't contain '-rc').
2021-11-24 17:48:26 -03:00
Georges Basile Stavracas Neto
e1e1a0de0f CI: Use version 4 of the flatpak-builder action
None of the changes included in v4 affect OBS Studio, but since
we're already touching this code, let's make sure it's updated.
2021-11-24 17:48:26 -03:00
Georges Basile Stavracas Neto
b389b1bed0 CI: Trivial job renaming
Rename "flatpak_builder" to "generate_bundle", and set the display
name to "Generate Flatpak Bundle". This will make it less vague,
which will come in handy since next commits will add new jobs to
this workflow.
2021-11-24 17:48:26 -03:00
Georges Basile Stavracas Neto
12069d6714 CI: Make YAMLint happy
Add a start-of-file heading, and reindent some line. Only cosmetics,
no behavioral changes here.
2021-11-24 17:48:26 -03:00
Georges Basile Stavracas Neto
f37ca2efb1 .gitignore: Add flatpak-builder folders
This causes no problem whatsoever, it's just good to
keep some hygiene over ignored files.

Add generated Flatpak files and folders to .gitignore.
2021-11-24 17:48:26 -03:00
derrod
060f24ad49 CI: Update XML/clang-format validation job names 2021-11-24 12:28:26 -08:00
Georges Basile Stavracas Neto
26f1bfd05f linux-capture: Implement stream restoration
With the version 4 of the screencast portal, it is now possible
to request and use restore tokens [1] so that apps can restore a
previously configured screencast session without user interaction.

Add the corresponding code to linux-capture's PipeWire source.
Store the restore token in the source data, since each restore
token corresponds to an OBS source, and use it as soon as we try
to create a new session. Implement the obs_source_info.save vfunc,
and save the restore token when it's received by the Start()
response using obs_source_save().

[1] https://github.com/flatpak/xdg-desktop-portal/pull/638
2021-11-24 11:42:06 -08:00
Georges Basile Stavracas Neto
8537c7593c linux-capture: Add getter to screencast portal version
This will be used by the next commit to verify whether or not
to pass the restore token and persist mode options.
2021-11-24 11:42:06 -08:00
Georges Basile Stavracas Neto
dc63f63d9d UI: Install correct logos
Until now, we've been installing the UI/forms/images/obs.png asset
as the logo. However, that's not officially the logo we should
be using.

Install the correct logo assets. Add 128x128, 256x256, 512x512,
and scalable variants.
2021-11-24 01:36:44 -08:00
Clayton Groeneveld
d45e92c10c libobs: Add raw audio callback function
This complements the already existing raw video callback function.
2021-11-24 01:32:31 -08:00
Clayton Groeneveld
6a0348cf64 UI: Add option for only one fullscreen projector per screen
This option is added for users who want to have only one
projector on a screen and want to save gpu resources.
2021-11-24 01:01:12 -08:00
Ryan Foster
54a808c34a UI: Set Twitch Panel Dark Mode using OBS theme
Check if the current OBS theme is "Dark Mode"-esque and use that to
determine if the Twitch browser panel docks should use Twitch's Dark
Mode or not.
2021-11-24 00:03:39 -08:00
tt2468
079e6cebee libobs: Free async cache when sources output NULL frames
When sources output NULL frames, it is generally used to disable the
source and prevent the last frame from being left on screen. However,
when the source begins outputting video again, the last frame is
still in the async cache.

Depending on the stability of the source's frame output, this still
frame can end up being shown for 5+ output frames.

By freeing the async cache when a NULL frame is submitted, we avoid
the issue of old frames being re-displayed.
2021-11-23 23:04:46 -08:00
Kasin Sparks
67d2b50a91 UI: Fix bug with audio balance slider not updating
Fixes #4763.
2021-11-23 22:06:25 -08:00
gxalpha
3ccc963e53 UI: Fix context bar shutdown crash 2021-11-23 22:01:43 -08:00
gxalpha
e6dc6c2d94 UI: Recreate nested scenes on scene delete undo 2021-11-23 22:00:47 -08:00
gxalpha
c104e59bd4 libobs: Add obs_scene_prune_sources
Adds a function that goes through the scene and releases all sources
that have been removed.
2021-11-23 22:00:47 -08:00
tt2468
9147ce3287 docs: Add missing frontend-api calls + organize
Add all missing obs_frontend_*() functions, plus organize the
`obs_frontend_event` enum. It wasn't ordered the same as the header
file, so we might as well take the opportunity to make it clearer.
2021-11-23 21:52:30 -08:00
tt2468
b79ff4cb13 docs: Add missing config_t get/set functions 2021-11-23 21:52:30 -08:00
tt2468
0038b50776 docs: Add missing obs_source_t functions + organize
Adds some notable obs_source_t functions which are missing from the
current docs. Moves some of the audio-related functions together.
2021-11-23 21:52:30 -08:00
tt2468
74a1aeb593 docs: Minor function description tweaks (reference-scenes)
- Changes the note under obs_sceneitem_get_id(). Getting the id of a
sceneitem is not dangerous and does not cause errors. Only
obs_sceneitem_set_id() can cause errors.
- Changes wording on `obs_group_or_scene_from_source()`
2021-11-23 21:52:30 -08:00
Clayton Groeneveld
fee5b67bef UI: Use std::gcd for aspect ratio
This removes our own code for gcd, as it is already built into cpp.
2021-11-23 21:47:57 -08:00
qiongzai.sun
0d8c98851e libobs: Fix gs_texture_2d::BackupTexture with GS_TEXTURE_CUBE 2021-11-23 20:52:40 -08:00
Paul Hindt
ce3ae8e423
aja: Capture and Output plugin for AJA Video Systems IO devices
* aja: Initial commit of AJA capture/output plugin

* aja: Fix clang-format on aja-output-ui code

* aja: Remove script used during dev/testing

* aja: Address pull request feedback from @RytoEX

* aja: Remove the SDK sources and update CMakeLists to point to new headers-only/static libs dependency distribution.

* aja: Only build AJA plugin on x64 on macOS for now

* aja: Remove the non-English placeholder locale files. The english strings/files will be produced via crowdin, according to @ddrboxman.

* aja: Add FindLibAJANTV2.cmake script to locate the ajantv2 headers and static libs in the OBS external deps package(s). Tested on Windows x64. macOS and Linux x64 TBD.

* aja: Add ajantv2/includes to FindLibAJANTV2 include search paths

* aja: Remove commented code from aja CMakeLists

* aja: Remove debug code and comments that are no longer needed.

* aja: Fix indentation

* aja: Remove disablement of clang-format in routing table and SDIWireFormat map

* aja: Use spaces for all indentation in widget crosspoint arrays where we disable clang-format

* aja: Address code style comments made by @RytoEX

* aja: Fix uneven indentation

* aja: More fixes to if/else placement and remove superfluous comments.

* aja: Rename 'dwns' to 'deactivateWhileNotShowing' for clarity. The DeckLink plugin still uses the variable name 'dwns' and should be changed, if desired, in a separate PR.

* aja: Remove X11Extras dependency from AJA Output frontend plugin

* aja: Add patch from Jim to find AJA release/debug libs

* aja: Improve AV sync of queued video/audio sent to the AJA card in the AJA Output plugin.
2021-11-23 20:31:11 -06:00
pkv
f32c2b0fbb obs-ffmpeg: Properly name FFmpeg lib used
Cosmetic but this was nagging me since I had authored those lines.
2021-11-23 12:10:56 -05:00
pkv
c398ac9739 obs-ffmpeg: Fix NVENC old codec naming removed in FFmpeg
Per FFmpeg commit 337f777f378c [1], FFmpeg removed nvenc_h264_encoder
and nvenc_hevc_encoder after deprecation in FFmpeg commit 888a5c794778
[2]. The names to be used are ff_h264_nvenc_encoder and
ff_hevc_nvenc_encoder. So we must allow alternative search of codec as
h264_nvenc or nvenc_h264 in obs-ffmpeg.c.

[1]: 337f777f37
[2]: 888a5c7947
2021-11-23 12:10:56 -05:00
Ryan Foster
ce734366bc obs-ffmpeg: Respect AVFormatContext and AVOutputFormat constness
AVFormatContext::oformat was made const on April 27, 2021 [1]. If we
respect the constness of AVOutputFormat and do not cast results from
FFmpeg functions to non-const, we cannot modify the results after the
fact. Our choices are either to cast them to non-const (and presumably
have them implicitly casted back to const on later function calls), or
only try to modify the results in versions of FFmpeg where these are not
expected to be const.

Instead of relying on casts, we can set the encoder values in the
ffmpeg_cfg struct, which are later passed to new_stream.

Also modifies deps/media-playback. Removes compiler warnings.
Some avformat functions return const AV(In/Out)putFormat per [1], so
ifdef as needed.

[1]: 56450a0ee4
     lavf 59.0.100 avformat.h
     avformat: Constify the API wrt AV(In|Out)putFormat

     Also constify AVProbeData.
2021-11-23 12:10:25 -05:00
Rodney
b387047632
CONTRIBUTING.rst: Add service submission guidelines (#5562) 2021-11-22 08:29:39 -06:00
Ryan Foster
abf1d609d2 obs-ffmpeg: Include channel_layout.h
avcodec.h stopped including channel_layout.h per FFmpeg commit
1be3d8a0cb77 [1]. avformat.h stopped including avcodec.h per FFmpeg
commit e67e02d15672 [2]. As a result, we need to explicitly include
avutil/channel_layout.h when needed. Fixes compilation error against
FFmpeg later than the two mentioned commits.

[1]: 1be3d8a0cb
[2]: e67e02d156
2021-11-21 11:30:02 -05:00
Ryan Foster
08547a1696 obs-ffmpeg: Include avcodec header for AVCodecContext
FFmpeg commit e67e02d15672 [1] drops avcodec.h from avformat.h includes.
Therefore we need to include it explicitly.

[1]: e67e02d156
     lavf/avformat.h: drop the avcodec.h include
2021-11-21 11:30:02 -05:00
Ryan Foster
6d1433f228 win-dshow: Use AVFrame.pts instead of AVFrame pkt_pts
AVFrame.pkt_pts was deprecated in FFmpeg commit 32c8359093d1 dated June
21, 2016 for lavc 57.24.0 (FFmpeg 3.2). AVFrame.pkt_pts was replaced by
AVFrame.pts, and it was removed in FFmpeg commit 6e30b35b85b8 [2] on
April 27, 2021. Ubuntu 18.04 has the oldest FFmpeg version we support,
FFmpeg 3.4. We should be able to safely migrate from AVFrame.pkt_pts to
AVFrame.pts.

[1]: 32c8359093
[2]: 6e30b35b85
2021-11-21 11:30:02 -05:00
jpark37
6393c3f4cd ipc-util: Fix potential ready_event hang
There is an expectation that ready_event will signal/wake 1:1, so the
stray teardown signal may get lost. Add new stop_event for safety.
2021-11-21 01:38:36 -08:00