Commit graph

12865 commits

Author SHA1 Message Date
tytan652 927dc2e283 obs-frontend-api,UI,docs: Add browser dock functions 2023-06-04 01:53:24 +02:00
tytan652 90d96e92c2 obs-frontend-api,UI,docs: Add API to add custom docks with no toggle
Some plugin does that by deleting the QAction returned by
obs_frontend_add_dock().

Now that obs_frontend_add_dock() is deprecated,
obs_frontend_add_custom_qdock() replace this usage.
2023-06-03 16:47:01 -07:00
tytan652 cde5545f8f obs-frontend-api,UI,docs: Add dock API that ask for unique object name
obs_frontend_add_dock() is deprecated in favor of
obs_frontend_add_dock_by_id()
2023-06-03 16:47:01 -07:00
tytan652 f2fa54120a UI: Avoid having two dock with the same object name
https://doc.qt.io/qt-6/qmainwindow.html#saveState

You should make sure that this property is unique for each QToolBar and
QDockWidget you add to the QMainWindow.
2023-06-03 16:47:01 -07:00
Igor Bochkariov df3b294fc3 UI: allow side docks to be tall
before: widgets docked on the sides of the preview are of the height of
the preview

after: the user can toggle the setting in the docks menu so the side
widgets are of the height of the whole window

UI: change menu label to Full-height docks
2023-06-04 09:39:47 +10:00
cg2121 382edcebb7 UI: Also toggle mixer toolbar in view menu
This change makes the mixer toolbar also show/hide when toggling
the source toolbars in the view menu.
2023-06-03 16:03:37 -07:00
Huts, Roman 275bb344d8 obs-ffmpeg: Fix AMF encoder reconfiguration
Must Flush() or Drain() before ReInit()
2023-06-03 14:37:57 -07:00
gxalpha ded9aba106 mac-videotoolbox: Remove encoder sorting 2023-06-03 13:48:47 -07:00
gxalpha b69ee759d2 UI: Sort encoders alphabetically 2023-06-03 13:48:47 -07:00
cg2121 4c9e1949ad UI: Fix filter shortcuts not showing in context menu
This fixes the shortcuts not showing up in the filters context
menu for rename and remove. This also has a code cleanup for
the rename action, as now it is created in the ui file.
2023-06-03 11:53:36 -07:00
tytan652 7cd7ca80f8 UI: Use main video on the virtual camera if program
This change allows the virtual camera to really output what is in the
program view, some plugin interract with this view but their changes
does not appear on the virtual camera.
2023-05-30 16:16:07 -07:00
gxalpha 2be0550e9a docs: Clarify source update_properties signal 2023-05-28 10:05:14 +10:00
PatTheMav 2966c4030e libobs: Use static library for version string information
Switching to a static library that contains version information as
const char strings has multiple benefits:

* The version information provided externally via compiler definitions
  will fail compilation early if malformed
* An updated version string (which will happen with every commit) will
  not invalidate existing compilation units, because only the static
  library is affected by the change
* An update of the version change just requires a recompilation of the
  static library and a linker update
* An update of the version will _not_ infect the rest of the codebase
  (as it does currently, because everything includes obsconfig.h one
  way or another)
* Other modules which used the macro definition directly have been
  updated as much as possible to use the proper getter method from
  `libobs` instead (some Windows-specific modules use preprocessor
  string composition, the value has been added as a compiler definition
  directly in those cases)
* Because the impact of a version change due to a commit hash change
  is limited to the static library, ccache hit rates should be
  improved considerably
2023-05-27 16:48:24 -07:00
Norihiro Kamae 4fb2bc38de text-freetype2: Fix crash after reaching buffer size
The texbuf has a fixed size that won't expand. When a lot of multi-byte
characters has arrived, it overflow and src_glyph becomes NULL.
2023-05-27 16:28:48 -07:00
cg2121 016ce128b7 UI: Fix menu actions missing shortcuts
The scene and source rename/remove actions were missing shortcuts
in the context menu.
2023-05-27 16:26:02 -07:00
Vainock 177b3f5a0f linux-alsa: Make 2 strings translatable 2023-05-27 16:24:57 -07:00
Vainock 1b86224043 CONTRIBUTING.rst: Update Crowdin guide url 2023-05-27 16:23:49 -07:00
Lain 8bbc959a03 libobs: Update version to 29.1.2 2023-05-27 14:49:56 -07:00
tt2468 a696470c9e
libobs: Remove warning log for raw outputs when starting data capture
#8873 accidentally used `log_flag_encoded()` instead of `flag_encoded()` in `obs_output_begin_data_capture()`, which was causing a warning to be logged when it shouldn't.
2023-05-27 13:18:41 -07:00
gxalpha 2a4c8594a1 mac-virtualcam: Release pixel buffer pool for DAL as well
The pixel buffer pool is used to create pixel buffers with both the CMIO
extension and the DAL plugin. As such, it is created independent of
which camera type is used, and should be released independent of it as
well.
2023-05-27 17:37:11 +02:00
Richard Stanway 48a0e7822a
obs-outputs: Remove support for "RTMP Go Away" feature (#8959)
Meta have filed a patent application on the Go Away feature. This goes
against the spirit of free software and puts the use of this feature in
questionable legal status, so let's remove this code until the patent
situation is resolved.

This reverts commits a593fe6755 and
dada82fec1.
2023-05-26 13:55:48 -05:00
Norihiro Kamae b21edafe98 UI: Fix crash on patronJsonThread
If a user exit obs while patronJsonThread is running, the thread crashed
with the error below.
  QThread: Destroyed while thread is still running
2023-05-26 12:54:33 -04:00
Lain 192d33ce86 deps/media-playback: Just null the first frame pointer on decode
memset is a little excessive considering we only check the first
pointer.
2023-05-25 18:34:27 -07:00
Lain 40ce466f4d deps/media-playback: Check is_active when frame preloading
Adds a check to make sure that delayed preload is ignored if the stinger
is restarted/interrupted. Just adds this check to the previous commit to
make sure that it doesn't redundantly try to preload a frame when
playback is restarted.
2023-05-25 18:09:46 -07:00
Lain a12d5812af deps/media-playback: Fix crash when interrupting stingers
The `mp_media::obsframe` varaible is a variable used to store the
current frame, or the first frame on stop. However, it's never cleared,
and while decoding a frame, it's invalid. The variable was added for
delayed preloading of the first frame for stingers.

Now, for more context, when media sources stop, it stores the first
frame of the video so it can set the source's current async texture to
that frame, effectively preloading the first frame into the backend,
making it so that when you play back that media, it's able to start
playback instantly without having to wait for the thread to play back
that frame, causing seamless playback.

Normally, preload happens right when first frame is finished decoding,
thus it wasn't a problem before these variables and delayed preloading
was added. However, with stingers, I delayed that preload further
because stingers are kind of a special case because the stinger does not
clear itself right away on stop. Because of that, it was causing it to
flash the first frame at the end of the stinger. This is why `obsframe`
and `request_preload` were added: it's a way of signaling the media
source to preload the first frame when the stinger itself is fully
completed. It was added to fix that stinger bug.

However, if the user interrupts playback of the stinger (e.g. swaps to
another scene while in the middle of the transition), that
`request_preload` might still be queued and happen while the media
source is still decoding, and thus, while `obsframe` is invalid.

I realize that we should probably refactor and clean up the
media-playback lib.
2023-05-25 18:01:17 -07:00
gxalpha 8151785c45 mac-virtualcam: Adjust admin privilege strings to use Apple terminology 2023-05-25 14:50:44 -04:00
gxalpha adb7029298 UI: Don't use ellipses in permissions window title 2023-05-24 15:47:10 -04:00
gxalpha 4b37692939 UI: Disallow exiting settings with no track in advanced mode 2023-05-24 12:30:27 -04:00
gxalpha 2bc368349f UI: Disallow exiting settings with no track in simple mode 2023-05-24 12:30:27 -04:00
Norihiro Kamae 63e0bff5e6 UI: Fix crash when receiving multiple SIGINT
When there are two or more SIGINT signals were sent to obs, obs crashes
because the 2nd SIGINT calls `close` though the main window has been
deleted.
2023-05-23 04:17:11 -07:00
gxalpha a874c19bef mac-virtualcam: Fix admin password locale string 2023-05-23 03:58:34 -07:00
cg2121 fc8c428521 UI: Move saving of scene tree grid mode
Widget shouldn't save their own states, as then they can't be used
elsewhere.
2023-05-21 01:48:13 -07:00
cg2121 20896280b1 UI: Fix compiling error on Ubuntu
Makes sure ceil function uses std namespace
2023-05-21 01:48:13 -07:00
CodeYan01 1d45881fcb obs-ffmpeg: Add option to disable settings logging
Allows plugins to disable the logging of settings every time the ffmpeg
source is updated, by passing "log_changes" as true in the settings.
2023-05-20 17:52:56 -07:00
Exeldro d9bb556c97 win-dshow: Set audio only active when there is audio 2023-05-20 17:21:40 -07:00
cg2121 3a53882675 UI: Add scene grid mode to view menu
Makes toggling of the scene list grid mode also available in the
view menu.
2023-05-20 17:06:18 -07:00
David Rosca 17cb966c62 obs-ffmpeg: Add FFmpeg Options for VA-API 2023-05-20 16:56:39 -07:00
gxalpha 58fb63030c UI: Only defer property updates for input and transition sources
Deferring properties was only ever made for input and transition
sources. As other property dialogs do not have an "Ok" button that would
cause an update to happen, if the deferred flag was set the callback
would never be called.
Also clarifies the docs to reflect this.
2023-05-20 16:55:50 -07:00
PatTheMav ccedbc0218 UI: Update display capture toolbar dropdown to use uuid field 2023-05-20 16:50:16 -07:00
PatTheMav fb9b5c829a mac-capture: Switch to UUID-based display management
Using UUIDs to store display references in obs-studio's settings file
allows us to "rediscover" devices even between restarts
(as CGDirectDisplayID changes between those) and select the same device.
2023-05-20 16:50:16 -07:00
gxalpha ad9fd6c6f0 libobs,UI: Add properties radio button list 2023-05-20 16:48:23 -07:00
gxalpha f049962bb2 libobs: Add properties list boolean format 2023-05-20 16:48:23 -07:00
tt2468 d314d4725d libobs, plugins: Deprecate obs_output_t functions with flag parameters
This deprecates the following functions, replacing them with new
versions:
- `obs_output_can_begin_data_capture()` - now `*capture2()`
- `obs_output_initialize_encoders()` - now `*encoders2()`
- `obs_output_begin_data_capture()` - now `*capture2()`

The flags parameter was initially designed to support audio-only or
video-only operation of an output which had the `OBS_OUTPUT_AV` flag,
however, full support for that was never implemented, and there are
likely fundamental issues with an implementation, mainly that most
outputs are programmed assuming that there will always be at least one
audio and one video track. This requires new flags specifying support
for optional audio/video, among other things.

An implementation to allow audio/video to be optional is best done
using the flag technique above, with audio/video enablement specified
by whether media (raw, `video_t/audio_t`) or encoder (`obs_encoder_t`)
objects are specified.

Since every implementation I could find always specifies `flags` as 0,
I was able to safely conclude that immediately removing the parameter's
functionality is safe to do.
2023-05-20 16:41:55 -07:00
PatTheMav e400d3f1bc libobs: Fix struct type usage before actual include
In its current form `struct dstr` is used in functions declarations
in the header file before the actual type is included (as `dstr.h` is
included after in `window-helpers.c`.

`clang-cl` is unable to compile this code because the function signature
 defined in the header will not match the implementation in the source 
 code due to the implicit forward-declaration of `struct dstr` before 
 the type is included in the actual header.
2023-05-20 16:37:19 -07:00
gxalpha 47d6d7e943 mac-virtualcam: Omit enqueue result codes 2023-05-21 01:35:43 +02:00
Norihiro Kamae 1291461219 win-dshow: Remove obsolete translation
A commit f50aa5e01b added a translation ConfigureAudio but never used.
2023-05-20 16:35:05 -07:00
Norihiro Kamae 7a3486ba6d win-capture: Remove obsolete translation
A commit 80b4a65cd2 added a translation `Method.Auto` but the source
code uses `WindowCapture.Method.Auto` instead.
2023-05-20 16:35:05 -07:00
Norihiro Kamae 82ea5aaa48 obs-qsv11: Add missing translation 2023-05-20 16:35:05 -07:00
Norihiro Kamae e9b65d58bb obs-outputs: Add missing translations 2023-05-20 16:35:05 -07:00
Norihiro Kamae efa69ab0bd obs-filters: Remove obsolete translation in expander-filter
Expander.None was never used.
2023-05-20 16:35:05 -07:00