Commit graph

350 commits

Author SHA1 Message Date
Sebastian Dröge
eb3d3b3088 Update versions to 0.9.9 2023-02-09 22:08:17 +02:00
Sebastian Dröge
c805c3bb3a dav1ddec: Make sure to call get_picture() twice in a row when draining
The first time might return `EAGAIN` if there are pending frames but
there is no decoded frame available yet. The second time it will
actually wait for frames to become available and only start returning
`EAGAIN` again once no more frames are left.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1086>
2023-02-09 21:43:57 +02:00
Sebastian Dröge
5c2582d105 Update version to 0.9.8 2023-01-23 11:30:27 +02:00
Sebastian Dröge
4b9392938f dav1d: Don't treat any kind of bitstream error immediately as fatal
Instead use the videodecoder error handling to allow up to max-errors
consecutive decoding errors, i.e. infinite by default in 1.22 and newer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1058>
2023-01-23 11:08:49 +02:00
Sebastian Dröge
407a367529 dav1d: Get rid of some unnecessary unwrap()s
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1056>
2023-01-22 00:59:54 +02:00
Sebastian Dröge
88a437ac32 dav1d: Remove unnecessary frame dropping loop
After flushing there are no frames left anymore that could be dropped.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1056>
2023-01-22 00:59:52 +02:00
Sebastian Dröge
853acfc4fe dav1d: Don't flush the decoder when draining
This directly discards all frames and it won't be possible to output
them anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1056>
2023-01-22 00:59:51 +02:00
Sebastian Dröge
3cd6074a8e dav1d: Only drain at most one decoded frame per input frame unless the decoder requires more before accepting new data
This works around a race condition in dav1d where the decoder deadlocks
if multiple threads are used, and also is generally beneficial as it
allows for proper frame threading.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1056>
2023-01-22 00:59:48 +02:00
Sebastian Dröge
4ba452dcc3 Update versions to 0.9.7 2023-01-19 19:06:43 +02:00
Sebastian Dröge
711313c4c5 gtk4: Only provide a buffer pool to upstream if it requested one 2023-01-19 16:40:45 +02:00
Sebastian Dröge
c83f48f0a1 gtk4: Make no caps in the allocation query a non-error 2023-01-19 16:40:26 +02:00
Sebastian Dröge
101bcbc1a0 gtk4: Asynchronously flush frames from GDK
There is no need to wait until the frames are flushed as the textures
will be kept alive until GDK is finished with them, and doing so can
cause deadlocks.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/287

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1053>
2023-01-19 15:40:04 +02:00
Sebastian Dröge
2a68be2000 gtk4: Keep GstGLMemory alive as long as it is used inside GDK
Otherwise the texture might be released in the meantime and GDK would
use an invalid GL texture ID.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/287

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1053>
2023-01-19 15:40:03 +02:00
Sebastian Dröge
c818a575b4 Update versions to 0.9.6 2023-01-18 17:19:17 +02:00
Sebastian Dröge
408d439631 rav1e: Enable threading support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1040>
2023-01-10 10:30:34 +02:00
Sebastian Dröge
2a8a90f76f Update versions to 0.9.5 2023-01-07 16:06:17 +02:00
Sebastian Dröge
1bfe6f9142 gtk4: Update dependencies to releases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1038>
2023-01-07 13:59:26 +02:00
Sebastian Dröge
db9ef0b2af gtk4: Propagate the GL display to the remainder of the pipeline
This allows sharing it with other parts of the pipeline and avoids
creating different, incompatible displays/contexts in different parts of
the pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1038>
2023-01-07 13:25:49 +02:00
Sebastian Dröge
ff1c99df98 gtk4: Rename a variable to make more sense
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1038>
2023-01-07 13:25:00 +02:00
Sebastian Dröge
696944c08e gtk4: Handle more GL context creation failures gracefully
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1038>
2023-01-07 13:24:53 +02:00
Sebastian Dröge
37dedfd4d0 gtk4: Reset app context and display if GL context creation fails
No need to keep them around and that way we either have all 3 values set
or none of them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1038>
2023-01-07 13:24:48 +02:00
Sebastian Dröge
bb2f632c9c gtk4: Reduce number of unwraps during GL context creation and query handling
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1038>
2023-01-07 13:24:42 +02:00
Jordan Petridis
f6b092d2af video/gtk4: Fix typo in info logs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1038>
2023-01-07 13:24:30 +02:00
Nirbheek Chauhan
a0dbb94e01 gtk4: Remove 'gst' prefix from another debug category
Missed it last time. Caught all of them this time. Continuation from:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1029

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1038>
2023-01-07 13:24:12 +02:00
Nirbheek Chauhan
9f8fa99089 gtk4: Use GL implicitly without the gst_gl feature on macOS
We already require gstreamer-gl as a dependency on macOS, so reflect
that in the code too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1038>
2023-01-07 13:23:59 +02:00
Sebastian Dröge
34434bd877 gtk4: Add support for GL on macOS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1038>
2023-01-07 13:23:53 +02:00
Nirbheek Chauhan
2045847bd6 gtk4: Remove 'gst' from gtksink debug category name
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1038>
2023-01-07 13:23:23 +02:00
Sebastian Dröge
b0bd55c4d2 Update versions to 0.9.4 2022-12-27 13:14:59 +02:00
Sebastian Dröge
e95a2c1016 gtk4: Release GStreamer GL context and display when going back to NULL state
And acquire it again next time when going to READY state.

Also clean up the whole GL context initialization.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1027>
2022-12-27 12:39:56 +02:00
Sebastian Dröge
31760b8f9a gtk4: Use glib::ThreadGuard instead of the fragile crate
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/272

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1027>
2022-12-27 12:39:56 +02:00
Sebastian Dröge
8d7ce380c4 gtk4: Don't try to use GL mapped video frames as raw RGB memory
This will fail badly because the memory pointers are actually GL texture
IDs, however this case can't really happen in practice so simply assert
on this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1027>
2022-12-27 12:39:56 +02:00
Sebastian Dröge
e8701652e2 gtk4: Don't error out when the main context channel does not exist anymore when rendering
But instead return flushing to shut down silently.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1027>
2022-12-27 12:39:56 +02:00
Sebastian Dröge
993619d654 gtk4: Flush frames from the paintable when shutting down the sink
Otherwise it will continue showing the last frames forever and keep
around the frames forever instead of rendering black.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/281

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1027>
2022-12-27 12:39:56 +02:00
Sebastian Dröge
cbc99fb198 Revert "Revert "rav1e: Update to rav1e 0.6""
This reverts commit 5f6afce842.

It should be building fine on macOS too now.
2022-12-27 10:31:33 +02:00
Sebastian Dröge
bae5294e8f Update versions to 0.9.3 2022-12-16 20:22:17 +02:00
Sebastian Dröge
b4185134d1 Fix various new clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1017>
2022-12-16 18:51:00 +02:00
Sebastian Dröge
5f6afce842 Revert "rav1e: Update to rav1e 0.6"
Revert for the time being because it pulls in libgit2-sys, which fails
to build on macOS because of course it does. It regularly fails building
everywhere because of its brittle C code and build system, which is why
gst-plugin-version-helper moved away from it.

This reverts commit e6789fc338.
2022-12-12 19:01:40 +02:00
Sebastian Dröge
2a981132b4 gtk4: Only require GTK 4.6 if GL support is enabled
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:46:57 +02:00
Sebastian Dröge
71558bd086 gtk4: Deactivate application GL context again after fill_info()
It does not need to be activate anymore, and keeping it active can cause
problems.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:39:55 +02:00
Jordan Petridis
b689a0825e gtk4: Deactivate the context if we fail to fill_info
Avoid leaving the context activated if we end up erroring out.

Similar to https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3492

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:39:50 +02:00
Sebastian Dröge
fd5b31fb43 tttocea608: Don't fail if a gap event contains no duration
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:39:27 +02:00
Seungha Yang
506c96e8aa dav1ddec: Lower rank to primary
The rank of AOM av1dec was demoted as secondary, and thus
primary rank is sufficient.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:36:43 +02:00
Sebastian Dröge
e6789fc338 rav1e: Update to rav1e 0.6
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:36:26 +02:00
Sebastian Dröge
b7534643be gtk4: example: Use a bin with a videoconvert in the non-GL case
The sink only supports RGB formats in that case, which decoders rarely
would output.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:35:52 +02:00
Sebastian Dröge
0b2aa2646f gtk4: Make GL support fully optional
Don't depend on gstreamer-gl if it's not enabled, and don't try doing
anything with the GDK GL context at all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:35:07 +02:00
Jordan Petridis
507377c052 video/gtk4: Implement support for GLTextures when possible.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:34:22 +02:00
Jordan Petridis
f590b7e62f video/gtk4: Restrict visibility of struct related to the Frame
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:32:32 +02:00
Jordan Petridis
9fa3d88a63 video/gtk4: Rename Object types and struct to something simpler
Avoid the confusion caused by SinkPaintable and PaintableSink,
and instead refer to the objects as Paintable for the GdkPaintable
subclass or PaintalbeSink for the gst element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1008>
2022-12-12 13:32:25 +02:00
Sebastian Dröge
1f4a035dc0 Update versions to 0.9.2 2022-11-28 11:44:33 +02:00
Sebastian Dröge
2b287bcd61 gif: Update to gif 0.12
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/986>
2022-11-27 20:45:18 +02:00