Commit graph

464 commits

Author SHA1 Message Date
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
Sebastian Dröge 1451e267cc rav1enc: Expose various new settings 2022-02-07 07:30:57 +00:00
Sebastian Dröge 12f2b9282a rav1enc: Switch from speed preset 5 to 6 as default
This is the default of rav1e nowadays.
2022-02-07 07:30:57 +00:00
Guillaume Desmottes c879b4ee2e cdg: update image and cdg_renderer
I pushed a cdg_renderer release using latest image.
2022-02-04 15:22:13 +01:00
Sebastian Dröge 858865b731 gtk4: Attach main context receiver from the main context's thread
Otherwise it will fail if the sink's state is changed from a different
thread.

See https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio/-/issues/2
2022-02-04 13:51:31 +02:00
Sebastian Dröge 7c872bb92b dav1ddec: Fix compilation after some API changes 2022-02-03 15:51:46 +02:00
Sebastian Dröge cf46d9439b dav1ddec: Add 8/16 bit grayscale support 2022-02-03 13:39:43 +02:00
Sebastian Dröge 240fa0b066 rav1enc: Support 8 bit grayscale input 2022-02-03 13:39:43 +02:00
Sebastian Dröge 5a4c8b9fc8 dav1ddec: Release input frames that immediately caused a decoding error
We're not going to get any output for them.
2022-02-03 11:04:57 +00:00
Sebastian Dröge 2c511fca50 dav1ddec: Require correct alignment and stream format when running with GStreamer 1.20 2022-02-03 11:04:57 +00:00
Sebastian Dröge 772fbaa073 rav1enc: Include stream-format and alignment in the caps 2022-02-03 11:04:57 +00:00
Sebastian Dröge 6ce3029e07 dav1ddec: Update for fixed dav1d-rs API
As a side effect this allows us also to handle errors more gracefully
and to reduce memory load by outputting decoded frames immediately.

Also the code was changed a bit to reduce the number of redundant mutex
lock/unlocks.
2022-02-03 11:04:57 +00:00
Sebastian Dröge b795c0c392 dav1ddec: Clean up state tracking a bit
And especially don't keep a decoder instance around while in Null state.
2022-02-03 11:04:57 +00:00
Sebastian Dröge 6e28a17280 dav1ddec: Don't consider decoding errors as fatal
Instead use the `gst_video::video_decoder_error!` macro for allowing a
certain number of consecutive errors before actually failing.
2022-02-03 11:04:57 +00:00
Sebastian Dröge c35d1cdc0c dav1ddec: Pass element instance to debug logs 2022-02-03 11:04:57 +00:00
Julian Sparber e419c18a87 gtk4: Implement Default for PaintableSink 2022-01-31 14:11:03 +00:00
Sebastian Dröge 42f9f99690 Update to parking_lot 0.12 and hrtf 0.8 2022-01-31 15:20:44 +02:00
Sebastian Dröge f44b86cd30 Simplify some code around event/query views 2022-01-22 12:18:02 +02:00
Sebastian Dröge 65fcd55160 Update for event/message/query view API changes 2022-01-19 15:07:45 +02:00
Sebastian Dröge 763ad0cb18 Rename self_ variables to imp for consistency 2022-01-17 20:09:18 +02:00
Sebastian Dröge b2d0172422 Replace Foo::from_instance(foo) with foo.imp() 2022-01-17 19:36:41 +02:00
Sebastian Dröge 51f8e963d6 Add SPDX-License-Identifier to all file headers 2022-01-15 21:18:47 +02:00
Sebastian Dröge 326449b3e6 Re-license LGPL-2.1 plugins to MPL-2
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/168
2022-01-15 21:05:11 +02:00
Sebastian Dröge 0c7764fa40 Update versions to 0.9.0 2022-01-15 20:33:49 +02:00
Sebastian Dröge ab14c50d1c Ignore clippy::non_send_fields_in_send_ty lint
It's useless in its current shape and wrongly triggering on all types.

See https://github.com/rust-lang/rust-clippy/issues/8045
2022-01-14 12:09:57 +02:00
Sebastian Dröge 81f5f0f60c Fix various clippy warnings 2022-01-12 19:51:08 +02:00
Mathieu Duponchelle 0bc7697600 sccenc: add output-padding property
When set to False, sccenc will only output non-padding byte pairs.

I cannot find reference documentation for the format, but the closest
thing I find to it is
http://www.theneitherworld.com/mcpoodle/SCC_TOOLS/DOCS/SCC_FORMAT.HTML,
which doesn't have padding in the examples.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/635>
2022-01-12 16:49:24 +00:00
Sanchayan Maity a43e21a414 videofx: roundedcorners: Fix missing copyright attribution 2021-12-29 16:15:43 +00:00
Sebastian Dröge 3ed9e291c2 Update for decide/propose_allocation() API changes 2021-12-06 19:11:24 +02:00
Sebastian Dröge 66e987c174 Fix a couple of new clippy warnings 2021-12-02 22:31:52 +02:00
Sebastian Dröge c46901d150 Fix or silence various new 1.57 clippy warnings 2021-11-30 16:31:50 +02:00
Sanchayan Maity 2c2cd8c2be Implement rounded corners
This plugin takes I420/YUV and appends an alpha plane to give YUVA/A420
to round the corners analogous to the border-radius in CSS. Other video
formats like NV12 not supported yet. Support for other planar formats
will follow.

Not all ways of specifying border-radius as in CSS are implemented at
the moment. Currently, we only support specifying it in pixels and it
gets applied uniformly to all corners.
2021-11-22 17:04:07 +05:30
Sebastian Dröge 86f422592b Update for glib::Enum / glib::Boxed / glib::flags! macro renames 2021-11-22 11:04:26 +02:00
Sebastian Dröge 55aad51141 Update for glib constructor renames
See https://github.com/gtk-rs/gtk-rs-core/pull/384
2021-11-20 14:31:06 +02:00
Sebastian Dröge 288acaa7cc cdg: Update test for child proxy property API changes 2021-11-20 10:47:02 +02:00
Sebastian Dröge f817f6e9b9 Update to rav1e 0.5 and async-tungstenite 0.16
Also add an asm feature to rav1e, which requires nasm to be in place.
2021-11-17 10:10:00 +02:00
Mathieu Duponchelle b738d5933d tttojson: fix row computation
I hadn't really tested the element with pop-on mode, and the row
for each line in the input text was hardcoded to 13, which was
clearly wrong.

Switch to incrementing it properly.
2021-11-16 07:51:41 +00:00
Sebastian Dröge e81047b8a2 cea608overlay: Fix compilation after Pango API changes 2021-11-13 12:33:55 +02:00
Mathieu Duponchelle 78d7cbd7dd cea608overlay: expose timeout property
C.9 Automatic Caption Erasure (Preferred)

[...]

Some manufacturers have suggested building automatic timeout into their
decoders. They propose that if no data are received for the selected caption
channel within a given time, the decoder should automatically erase the
caption. Such erasure may supersede the intentions of the caption service
providers and institute one maximum display time for all captioning services.

If such a timeout is deemed necessary, however, the time limit should be no less
than 16 seconds, an amount of time said by caption service providers to be longer
than their most enduring caption. It is preferred, when automatic caption erasure
is used in a decoder, that only displayed memory be erased, since some caption
service providers may, contrary to recommended practice (see Section B.8.3), send
pop-on style caption data to non-displayed memory more than 16 seconds before
sending the EOC command which causes the caption to display.
2021-11-13 00:15:47 +01:00
Bilal Elmoussaoui 82be7b3ac5 adapt to ObjectExt improvements 2021-11-08 14:43:53 +02:00
Sebastian Dröge d9bda62a47 Update for GLib/GStreamer API changes
And clean up a lot of related property/caps/structure code.
2021-11-06 09:34:10 +02:00
Sebastian Dröge 0a7d1639e7 Update to Rust edition 2021 and minimum supported Rust version to 1.56 2021-10-31 17:40:05 +02:00
Michael Farrell 5ae1f72162 cea608overlay: Update for multiple Pango API changes in gtk-rs-core#308
https://github.com/gtk-rs/gtk-rs-core/pull/308
2021-10-31 12:50:50 +02:00
Sebastian Dröge da4122a721 closedcaption/mccenc: Update for glib::DateTime / TimeSpan API changes 2021-10-23 13:07:01 +03:00
Sebastian Dröge b9541b2ca4 Update for GstObjectImpl API change 2021-10-23 12:31:33 +03:00
François Laignel 27b9f0d868 Improve usability thanks to opt-ops
The crate option-operations simplifies usage when dealing with
`Option`s, which is often the case with `ClockTime`.
2021-10-18 15:09:47 +02:00
Sebastian Dröge 70f0aa9758 gtk4: Add support for rendering overlay composition rectangles directly via GTK 2021-10-17 19:03:24 +00:00
Sebastian Dröge c5d3a2efce Update for event API changes 2021-10-17 17:30:38 +03:00
Sebastian Dröge 01a551f2ac rav1enc/gifenc: Add VideoMeta to the supported metas in propose_allocation() 2021-10-16 16:21:49 +03:00
Sebastian Dröge fe0075ad15 closedcaption/cea608overlay: Proxy the allocation query 2021-10-16 16:21:49 +03:00
Sebastian Dröge cecacf5430 hsv: Port detecter/filter to VideoFilter base class 2021-10-16 16:21:49 +03:00
Sebastian Dröge cf637d0288 gtk4: Add gst_video::VideoMeta to the allocation metas in propose_allocation() 2021-10-16 15:05:18 +03:00
Sebastian Dröge d17c3483c1 video: Update for new decide_allocation() signature 2021-10-16 15:02:11 +03:00
Sebastian Dröge 6ec98ec5e4 Update to pretty-assertions 1.0 2021-10-14 10:20:19 +03:00
Bilal Elmoussaoui 30796fbe07 Add a GTK4 paintable sink plugin
Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Co-authored-by: Jordan Petridis <jordan@centricular.com>
2021-10-13 12:28:51 +03:00
Sebastian Dröge 21e8c6dcd1 pngenc: Don't recreate the encoder after every frame
Version 0.17.2 of the encoder allows again to encode frame after frame
without creating a new encoder instance.
2021-10-09 12:14:37 +03:00
Jan Schmidt 3260651671 jsontovtt: Add an element for fragmented WebVTT
This element converts the CC JSON format to fragmented WebVTT.

Co-authored by Mathieu Duponchelle <mathieu@centricular.com>
2021-09-30 19:37:32 +00:00
Mathieu Duponchelle bc587a09f8 cea608tojson: expose "unbuffered" property
In this mode, cues are output as soon as they are ready for
display, without a duration. This can be useful in live mode,
when downstream is OK with determining the duration after the
fact, through clear=True.

The consequence of this is that the current roll-up window will
be output repetitively, it is up to downstream to deal with that
how it prefers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/554>
2021-09-30 17:05:01 +02:00
Mathieu Duponchelle 01cc9e23d8 transcriberbin: switch to passthrough on transcriber error
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/569>
2021-09-28 16:17:57 +00:00
Sebastian Dröge ea2a313d01 ffv1dec: Add support for 4:1:0 and 4:1:1 YUV 2021-09-18 12:34:31 +03:00
Sebastian Dröge 2878e4ce7c ffv1dec: Fix decoding of 4:4:4 / 4:4:4:4 / 4:2:2 / 4:4:2:2 YUV formats 2021-09-18 12:34:31 +03:00
Sebastian Dröge 600d217e7d ffv1dec: Add support for >8 bit color formats 2021-09-18 12:34:31 +03:00
Sebastian Dröge 08229402cd ffv1dec: Don't copy decoded memory if the strides are not matching but downstream supports video meta 2021-09-18 12:34:31 +03:00
Sebastian Dröge fd1c0a7518 ffv1dec: Drop decoder state before calling VideoDecoder::negotiate()
It calls into other elements via the allocation query and the caps
event, which makes it dangerous to keep a mutex locked at the same time.
2021-09-18 12:34:31 +03:00
Sebastian Dröge 4c8c398aa4 dav1d: Don't configure a buffer pool and don't require one for videometa support
dav1d is allocating memory itself and we directly forward that without
using any downstream buffer pool.
2021-09-18 11:58:59 +03:00
Sebastian Dröge f4613bfc07 Use Buffer::from_mut_slice() in more places
This allows downstream to map the memory mutable.
2021-09-18 11:58:59 +03:00
Sebastian Dröge b9864acad6 ffv1: Lower minimum required GStreamer version to 1.12 2021-09-10 09:42:25 +03:00
Sebastian Dröge c8fc082968 ffv1: Update version to 0.8.0 like elsewhere 2021-09-10 09:22:11 +03:00
Arun Raghavan bb3949aeda video: Add a new ffv1 decoder plugin 2021-09-10 06:20:31 +00:00
Sebastian Dröge 426dc4c54d flavors: Update to nom 7 2021-09-09 06:41:49 +00:00
Sebastian Dröge 96d86eaa06 Clean up clippy warnings and CI configuration
Put clippy overrides into the sources files instead of the CI
configuration, and fix various warnings / clean up code.
2021-09-08 12:35:41 +00:00
Sebastian Dröge 434fe8e56f closedcaption/mccenc: Fix unit test to not require changing the version number in the output every time 2021-09-03 09:12:25 +03:00
Mathieu Duponchelle 715418c005 tttocea608: don't erase display memory before loading new pop-on
There is no point to that, the code is already factored in such
a way that erase_display_memory is inserted at the correct time,
including while loading the next pop-on captions in non displayed
memory.
2021-09-02 00:21:24 +02:00
Sebastian Dröge 4a870af19c Update various dependencies 2021-08-26 09:44:43 +03:00
Sebastian Dröge 848b296390 Add capi feature to all plugin crates
This fixes the build with cargo-c 0.9.2.
2021-08-11 20:51:36 +03:00
Mathieu Duponchelle b7d1c178a3 tttocea608: clean up locking
Locking order of state and settings was inconsistent, and causing
deadlocks. Fix and document it, consistently drop locks before
chaining up events / pushing and avoid sequentially unlocking /
relocking settings in the same local code path.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/539>
2021-08-03 18:23:53 +02:00
Sebastian Dröge 052365ba1a Fix various needless-borrow clippy warnings and others 2021-07-30 13:53:35 +03:00
Ruben Gonzalez 54d8c5f6a9 Delete minimum GStremer required version for some plugins
Tested building the pluging with cargo-c and running gst-inspect-1.0
in a Ubuntu Xenial 18.04 LTS. It contains GStreamer 1.8.3.
2021-07-20 21:49:24 +02:00
Mathieu Duponchelle 5397f4bfaf transcriberbin: remove leftover debug dot dumps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/531>
2021-07-15 23:24:29 +00:00
Sebastian Dröge f733f90333 closedcaption/mccenc: Fix unit test
The expected output contains the plugin version.
2021-07-09 14:14:51 +03:00
Sebastian Dröge 24ec79cd1a Update versions to 0.8.0 for the master branch 2021-07-09 13:49:33 +03:00
Sebastian Dröge 1c3ae0f89a Update versions to 0.7.0 2021-07-09 13:49:21 +03:00
SeaDve 82df25694a gifenc: Add property to configure speed
Fixes #157.
2021-07-05 11:50:41 +03:00
Mathieu Duponchelle 3cdc5870a1 transcriberbin: new high-level bin for speech to Closed Caption
This new element puts together some of the elements we've written
in recent times (awstranscriber, tttocea608, textwrap, cccombiner)
into a convenience high-level element.

The design of the element is AV in -> AV (+ CC metas) out.

The element exposes property to set and unset a "passthrough" mode,
during which the transcriber element's state is set to NULL but kept
in the bin, in order for the user to be able to set properties on
sub elements no matter what the current mode is, using the
GstChildProxy interface.

In addition, the element ensures that the latency it reports stays
fixed so that playback continues uninterrupted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/528>
2021-06-30 02:07:01 +02:00
Mathieu Duponchelle 23219c3c09 tttocea608: don't pad up to first input timestamp
When receiving data from a live upstream element, the first buffer
may have a non-0 timestamp (running time), and the element incorrectly
pushed padding buffers up to that timestamp, resulting in much confusion

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/527>
2021-06-25 23:26:30 +00:00
Mathieu Duponchelle d6f6f1a777 cea608overlay: expose "black-background" property
As stated in the spec:

> In addition, the user must have the capability to select a black
> background over which the captioned letters are displaced.

The property is MUTABLE_PLAYING
2021-06-18 09:48:44 +00:00
François Laignel 5439f14e57 fix clippy warnings 2021-06-05 10:36:22 +02:00
François Laignel e16cad7c8f video: migrate to new ClockTime design 2021-06-05 10:36:21 +02:00
François Laignel 8dfc872544 use gst::glib where applicable 2021-06-03 20:53:16 +02:00
Blaxar Waldarax e9f0a3b8ac hsv: added support for more RGB and BGR formats to hsvdetector and hsvfilter 2021-05-18 07:00:14 +00:00
Sebastian Dröge 04a60b8f46 Update repository URL for gtk-rs "core" crates 2021-05-13 09:50:08 +03:00
Sebastian Dröge f4a3881dcf Fix new 1.52 clippy warnings 2021-05-05 12:13:16 +03:00
Sebastian Dröge 3d24f1da22 closedcaption/cea608overlay: Fix compilation with cairo API changes 2021-05-04 14:31:58 +03:00
Sebastian Dröge 8bda233d02 rav1e: Fix compilation after VideoColorRange::Range0255 got renamed to VideoColorRange::Range0_255 2021-05-01 10:49:36 +03:00
Sebastian Dröge 75959e8c63 cdgdec: Remove unneeded VideoDecoderExtManual import 2021-04-26 14:58:15 +03:00
Sebastian Dröge 15cf738616 Update for Value trait refactoring 2021-04-25 15:48:55 +03:00
Mathieu Duponchelle 7923e26545 tttocea608: implement word wrapping in roll-up modes.
In roll-up modes, we open new lines when the last column is reached.
This commit implements lookahead on a word basis, in order to avoid
splitting words unless absolutely necessary (when a word won't fit
on a full row)
2021-04-20 17:53:12 +00:00
François Laignel 95cdd43f4f manual fixes remove get prefix round 2 2021-04-20 18:19:58 +02:00
François Laignel 67c5871957 fix-getters-calls 0.3.0 pass 2021-04-20 18:19:58 +02:00
François Laignel 27bc5c89ca fix-getters-def 0.3.0 pass 2021-04-20 18:19:58 +02:00
Mathieu Duponchelle 61214b5788 tttocea608: only warn when we do drop characters
In roll-up mode, we drop out of the loop and warn when the 32nd
character is reached, the warning is unnecessary when there were
no characters left to loop on.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/499>
2021-04-16 21:16:46 +02:00