Commit graph

464 commits

Author SHA1 Message Date
Mathieu Duponchelle 82ccba4267 tttocea608: fix pushing unfixed caps downstream
Allowed downstream caps might hold multiple structures, simply fixating
the first structure is not enough, tttocea608 must also create caps with
a single structure from there (or remove the remaining structures, but
new caps seems cleaner)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1146>
2023-03-24 17:51:01 +01:00
Mathieu Duponchelle 9e3110988c transcriberbin: fix initial transcription bin setup
When passthrough=false at construction and the transcription bin
is linked after receiving video caps (and not on state change),
there could be a race where transcription-bin was linked with
tee but state change of the transcription-bin was not finished.

If upstream pushed a buffer at that point, it got a flushing flow
return and stopped streaming.

This is the same issue and the same fix as 558656deb5
for the initial passthrough=false case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1142>
2023-03-22 23:39:32 +01:00
Carlo Cabrera 825fe9a4e2 gtk4: Fix compilation on macOS
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/332

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1138>
2023-03-18 16:05:30 +02:00
Sebastian Dröge f7c8940ff2 gtk4: Update for glib::Priority API changes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1132>
2023-03-12 10:27:16 +02:00
Sebastian Dröge 82f1789589 Fix indentation broken by cargo clippy --fix
... and another clippy warning.
2023-03-09 17:38:41 +02:00
Sebastian Dröge b025d068f2 Update for remaining gst::Element::link_many() and related API generalization
Specifically, get rid of now unneeded `&`.
2023-03-09 17:30:57 +02:00
Sebastian Dröge fc5ed15af5 Update for gst::Element::link_many() and related API generalization
Specifically, get rid of now unneeded `&`.
2023-03-09 16:46:52 +02:00
Sebastian Dröge 3ef8a48ded Fix a few new clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1120>
2023-03-07 08:47:01 +00:00
Sebastian Dröge bca4af0c79 gtk4: Set sync point on the video frame after mapping it
Otherwise it is not always ready for use yet in GTK even after waiting
on the sync point, and a fully transparent texture is rendered instead.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1103>
2023-02-24 11:52:28 +02:00
Jordan Petridis 90455a8111 video/gtk4: Add a flatpak snippet example in the README
Close #155

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1102>
2023-02-22 22:15:40 +02:00
Sebastian Dröge ce1faa6020 gtk4: Attach channel receiver to the default main context from the main thread
It requires acquiring the main context for thread-safety reasons and
that is only possible from the main thread itself.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1099>
2023-02-22 10:02:45 +02:00
Sebastian Dröge f08b65ece1 gtk4: Don't unnecessarily set the sink to READY to retrieve the context
That's not needed and will cause the GL context messages to be not
distributed inside the pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1099>
2023-02-21 21:36:45 +02:00
Sebastian Dröge 8aa5125d5b gtk4: Refactor and simplify GL context handling
Create a single, global GDK GL context and the corresponding GStreamer
GL display and wrapped GStreamer GL context when initializing the first
sink and continue using that for all further sinks.

Additionally, don't create a full GStreamer GL context inside the sink
but only distribute the wrapped GL context in the pipeline so that
elements that actually need a full GL context can create one that is
sharing with that one. The sink itself does not need a full GStreamer GL
context.

Then inside the sink check that any GL memory that arrives was created
by a GL context that can share with the wrapped GDK GL context and only
then use it.

And lastly, use the correct GL contexts for a) creating a sync point and
b) actually waiting on it.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1099>
2023-02-21 21:36:45 +02:00
Sebastian Dröge 9fc1404415 Update minimum supported Rust version to 1.66
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1096>
2023-02-20 11:09:01 +02:00
Sebastian Dröge 04e101c605 Optimize various error message / debug message formatting
Directly make use of format strings instead of formatting a string
beforehand and then passing it to the macros.
2023-02-13 11:50:57 +02:00
Sebastian Dröge 1e13dbb99c Update versions to 0.11.0-alpha.1 2023-02-10 00:23:56 +02:00
Sebastian Dröge 44405e0cd7 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/1080>
2023-02-08 11:26:25 +02:00
Sebastian Dröge 5c2de6aeb6 gtk4: Update for GLDisplay object lock requirements 2023-02-06 11:10:02 +02:00
Sebastian Dröge c7209dbd4f Return exit code from gio::Application::run() from main()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1065>
2023-01-27 18:50:01 +00:00
Sebastian Dröge 62bfc545d3 gtk4: Fix compilation after gst_gl::Display API changes 2023-01-27 20:46:22 +02:00
Sebastian Dröge 3b4c48d9f5 Fix various new clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1062>
2023-01-25 10:31:19 +02:00
Sebastian Dröge e0e63dd4da 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/1057>
2023-01-23 10:46:38 +02:00
Sebastian Dröge 037294b077 dav1d: Get rid of some unnecessary unwrap()s
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1055>
2023-01-22 00:32:52 +02:00
Sebastian Dröge f62d07633d 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/1055>
2023-01-22 00:28:15 +02:00
Sebastian Dröge c5a625ae28 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/1055>
2023-01-22 00:27:22 +02:00
Sebastian Dröge d110977580 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/1055>
2023-01-22 00:25:23 +02:00
Sebastian Dröge 458b2386ed Update for glib API changes 2023-01-21 18:13:48 +02:00
Sebastian Dröge b6af64b970 gtk4: Only provide a buffer pool to upstream if it requested one 2023-01-19 16:37:02 +02:00
Sebastian Dröge d1196c3e28 gtk4: Update for allocation query caps API changes
And make no caps into a non-error.
2023-01-19 16:36:37 +02:00
Sebastian Dröge 03df4f253c 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/1052>
2023-01-19 13:53:21 +02:00
Sebastian Dröge b161f56a5c 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/1052>
2023-01-19 13:51:57 +02:00
Sebastian Dröge 4464bf2eaa Update for gtk::Application constructor API changes 2023-01-16 11:51:10 +02:00
Sebastian Dröge 6132788b02 Update for caps/structure-related string API changes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1048>
2023-01-15 22:58:44 +02:00
Sebastian Dröge 1a06f5e671 rav1e: Enable threading support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1039>
2023-01-09 14:04:13 +02:00
Sebastian Dröge 58c21d9868 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/1037>
2023-01-07 12:42:42 +02:00
Sebastian Dröge 27435ad82e Update for API changes 2023-01-05 12:33:54 +02:00
Sebastian Dröge de23ea7f29 video: Fix compilation after API changes 2023-01-04 13:39:14 +02:00
Sebastian Dröge 439ada614c gtk4: Rename a variable to make more sense
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1032>
2022-12-29 11:13:25 +02:00
Sebastian Dröge f72540f5c2 gtk4: Handle more GL context creation failures gracefully
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1032>
2022-12-29 11:13:25 +02:00
Sebastian Dröge 9ec06199b1 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/1032>
2022-12-29 11:13:25 +02:00
Sebastian Dröge 4ee70913bd gtk4: Reduce number of unwraps during GL context creation and query handling
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1032>
2022-12-29 11:13:25 +02:00
Jordan Petridis cf0ba40115 video/gtk4: Fix typo in info logs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1030>
2022-12-29 02:59:26 +00:00
Nirbheek Chauhan 9ee7118bf6 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/1025>
2022-12-28 23:55:10 +05:30
Nirbheek Chauhan 06123d74ba 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/1025>
2022-12-28 23:55:10 +05:30
Sebastian Dröge 4fe0786bbd gtk4: Add support for GL on macOS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1025>
2022-12-28 23:55:10 +05:30
Nirbheek Chauhan ae9ac872c0 gtk4: Remove 'gst' from gtksink debug category name
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1029>
2022-12-28 19:38:57 +05:30
Sebastian Dröge ca17c9bc4f 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/1024>
2022-12-22 22:56:48 +00:00
Sebastian Dröge 1026949b2b 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/1024>
2022-12-22 22:56:48 +00:00
Sebastian Dröge 52764e140e 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/1024>
2022-12-22 22:56:48 +00:00
Sebastian Dröge 30e501e7b0 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/1024>
2022-12-22 22:56:48 +00:00
Sebastian Dröge 0c8e69ed7c 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/1024>
2022-12-22 22:56:48 +00:00
Sebastian Dröge 3f904553ea Fix various new clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1011>
2022-12-13 11:43:16 +02:00
Sebastian Dröge 65efdc8c81 gtk4: Only require GTK 4.6 if GL support is enabled
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1007>
2022-12-12 13:49:14 +02:00
Sebastian Dröge a077ecba85 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/1001>
2022-12-12 10:51:15 +02:00
Jordan Petridis 37b0dab0e8 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/1001>
2022-12-12 10:51:09 +02:00
Sebastian Dröge 08c716d110 tttocea608: Don't fail if a gap event contains no duration
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1002>
2022-12-07 14:04:54 +00:00
Seungha Yang 1c145e2ba9 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/996>
2022-12-01 17:03:31 +00:00
Sebastian Dröge 25b0b15989 rav1e: Update to rav1e 0.6
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/997>
2022-12-01 15:59:44 +02:00
Sebastian Dröge 8c457cfa04 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/995>
2022-11-30 11:59:53 +02:00
Sebastian Dröge 599d3a4d8a 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/995>
2022-11-30 11:59:53 +02:00
Jordan Petridis 975f0141be video/gtk4: Implement support for GLTextures when possible.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/588>
2022-11-29 21:18:46 +02:00
Jordan Petridis 51c34267a9 video/gtk4: Restrict visibility of struct related to the Frame
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/588>
2022-11-29 21:06:12 +02:00
Jordan Petridis ea6c59e5e9 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/588>
2022-11-29 21:06:12 +02:00
Sebastian Dröge 02fc343642 gif: Update to gif 0.12
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/980>
2022-11-18 09:03:21 +00:00
Sebastian Dröge 456fb276d6 Revert "Update for pango API changes"
This reverts commit 6e54d3cea9.

The change was wrong and the pango bindings work the same as before
again.
2022-11-18 10:58:41 +02:00
Sebastian Dröge 6e54d3cea9 Update for pango API changes
pango::Language::from_string() can fail and also can accept None as
argument.
2022-11-18 09:46:50 +02:00
Sebastian Dröge 1981ffbea0 Provide explicit type to Iterator::sum() calls to avoid ambiguity 2022-11-17 10:16:26 +02:00
Sebastian Dröge bf9f7a747e closedcaption: Update for deprecated chrono functions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/978>
2022-11-12 18:41:08 +02:00
Sebastian Dröge a8250abbf1 Fix various new clippy warnings 2022-11-01 10:27:48 +02:00
Sebastian Dröge f2223cf2cb Update versions to 0.10.0-alpha.1 2022-10-24 19:31:19 +03:00
Sebastian Dröge 6d21231554 pngenc: Encode every frame individually
Passing multiple frames to the encoder only causes the PNG header to be
written before the very first frame and is meant for writing animated APNG.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/261
2022-10-24 16:35:51 +03:00
Sebastian Dröge 9a68f6e221 Move from imp.instance() to imp.obj()
It's doing the same thing and is shorter.
2022-10-23 23:08:46 +03:00
François Laignel 86776be58c Remove & for obj in log macros
This is no longer necessary.

See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1137
2022-10-23 21:22:31 +02:00
Sebastian Dröge f045099fc1 Fix GObject type names, GStreamer debug category names and element factory names
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/198
2022-10-23 20:46:08 +03:00
Sebastian Dröge 211cd095d6 Add new mux subdirectory for container formats
Contains the (incomplete) flavors FLV demuxer and the fragmented MP4
muxer for now.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/173
2022-10-23 20:25:08 +03:00
Sebastian Dröge 20ad9175d8 Make GStreamer plugin/crate/library/directory names and descriptions consistent
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/238
2022-10-23 20:25:08 +03:00
Rafael Caricio b97a855a51 videocompare: Update README with reference 2022-10-23 17:16:22 +03:00
Sebastian Dröge f058a5e229 Various minor cleanups 2022-10-22 19:50:24 +03:00
Zhao, Gang 68ab01254d videocompare: Fix warning
Fixed following warning:

warning: unreachable pattern
  --> video/videofx/src/videocompare/hashed_image.rs:76:13
   |
76 |             _ => unreachable!(),
   |             ^
   |
   = note: `#[warn(unreachable_patterns)]` on by default
2022-10-23 00:02:07 +08:00
Sebastian Dröge 12400b6b87 Update everything for element factory builder API changes
And set properties as part of object construction wherever it makes
sense.
2022-10-19 19:43:29 +03:00
Sebastian Dröge 59daaa62aa gtk4: Update to fragile 2.0 2022-10-19 11:31:00 +03:00
Rafael Caricio 9180d348bf Add video comparison element
New video/image comparison element, find images in the stream and post
metadata of comparisons of the video frames to the application.
2022-10-18 13:24:05 +00:00
François Laignel 8011eadfd2 Use new format constructors
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1128
2022-10-18 10:36:59 +00:00
Sebastian Dröge e17688a2da Update for pango API changes 2022-10-17 20:02:02 +03:00
Vivia Nikolaidou 9b1361b538 plugins: Use .into() instead of gst::Fraction::new() where applicable 2022-10-14 18:21:28 +03:00
Vivia Nikolaidou 0ab965335f onvifmetadataoverlay, cea608overlay: Fix pangocairo::FontMap::new()
It doesn't return an Option anymore.
2022-10-14 18:12:33 +03:00
Vivia Nikolaidou f11b0fa5eb plugins, examples, tutorials: Use AudioCapsBuilder and VideoCapsBuilder
Simplify caps creation code
2022-10-13 19:24:57 +00:00
Sebastian Dröge e49138516c Update for pad default functions API changes 2022-10-12 19:50:15 +03:00
François Laignel bc5b51687d fix formatted values constructors
In restrospect, building formatted values using operations on the
`ONE` constant doesn't seem idiomatic. This commit uses new panicking
constructors instead.

See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1122
2022-10-11 15:06:53 +02:00
François Laignel bd14e476f1 Fix direct access to the inner specific formatted values
This is no longer available as this could lead to building a defined
value in Rust which could be interpreted as undefined in C due to
the sentinel `u64::MAX` for `None`.

Use the constants (e.g. `ONE`, `K`, `M`, ...) and operations to build
a value and deref (`*`) to get the quantity as an integer.
2022-10-10 19:28:13 +02:00
Seungha Yang b1b707008f jsontovtt: Print object information to debug message
Use GST_*_OBJECT() variant debug printing method whenever possible
2022-10-10 22:28:30 +09:00
Seungha Yang 3d317b976e jsontovtt: Add timeout property
As described in the spec D.4 Automatic Caption Blanking,
allows automatic clear if user specified timeout value
2022-10-10 22:16:15 +09:00
Sebastian Dröge 6e7ebc30e0 Revert "rav1e: Pin v_frame dependency to version 0.2.5 for now"
This reverts commit f85321ce9f.

Versio 0.2.6, which broke API, was yanked and released as 0.3 so this is
all working fine again.
2022-10-10 15:45:51 +03:00
Sebastian Dröge 7ee4afacf4 Change *Impl trait methods to only take &self and not Self::Type in addition 2022-10-10 15:03:25 +03:00
François Laignel 7818ac658b Use GFV::none_for_format where applicable 2022-10-08 18:29:10 +02:00
Sebastian Dröge 4c57a97d4d Update for glib::Object::new() API changes 2022-10-07 23:54:53 +03:00
Sebastian Dröge f85321ce9f rav1e: Pin v_frame dependency to version 0.2.5 for now
See https://github.com/rust-av/v_frame/issues/1
2022-10-04 19:12:59 +03:00
Nirbheek Chauhan 1d4d3e4cb0 build: Update versions to be 0.9.0-alpha.1
0.9.0 is the next release, so we can't name things that already.

Also the version in meson.build was 0.13.0, which is completely wrong.
2022-10-04 21:27:23 +05:30
Sebastian Dröge a867d6228b dav1d: Update to dav1d 0.9 2022-10-03 10:18:35 +03:00
Seungha Yang 9740140798 jsontovtt: Don't push zero-duration cue data
It will likely confuse players. We can drop corresponding
cue since the text line will be included in the next cue
2022-09-29 23:02:38 +09:00
Seungha Yang 6772e49712 cea608tojson: Clip column number if it exceeds allowed value
... as described in the spec
2022-09-28 01:41:36 +09:00
Sebastian Dröge 81ee30771c pngenc: Allow using deprecated compression levels 2022-09-06 19:33:55 +03:00
Jordan Petridis 3c6086caeb video/rspng: add missing doc feature gate 2022-09-05 11:47:46 +03:00
Sebastian Dröge 1a40186485 Update for GLib ParamSpec builder API changes 2022-09-05 11:45:47 +03:00
Sebastian Dröge 46dddaf31c Update minimum supported Rust version to 1.63 2022-09-04 21:31:55 +03:00
Xavier Claessens 16f9c37c71 Fix missing pkgconfig requires 2022-09-02 22:00:57 +00:00
Thibault Saunier 67e651f57c Allow "unused_doc_comments" as we use hotdoc and not rustdoc 2022-08-29 18:33:22 -04:00
Thibault Saunier 31a53bba8a Generate plugins documentation using hotdoc
Which will automatically be integrated in gstreamer documentation
2022-08-29 18:33:22 -04:00
Vivia Nikolaidou 5606111345 plugins: Simplify code using ParamSpecBuilder 2022-08-22 17:58:43 +03:00
Sebastian Dröge 2b61d51e91 Remove unnecessary unsafe blocks for Buffer::as_ptr() 2022-08-12 18:12:22 +03:00
Vivia Nikolaidou 07cbc2f025 audio, video: Use AudioCapsBuilder::new_interleaved where applicable
Further code simplification
2022-08-10 11:18:18 +00:00
Vivia Nikolaidou 8ee8ae581a audio: Use gst_audio::AudioCapsBuilder in some plugins
Simplify caps creation codes
2022-08-09 22:01:10 +03:00
Vivia Nikolaidou 247702b76d video: Use gst_video::VideoCapsBuilder in some plugins
Simplify caps creation codes
2022-08-09 22:01:10 +03:00
François Laignel 5c5c15d36a Simplify Formatted value handling
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1059
2022-07-11 21:21:54 +02:00
Philippe Normand c6238a6a9f roundedcorners: Ensure alpha_mem is mutable when updating radius
The `get_mut()` function can return None when the memory is not writable, so
instead, make sure the memory is writable by using `make_mut()`.

Fixes #214
2022-06-30 17:10:13 +00:00
Philippe Normand d867ef9dee roundedcorners: Logging improvement
Cache the new border radius only after logging it, otherwise the same value
appears as old and new.
2022-06-30 17:10:13 +00:00
Sebastian Dröge 51c7d0652e Fix/silence a couple new clippy warnings 2022-06-30 16:07:32 +03:00
Mathieu Duponchelle 806d101d87 transcriberbin: remove print statement
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/784>
2022-06-17 16:14:54 +02:00
Sebastian Dröge b1b3930e2b colordetect: Update to color-thief release 2022-06-07 10:01:01 +03:00
Arun Raghavan 557917b92a dav1ddec: Write src_query() in match syntax for easier extensibility
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
2022-05-11 10:02:27 -04:00
Arun Raghavan 2c3514a5a1 dav1ddec: Deal with the possibilty of 0/1 fps in latency math
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
2022-05-11 10:02:10 -04:00
Arun Raghavan 7eb67de34c dav1ddec: Use sink_pad() convenience accessor
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
2022-05-11 10:01:51 -04:00
Arun Raghavan 3250675e78 dav1ddec: Move state to Mutex from Arc
This is needed because we may now access state concurrently with and
outside of the streaming thread during a LATENCY query.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
2022-05-11 10:01:51 -04:00
Arun Raghavan 5d01bfcb79 dav1ddec: Move decoder init from start() to set_format()
We need a successful LATENCY query to be able to correctly initialise
max frame delay, so let's defer decoder init until we know upstream is
readier for it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
2022-05-11 10:01:51 -04:00
Arun Raghavan 05258756ce dav1ddec: Report latency based on frame delay
This is not strictly correct as we might not use the same mechanism that
dav1d is using to detect the number of CPUs. We can drop the num_cpus
based approach once
https://code.videolan.org/videolan/dav1d/-/merge_requests/1407 is merged
upstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
2022-05-11 08:29:48 -04:00
Arun Raghavan 7d681c5ce4 dav1ddec: Expose a couple of decoder settings as properties
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
2022-05-11 08:29:16 -04:00
Arun Raghavan ea98a0b596 dav1ddec: Bump dependency for dav1d 1.0.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/698>
2022-05-11 08:29:15 -04:00
Mathieu Duponchelle 05ece5560e tttocea608: expose roll-up timeout property
In roll-up mode, when no more timed text comes in, the closed
captions may remain displayed on screen indefinitely (unless the
decoder implements a timeout, but that is not mandatory).

Expose a property to erase the display memory after a configurable
amount of time has elapsed instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/754>
2022-05-11 01:47:52 +02:00
Mathieu Duponchelle 6b80fdc270 cea608overlay: handle CLEAR status
+ log errors

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/754>
2022-05-10 18:52:56 +02:00
Sebastian Dröge 4a2c93299e mccparse/sccparse: Don't log gst::FlowError::Flushing or Eos as error to the debug logs 2022-05-03 15:32:07 +03:00
Sebastian Dröge ae32cc7f2b closedcaption: Update to uuid 1.0 2022-04-22 13:18:26 +00:00
Philippe Normand b423febfbe videofx: Add colordetect video filter
This new video filter is able to detect the dominant color in a video frame.
When the color has changed from the previous frame the filter posts an Element
message on the bus, the associated structure is named `colordetect` and has two
fields:

* a string field named `dominant-color`
* a list field containing the whole color palette, stored as uint values, sorted
  by dominance, with more dominant colors first
2022-04-16 17:40:34 +01:00
Seungha Yang 558656deb5 transcriberbin: Protect runtime "passthrough=false" change
There can be small race where transcription-bin is linked with
tee but state change of the transcription-bin is not finished.
And at the same time, upstream pushes event/buffer to the
transcription-bin. Do state change first then link to avoid
the condition

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/716>
2022-04-08 21:55:54 +00:00
Sebastian Dröge 803e452889 Update minimum supported GStreamer version to 1.14 2022-04-07 12:41:54 +03:00
Sebastian Dröge 518e43fc5f cea608tott: Don't zero-pad SRT indices but zero-pad hours to at least two digits
Zero-padding is not specified for the indices but all time components
need to be zero-padded (3 digits for fractional seconds, 2 digits for
everything else).
2022-03-28 12:17:34 +03:00
Ray Tiley dd028ce97e [transcriberbin] - make audioqueue leaky
If transcription runs slow or has issues the queue can fill up and block
all audio processing. This gives the queue a sufficent buffer and allows
it to drop audio if it eventually fills up. This was most noticable with
bad internet connections using the `awstrnascriber` where it would take
quite a while for the websocket to eventually timeout and the bin to
enter `passthrough=true`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/688>
2022-03-15 20:27:02 +00:00
Sebastian Dröge 6cf7d28481 Use SPDX license format in Cargo.toml 2022-03-14 10:23:16 +02:00
Seungha Yang aac7e52d87 transcriberbin: Don't notify signal inside lock
That can potentially cause deadlock
2022-03-10 20:10:30 +09:00
Seungha Yang 9e6fc2983f transcriberbin: Add caption-source property
By using this new property, application can select exclusive caption
source. There are three source types
- Both: Inband and transcription captions are combined if exist.
  This is default behavior.
- Inband: Transcription buffers will be dropped
- Transcription: Caption meta of each video buffer will be dropped

In this version, transcriberbin doesn't provide any hint
for application to help caption source decision. That can be done
by application's strategy, passthrough status or probing inband
caption meta for example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/684>
2022-03-08 23:51:28 +09:00
Seungha Yang ecf03d0e5c transcriberbin: Fix deadlock
Fix race between latency query handler and setup_transcription()
method.

Locking order of setup_transcription() is
state lock -> setup_transcription() -> settings lock
So taking state lock inside of setting lock in src_query()
can cause deadlock.
2022-03-08 22:38:55 +09:00
Sebastian Dröge b38f6cc731 Remove now unnecessary Send+Sync impls for element/etc subclasses
This is now automatically implemented.
2022-02-28 18:56:58 +02:00
François Laignel 2cf84d5ce8 Update minimum supported Rust version to 1.57 2022-02-21 23:32:32 +01:00
François Laignel 422ea740ca Update to gst::_log_macro_
See the details:
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/980
2022-02-21 20:50:01 +01:00
Sebastian Dröge 7b81945ca1 dav1ddec: Use AtomicRefCell instead of Mutex for the state
It's only accessed from the streaming thread.
2022-02-14 14:43:54 +02:00
Sebastian Dröge 03787ef857 rav1eenc: Use AtomicRefCell instead of Mutex for the state
It's only accessed from the streaming thread.
2022-02-14 14:36:50 +02:00
Sebastian Dröge 93bfa4d37a rav1enc: Put container sequence header into the caps 2022-02-08 12:18:48 +02:00
Sebastian Dröge 22ae31bfcb dav1ddec: Switch to dav1d 0.7 2022-02-07 16:06:03 +02:00
Sebastian Dröge 1b8ee90f83 rav1enc: Don't handle NeedMoreData as "soft" error 2022-02-07 07:30:57 +00:00
Sebastian Dröge d3d483d0b5 rav1enc: Simplify code
Sending a `None` frame is equivalent to calling `flush()` so no need to
do both.
2022-02-07 07:30:57 +00:00
Sebastian Dröge 7654567201 rav1enc: Set mastering display info, content light level and HDR related colorimetry
Configurable behind the "hdr" cargo feature that is enabled by default
but requires GStreamer 1.18.
2022-02-07 07:30:57 +00:00