0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00
Commit Graph

24 Commits

Author SHA1 Message Date
derrod
9f306fa832 obs-outputs: Replace circlebuf with deque 2024-01-16 16:45:10 +01:00
Norihiro Kamae
57170ba378 obs-outputs: Remove unused static functions 2023-08-26 16:52:35 -07:00
gxalpha
79822a58c3 libobs,plugins: Remove new obs_output_*2 functions
Effectively reverting parts of d314d47, this commit removes the new
functions that got added to remove the flags parameter. Instead, it just
marks the parameter as unused and documents this. Having what is
effectively an API break just to remove a parameter is a bit overkill.
The other parts of d314d47 which cleaned up the usage of the flags
parameter are untouched here.
2023-06-10 16:13:05 -07: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
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
tytan652
5e4ed49a2d obs-outputs,obs-ffmpeg: Use connect infos in outputs 2023-03-19 17:38:02 +01:00
tytan652
855956f60e obs-outputs,obs-ffmpeg: Add protocol to service outputs 2023-03-19 15:29:03 +01:00
Richard Stanway
17c39ccb07 obs-ffmpeg, obs-outputs: Check return of obs_encoder_get_extra_data
A race condition can occur in obs-outputs where the send_thread is in
the process of (re)connecting but the encoder was shut down in the
meantime. This causes the expected header data to be garbage, resulting
in a crash.
2022-06-25 16:03:12 -07:00
jpark37
e581802812 obs-outputs: Remove WIN32_LEAN_AND_MEAN define
It should already be defined near the Windows.h include.
2021-10-10 19:12:45 -07:00
Tommy Vercetti
e075ad5bca obs-outputs: Add WIN32_LEAN_AND_MEAN to avoid symbol clash 2021-09-11 15:50:06 -07:00
Hayden McAfee
96ef45cef5 UI: Support FTL URLs for custom streaming service
Custom streaming service URLs beginning with `ftl` are handled by the
`ftl_output` plugin.
2021-01-13 09:44:52 -08:00
Roman Sivriver
7029304b32 ftl-stream: Fix reconnect loop on FTL ingest disconnect
When connection to FTL ingest is lost, ftl_event() calls
obs_output_signal_stop() to trigger a reconnect. However, during the
reconnect delay, send_thread is still waiting on send_sem semaphore.
After the delay, ftl_stream_start() is called, which in turn resets
the semaphore and creates a new send_thread. Old send_thread now exits
the loop and triggers another reconnect and the whole process repeats
again. The fix resets the semaphore in ftl_event() so the old
send_thread exits immediately.
2021-01-12 18:28:41 -08:00
jp9000
f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
jp9000
973d31b8c2 libobs: Fix lockup when an encode call fails
(This commit also modifies the UI, obs-ffmpeg, and obs-output modules)

Fixes a long-time regression where the program would lock up if an
encode call fails.  Shuts down all outputs associated with the failing
encoder and displays an error message to the user.

Ideally, it would be best if a more detailed error could be displayed to
the user about the nature of the error, though the primary problem is
the encoder errors are typically not something the user would be able to
understand.  The current message is a bit of a generic error message;
improvement is welcome.

Another suggestion is to try to have the encoder restart seamlessly,
though it would take a significant amount of work to be able to make it
do something like that properly, and it sort of assumes that encoder
failures are sporadic, which may not necessarily be the case with some
hardware encoders on some systems.  It may be better just to use another
encoder in that case.  For now, seamless restart is ruled out.
2019-05-17 01:51:12 -07:00
Quinn Damerell
90d3732247 obs-output: Update ftl-sdk version and ftl logging values 2018-02-15 16:11:23 -08:00
jp9000
0497095f97 Fix a number of GCC warnings 2017-12-06 16:42:45 -08:00
jp9000
4704723759 Fix a number of MSVC warnings 2017-12-06 16:07:23 -08:00
jp9000
0d6204c8af Fix a number of MSVC warnings
Fixes a number of warnings with all modules
2017-12-05 13:53:44 -08:00
jp9000
5cfefce55e obs-outputs: Only set stop events if still active
The new code in 3032535f56 would signal that the output has stopped to
the back-end and front-end, but the event used in the outputs themselves
to shut down the send thread would still be signaled, causing the next
connection to immediately stop as soon as it had started.  This fixes it
so that the event does not get signaled unless the thread is active.
2017-10-12 09:56:47 -07:00
jp9000
3032535f56 obs-outputs: Signal stop if stop called when not active
Fixes a bug with reconnecting where the reconnecting would get stuck in
the "stopping" state.
2017-10-12 08:20:50 -07:00
Quinn Damerell
1151c6cede obs-outputs: Fix invalid stream key error
Fixes an issue where it would show the wrong error when the user entered
an invalid stream key, and logs it

Closes jp9000/obs-studio#1015
2017-08-25 02:03:13 -07:00
Quinn Damerell
8111f99854 obs-outputs: Enable FTL logging and reduce verbosity
Closes jp9000/obs-studio#1015
2017-08-25 02:02:50 -07:00
derrod
512f041bed obs-outputs: Change loglevel of ftl status thread to debug
The ftl output gets very spammy (3-6 lines every 5 seconds),
this commit changes the loglevel of those messages to debug
so they do not clutter up the logs of users.

In case these messages are needed they can be re-enabled using
the '--verbose' flag.

(also fixes minor formatting issues)
2017-08-08 17:47:39 +02:00
Quinn Damerell
6f8e38e0a0 obs-outputs: Add FTL output
Closes jp9000/obs-studio#980
2017-08-01 02:27:34 -07:00