If B-frame is enabled in video encoder, video packets have different PTS
and DTS, however audio packets do not. That caused audio packets at the
splitting point goes to a different file and audio glitch appeared in an
NLE.
This commit adds a setting to reset timestamps when splitting files.
Some NLEs cannot handle video files whose starting timestamp is not
zero. Default is enabed.
This commit adds 3 new properties to split output file in the output
`ffmpeg_muxer`.
- `max_time_sec` specifies the limit in seconds.
- `max_size_mb` specifies the limit in megabytes.
- `allow_overwrite` specifies to test an existing file.
If both `max_time_sec` and `max_size_mb` are not positive, the split
file feature won't be enabled.
Another output ffmpeg_mpegts_muxer shares the code but is not affected
since the output is used only for streaming.
This commit fixes an issue that the last audio packet is sometimes not
written into mp4 format. Since libavformat internally calculates the
packet duration from the frame_size specified in the codec parameter, it
is necessary to set frame_size.
Ubuntu 21.10 provides PipeWire 0.3.32 which is missing the
`SPA_POD_PROP_FLAG_DONT_FIXATE` required for proper DMA-BUF negotiation.
Since this isn't implemented in the DE's of this Ubuntu version just
defining this flag won't have any impact.
Revert after support for Ubuntu 21.10 ended.
Proper DMA-BUF format and modifier negotiation is possible with PipeWire
0.3.40. This commit adds checks for older versions and allows to build
against them.
These are classified as follows:
* PipeWire server older than 0.3.24: Restrict to SHM only
* PipeWire server between 0.3.24 (incl.) and 0.3.40: Announce modifiers
along with the old method. On failed import drop all modifiers.
* PipeWire server 0.3.40 and newer: Announce modifiers along with the
old method. On failed import drop only a single modifier.
We require PipeWire 0.3.33 or later to make use of the introduces flags
`SPA_POD_PROP_FLAG_MANDATORY` and `SPA_POD_PROP_FLAG_DONT_FIXATE`,
which are required for the negotiation process introduced in the
following commits.
It was naive to add these defines here to avoid a direct include when
the entire platform already depends on the DRM subsystem. Just include
it and let it provide the image formats.
On source destroy, the browser source should not wait for other threads
if it's avoidable, as this could cause hard locks. Instead, mark the
source for destruction, destroy any obs/graphics data, and let the CEF
queue delete the what's left of the pointer at its leisure.
Fixes a hard lock on macs due to the browser source destructor having to
wait for the UI thread (due to USE_QT_LOOP), which may already have been
waiting for the source.
New features:
- Expose Scene controls to sources
- Pass on JS function arguments to BrowserClient
- Add Browser Source Refresh Hotkey
- Render JavaScript dialogs using Qt
- Improve performance of CEF 4638 browser sources
- Set window title for web popups using X11
- Add TypeScript definitions information
Bug fixes/cleanup:
- Don't call WasHidden on browser panels
- Use mutex when accessing BrowserSource::cefBrowser
- Correct JSDoc definitions
- Remove old CEF ifdefs
- Cleanup EditorWidget.h
- Modify log in obs-vst, fix compile error
- Update effect name even effect is unavailable
- Fix crash caused by unsupported interface
- Use deleteLater on editorWidget to prevent crash
- Check result after creating vst plugin
- Fix button states on properties refresh
- Replace QMacCocoaViewContainer with QWidget::createWindowContainer
- Modify incorrect code about mallocing memory
This updates the libdshowcapture submodule to the latest commit.
This also changes win-dshow CMakeList to ensure compatibility.
Full commit list:
- Add support of RGB24 format
- CMake: Add Win32 libs instead of pragma directives.
- Implement FindPin
- Simplify error handling
- Fix log level of DebugHR
- Use default constructor instead of empty function
- Use std::move instead of copy where appropriate
- Mark some strings as const
The GLX_EXT_texture_from_pixmap spec says:
The contents of the texture after the drawable has been bound are defined
as the result of all rendering that has completed before the call to
glXBindTexImageEXT. In other words, the results of any operation which
has caused damage on the drawable prior to the glXBindTexImageEXT call
will be represented in the texture.
Rendering to the drawable while it is bound to a texture will leave the
contents of the texture in an undefined state. However, no
synchronization between rendering and texturing is done by GLX. It is
the application's responsibility to implement any synchronization
required.
In practice, on most systems with a GPU this kept a directly binding to
the framebuffer, which made it work with the previous code. However,
on software rasterization setups using llvmpipe, a blit was done inside
the call to glXBindTexImageEXT. This was the cause of a notoriously
ignored bug where the captured image would "freeze" until the source
was reconfigured.
Makes the signal's behavior on-par with `obs_source_media_started`.
`obs_source_media_started` is emitted every time a file in the playlist
is played, and so therefore should `obs_source_media_ended`. In this
scenario, the loop setting is actually irrelevant to the behavior that
this signal should have.
If you don't have a xdg-desktop-portal backend then pipewire wont init,
however on exit we unconditionally deinit which can crash in pipewire
which does not handle this gracefully.
When releasing a darray mux_packets at error, contents of mux_packets
are not released. It causes memory leaks if error occurs during saving
the replay buffer to a file.
PipeWire server versions older than 0.3.24 can be incompatible with
clients build against a newer library version with respect to DMA-BUF
sharing. So we want to fallback to SHM transfer. This commit adds
checks for older versions.
These are classified as follows:
* PipeWire components older than 0.3.24: Restrict to SHM only
* PipeWire components with version 0.3.24 and newer: Announce DMA-BUF
support via `SPA_PARAM_BUFFERS_dataType`
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