1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00
Commit graph

17 commits

Author SHA1 Message Date
Timothy Flynn
ad4634d0ed LibMedia: Use a simple locked vector to handle audio commands on macOS
The SharedSingleProducerCircularQueue used here has dubious value, This
queue is used to pass commands to the audio thread, such as play/pause/
seek/volume change/etc. We can make do with a simple locked vector, as
we were blocking to enqueue tasks anyways. We can also use an atomic
bool to tell the audio thread when it needs to take a lock on the task
queue, to keep the thread lock-free most of the time.
2025-05-25 08:45:50 -04:00
aplefull
68ddc7006d LibMedia: Implement conversion of BT601 primaries 2025-05-16 12:13:13 +01:00
Timothy Flynn
7280ed6312 Meta: Enforce newlines around namespaces
This has come up several times during code review, so let's just enforce
it using a new clang-format 20 option.
2025-05-14 02:01:59 -06:00
R-Goc
28d5d982ce Everywhere: Remove unused private fields
This commit removes the -Wno-unusued-private-field flag, thus
reenabling the warning. Unused field were either removed or marked
[[maybe_unused]] when unsure.
2025-04-04 12:40:07 +02:00
Tim Ledbetter
411cafa2a9 LibMedia: Add formatter for decoder errors
This is useful for print debugging.
2025-03-14 08:48:01 +01:00
Tim Ledbetter
c270241b09 LibMedia: Propagate errors if demuxer creation fails
Previously, the browser would crash if demuxer creation failed.
2025-03-14 08:48:01 +01:00
Luke Wilde
4df2de2f20 LibMedia/Audio: Use duration in the container if stream doesn't have one 2025-03-13 19:33:44 +01:00
Luke Wilde
b789ba5e5f LibMedia: Demux videos with FFmpeg
This gives us access to container types other than Matroska, the
biggest one being MP4.
2025-03-13 19:33:44 +01:00
Luke Wilde
3412935a62 LibMedia: Move FFmpegIOContext into it's own file
This allows it to be reused for video.
2025-03-13 19:33:44 +01:00
Andrew Kaster
b7f7f58e5f LibMedia: Don't link null PlaybackStream::create eagerly
This avoids static builds putting the "no-op" implementation of
PlaybackStream::create() in the static archive before the strong
implementation later. On ELF (and probably PE/COFF too), a weak
definition in a static archive is chosen and locked-in as the
definition before a strong definition later in the archive.

Before this change, static builds would have no audio support
at all.
2025-02-21 12:05:18 +01:00
stasoid
49c5c0bb8a LibMedia: Port to Windows 2025-02-11 04:07:24 -07:00
Timothy Flynn
27478ec7d4 Everywhere: Run clang-format
The following command was used to clang-format these files:

    clang-format-19 -i $(find . \
        -not \( -path "./\.*" -prune \) \
        -not \( -path "./Build/*" -prune \) \
        -not \( -path "./Toolchain/*" -prune \) \
        -type f -name "*.cpp" -o -name "*.mm" -o -name "*.h")
2024-12-28 05:39:32 -08:00
Timothy Flynn
79a2b96d1c Meta: Consolidate checking for the system audio backend
The goal here is to ensure we check for audio backends in a way that
makes sense. On macOS, let's just always use Audio Unit (and thus avoid
any checks for Pulse, to reduce needless/confusing build log noise). We
will also only use the Qt audio backend if no other backend was found,
rather than only checking for Pulse.
2024-12-25 12:00:43 +01:00
Timothy Flynn
dfa727a4d4 LibMedia: Remove preprocessor chain when initializing audio streams
Instead of having to duplicate the audio stream backend conditions, just
define PlaybackStream::create in each audio backend implementation file.
We provide a weak definition in PlaybackStream.cpp as the fallback.
2024-12-25 12:00:43 +01:00
Jonne Ransijn
4d38e04e48 LibMedia: Remove LibMedia::Audio::LoaderError
This class was used as little more than a wrapper around `Error`,
so we might as well use `Error` in the first place.
2024-11-22 12:43:57 +01:00
Pavel Shliak
b60cb699a9 LibMedia: Clean up #include directives
This change aims to improve the speed of incremental builds.
2024-11-21 14:08:33 +01:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00