Commit graph

531 commits

Author SHA1 Message Date
Mathieu Duponchelle
29b5ccacdf transcriberbin: take passthrough state into account in more places
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/630
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1925>
2024-11-20 12:52:17 +01:00
Mathieu Duponchelle
1fc1ed2539 transcriberbin: relink transcriber more thoroughly
* Remove old transcriber from correct bin
* Remove old unsynced ghost pads and expose new ones
* Fix potential deadlock where State was locked after PadState

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1925>
2024-11-20 12:52:17 +01:00
Mathieu Duponchelle
169f7b762e transcriberbin: remove proxy properties on element
Those properties are now exposed on the sink pads, and should be used
directly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1925>
2024-11-20 12:52:17 +01:00
Mathieu Duponchelle
4074f4c275 transcriberbin: simplify latency query implementation
By always replying with a synthetic latency

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1925>
2024-11-18 19:24:57 +01:00
Mathieu Duponchelle
10a022e457 transcriberbin: expose unsynced source pads for original transcripts
.. when the transcriber exposes those.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1915>
2024-11-18 17:30:54 +00:00
Mathieu Duponchelle
d993c95e38 transcriberbin: fix initial transcription setup
Only link the audio tee with the pad transcriber when it is not
in passthrough mode.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/628
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1916>
2024-11-14 17:35:33 +00:00
Mathieu Duponchelle
4284fe953a transcriberbin: expose lateness property
Directly mapped to the lateness property on the transcriber object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1910>
2024-11-14 16:40:14 +00:00
Mathieu Duponchelle
635a83a8d7 transcriberbin: notify passthrough at the appropriate time
We want to enable passthrough internally, and only notify that
internally it has been enabled once the transcriber has been unlinked.

This way applications connected to the notify handler can synchronously
update the properties and attempt to disable passthrough again.

Doing so properly requires a refactoring of the transition to the
passthrough state, with the currently set passthrough mode maintained
separately from the target passthrough state.

This commit also finishes the work left incomplete in
17d7997137 by moving the passthrough
property to the sink pad class, making each transcriber passthrough
state independent from the others.

Also adds an example to demonstrate the behavior

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1856>
2024-11-05 12:23:54 +00:00
Sebastian Dröge
76282cd385 gtk4: Add missing interfaces to the widget
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1904>
2024-11-02 13:00:28 +02:00
Mathieu Duponchelle
0ea7e9a59c cea708mux: add support for force-live
This requires a bump of the gst-base dependency to 1.22 in order to
use the new set_force_live() API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1876>
2024-10-24 15:10:15 +00:00
Sebastian Dröge
91b61ac12f closedcaption: Switch from once_cell to std for new ST2038 elements
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1777>
2024-10-23 11:42:37 +00:00
Sebastian Dröge
5864a1368f closedcaption: st2038ancdemux: Send gap events for inactive streams
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1777>
2024-10-23 11:42:37 +00:00
Sebastian Dröge
593cb6c7fc closedcaption: Add Closed Caption to ST2038 element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1777>
2024-10-23 11:42:37 +00:00
Sebastian Dröge
c1b364696c closedcaption: Add ST2038 to Closed Caption element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1777>
2024-10-23 11:42:37 +00:00
Sebastian Dröge
0139a37014 closedcaption: st2038ancdemux: Reset element correctly on state changes and flush-stop
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1777>
2024-10-23 11:42:37 +00:00
Sebastian Dröge
623667af03 closedcaption: st2038: Handle different alignments correctly in muxer/demuxer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1777>
2024-10-23 11:42:37 +00:00
Sebastian Dröge
b2e37d3c98 closedcaption: Add ST2038 muxer element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1777>
2024-10-23 11:42:37 +00:00
Tim-Philipp Müller
a4dcb52ca7 closedcaption: add an SMPTE ST-2038 ancillary data demuxer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1777>
2024-10-23 11:42:37 +00:00
Sebastian Dröge
7e59c3f0fd Remove once_cell dependency
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1868>
2024-10-21 17:53:18 +00:00
Sebastian Dröge
b43a778a8e Fix a couple of type hierarchy bugs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1864>
2024-10-20 19:53:15 +00:00
Sebastian Dröge
ec8759ae44 Fix various new clippy warnings due to MSRV bump
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1864>
2024-10-20 19:53:15 +00:00
Sebastian Dröge
628dee9079 gtk4: Use a correctly typed None value when retrieving the paintable property fails
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/609

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1850>
2024-10-14 18:22:04 +03:00
Ray Tiley
06c8874752 [cea608overlay] - don't indent centered text.
Adding the additional 10% padding was causing captions to render to far
to the right.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1845>
2024-10-08 16:30:43 -04:00
Sebastian Dröge
36304a7d36 gtk4paintablesink: Don't initialize a GL context unless a GL platform is enabled
And also don't suggest in the template caps that GL might be supported.

For clarification, the wayland feature is also renamed to waylandegl and
using wayland gives a deprecation warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1837>
2024-10-02 14:12:12 +00:00
Sebastian Dröge
d1254fc4ef gtk4paintablesink: Don't check for a GL context when filtering dmabuf caps
There's no connection between the two and dmabuf can also not be
supported if GL is also unsupported.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1837>
2024-10-02 14:12:12 +00:00
Mathieu Duponchelle
115e12c09a transcriberbin: fix linking of user-provided transcriber
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1831>
2024-10-02 11:16:02 +00:00
Mathieu Duponchelle
5eccb180be transcriberbin: support both latency and transcribe-latency properties
Also don't set translate-latency property if not present

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1831>
2024-10-02 11:16:02 +00:00
Mathieu Duponchelle
8fae519c8d transcriberbin: add debug
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1831>
2024-10-02 11:16:02 +00:00
Sebastian Dröge
c9b370a6e4 cea708mux: Fix off-by-one in deciding whether a buffer belongs to this or the next frame
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1774>
2024-09-19 12:05:42 +00:00
Sebastian Dröge
d69d0f8738 cea708mux: Stop with EOS if all pads are EOS instead of continuing forever
Also don't drop buffers if multiple tries are needed for aggregating
because some pads are not ready yet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1774>
2024-09-19 12:05:42 +00:00
Sebastian Dröge
29b54ed2fc cea708mux: Don't create a separate source pad and actually push gap events downstream
The aggregator base class is already creating the source pad and the
source pad that was created here internally was never added to the
element at all. As such all gap events pushed on it never went anywhere.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1774>
2024-09-19 12:05:42 +00:00
Sebastian Dröge
aae9d5c0e9 closedcaption: cea608utils: Avoid overflow when deciding which lines to retain
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1776>
2024-09-17 12:00:56 +03:00
Jerome Colle
fef6601094 dav1ddec: add properties for film grain synthesis and in-loop filters
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1763>
2024-09-09 14:23:15 +00:00
Seungha Yang
0135c4251c transcriberbin: Fix passthrough state change
Sync state of child bin appropriately when passthrough is disabled

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1758>
2024-08-28 05:51:26 +00:00
Sebastian Dröge
7e912b0dde video/gtk4: Clean up imports a bit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1708>
2024-08-23 08:11:15 +00:00
Sebastian Dröge
3fd3a32b6f video/gtk4: Clean up GStreamer GL context initialization
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1708>
2024-08-23 08:11:15 +00:00
Jordan Petridis
4f01421cc4 video/gtk4: Make feature "v4_6" the default assumption
It's our minimum gtk4 version we target anyway so we
can remove some of the extra features in the toml and require
it by default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1708>
2024-08-23 08:11:15 +00:00
Jordan Petridis
ff5032934d video/gtk4: Remove some indentation in frame.rs
We have less cfg features now and don't need the extra
brackets to guard the codepaths.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1708>
2024-08-23 08:11:15 +00:00
Jordan Petridis
602760d0d8 video/gtk4: Remove cfg flag for gst-gl
GTK 4 hard depends on GL on all platforms, and now both
windows and macos have codepaths for the paintable sink to
produce GLTextures.

This we can now drop the cfg build flag we have making it optional.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1708>
2024-08-23 08:11:15 +00:00
Guillaume Desmottes
72e53b9f16 videofx: update image and image_hasher deps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1707>
2024-08-13 07:21:59 +00:00
Guillaume Desmottes
ea29052c39 cdg: update to image 0.25
I just published a new cdg_renderer release depending of image 0.25.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1707>
2024-08-13 07:21:59 +00:00
Guillaume Desmottes
cfe9968a77 gtk4: add custom widget automatically updating the window size
Use it in the example and debug window but let's not make it public yet.
Plan is to have a proper bin on top of gtk4paintablesink at some point.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1680>
2024-08-06 10:29:41 +00:00
Guillaume Desmottes
17910dd532 gtk4: add window-{width,height} property
Allow the application to pass the actual rendering size so overlays can
be rendered accordingly.

Fix #562

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1680>
2024-08-06 10:29:41 +00:00
Guillaume Desmottes
2333b241f0 gtk4: log paintable size in snapshot
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1689>
2024-08-05 15:53:19 +02:00
Jordan Petridis
1316b821c4 video/gtk4: Move the dmabuf cfg to the correct bracket level
This was defined one bracket above, which was causing the
gst-gl codepath below to also be disabled when there was
no dmabuf feature enabled.

This was also resulting in the following warning as
we were never creating the MappedFrame::GL vartiant due to this

```
warning: unused variable: `wrapped_context`
   --> video/gtk4/src/sink/frame.rs:541:85
    |
541 | ...", feature = "gst-gl"))] wrapped_context: Option<
    |                             ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_wrapped_context`
    |
    = note: `#[warn(unused_variables)]` on by default

warning: variant `GL` is never constructed
  --> video/gtk4/src/sink/frame.rs:80:5
   |
74 | enum MappedFrame {
   |      ----------- variant in this enum
...
```

Move the cfg to the appropriate place where it encaplsulates only
the dmabuf related code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1682>
2024-08-01 15:44:58 +03:00
Mathieu Duponchelle
79657e5671 transcriberbin: fix inspect with missing elements
Relax the dependency on `awstranscriber` by still building the initial
state when it is absent, this also means an alternative transcriber can
be linked even when `awstranscriber` was not available during
construction.

Also fix property getter / setters to avoid unwrapping the pad state,
and bubble up channel bin construction errors instead of unwrapping (eg
when textwrap was not available).

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/584
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1679>
2024-07-29 08:38:36 +00:00
Sebastian Dröge
380448587b gtk4: Enable GtkGraphicsOffload::black-background property when building with GTK 4.16
This allows offloading in more situations.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1673>
2024-07-18 12:28:20 +03:00
François Laignel
000c486568 rav1enc: document bitrate property unit
See:

e34e772e47/src/rate.rs (L365)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1667>
2024-07-12 18:59:17 +02:00
Robert Mader
c7ef8e8185 gtk4: Use scale instead of rotate where possible
In order to make it easier for GTK4 to figure out that the resulting
operation is 2D and - crucially - can get offloaded to Wayland.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1662>
2024-07-10 10:58:20 +02:00
Robert Mader
2238db2005 gtk4: Support RGBx formats in SW paths
GTK4 has matching enums and thus should handle them fine. Further more
it should allow renderers to reduce memory bandwidth by applying
occlusion culling.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1660>
2024-07-09 16:53:01 +02:00