Commit graph

946 commits

Author SHA1 Message Date
François Laignel
c414f78248 threadshare: fix race condition in tcpclientsrc test 2020-04-28 20:47:08 +02:00
Guillaume Desmottes
ee71a4ab8a ci: update ci template
Prevent creating a second useless layer, see
https://gitlab.freedesktop.org/freedesktop/ci-templates/-/merge_requests/26

Update image tag to ensure building images is still working.
2020-04-28 16:11:18 +02:00
Guillaume Desmottes
9efe4168b7 ci: install dav1d when generating image
Save us from using the static version when building the crate.
2020-04-28 14:21:01 +02:00
Guillaume Desmottes
871f91d87f deny: fail on multiple versions
Will ensure to keep the ignore list up to date.
2020-04-28 12:16:08 +02:00
Guillaume Desmottes
c58c6bf7fd deny: remove dav1d-sys exception
dav1d 0.5.1 has just been released fixing the duplicated deps issue.
2020-04-28 11:46:41 +02:00
Guillaume Desmottes
3d1df3ca25 ci: switch from cargo-audit to cargo-deny
Fix #110
2020-04-28 10:39:50 +02:00
Guillaume Desmottes
f34673b704 ci: add update jobs
Those jobs are triggered by gstreamer-rs when their images are updated
so we can rebuild ours.

Also disable normal building jobs and unrelated tests when updating a
specific image as they are not needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/321>
2020-04-27 12:19:17 +02:00
Guillaume Desmottes
54586c6ecc ci: use fdo template
Build our own images based on the ones used by gstreamer-rs ci.

Fix #109

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/321>
2020-04-27 12:19:08 +02:00
François Laignel
957aac94ae threadshare: align some properties with their C counterparts
Some ts-elements properties don't match the name, type or default
value of the C elements counterparts.
2020-04-27 11:22:26 +02:00
François Laignel
dae38eb0a3 threadshare: benchmark: add throughput tracking 2020-04-25 23:18:20 +02:00
Sebastian Dröge
36f032ef15 Configure crate-type to cdylib/rlib consistently in Cargo.toml
And not in the source code, it's a build decision.
2020-04-24 15:02:12 +03:00
Sebastian Dröge
2019cdb8cb fallbackswitch: Clean up 1.18 aggregator compat code 2020-04-24 14:37:43 +03:00
Sebastian Dröge
a63991e325 fallbackswitch: Add fallbacksource element that automatically retries playback of an URI
This is a wrapper around uridecodebin3 and fallbackswitch that allows to
switch to a still frame on errors and automatically retries the source
in the background on errors until a given retry timeout is reached.
2020-04-24 14:12:01 +03:00
Sebastian Dröge
5a7fcfad7f Fix various new clippy warnings with clippy 1.43 2020-04-24 13:55:01 +03:00
Mathieu Duponchelle
44d4a2a832 meson: fix mistakenly checked-in csound disabling 2020-04-23 22:05:57 +02:00
Mathieu Duponchelle
510c1cf2df tttocea608: use mul_div_round
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/314>
2020-04-23 20:58:54 +02:00
Mathieu Duponchelle
5c82e6fe6c tttocea608: forward gaps from upstream
taking our own latency into account

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/314>
2020-04-23 20:10:42 +02:00
Mathieu Duponchelle
fbb2022b25 tttocea608: protect State with a simple mutex
There was no reason to use AtomicRefcell in this context,
aside from the dubious pleasure of panicing when attempting
to borrow mutably while another mutable borrow was already
held.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/314>
2020-04-23 20:10:42 +02:00
Mathieu Duponchelle
de796c95f0 tttocea608: refactor to fit more scenarios
- Report a latency:
  By design, tttocea608 will output buffers in the "past" when
  receiving an input buffer: we want the second to last buffer
  in the buffer list that we output to have the same pts as the
  input buffer, as it contains the end_of_caption control code
  which determines when the current closed caption actually gets
  displayed in pop_on mode. The previous buffers have timestamps
  decreasing as a function of the framerate, for up to potentially
  74 byte pairs (the breakdown is detailed in a comment).

  The element thus has to report a latency, at 30 frames per second
  it represents around 2.5 seconds.

- Refactor timestamping:
  Stop using a frame duration, but rather base our timestamps on
  a scaled frame index. This is to avoid rounding errors, and
  allow for exactly one byte pair per buffer if the proper framerate
  is set on the closed caption branch, and the video branch has
  perfect timestamps, eg videorate. In practice, that one byte
  pair per frame requirement should only matter for line 21 encoding,
  but we have to think about this use case too.

- Splice in erase_display_memory:
  When there is a gap between the end of a buffer and the start
  of the next one, we want to erase the display memory (this
  is unnecessary otherwise, as the end_of_caption control code
  will in effect ensure that the display is erased when the
  new caption is displayed). The previous implementation only
  supported this imperfectly, as it could cause timestamps to
  go backwards.

- Output last erase_display_memory:
  The previous implementation was missing the final
  erase_display_memory on EOS

- Output gaps

- Write more tests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/314>
2020-04-23 20:10:42 +02:00
Mathieu Duponchelle
bdfb24abbd jitterbuffer: release state lock when requesting pt map
This is similar to what the standard jitterbuffer does, and
is necessary to avoid deadlocks with the rtpbin session lock,
if the user calls onto any API that requires us to take the
state lock at the wrong time (eg setting the latency property,
clearing the pt map)
2020-04-22 12:40:23 +00:00
Sebastian Dröge
d08268627e threadshare/jitterbuffer: Use GSlice allocator for the jitter buffer items
They're actually used as a hackish intrusive list around GQueue so using
a different allocator is rather dangerous. Or rather, this is generally
dangerous and shouldn't be done but ...

Also make sure to free items manually in finalize() so that any
contained buffers can also be unreffed.
2020-04-22 14:02:44 +03:00
Guillaume Desmottes
15d863a26c ci: make clippy warnings fatal 2020-04-21 11:52:21 +02:00
Guillaume Desmottes
575d3534b1 ci: force git-fetch-with-cli
Workaround so fdo redirects actually work.
2020-04-21 11:52:21 +02:00
Mathieu Duponchelle
ea74d87510 textwrap: set PROXY_CAPS flag on pads 2020-04-17 21:53:50 +02:00
Mathieu Duponchelle
7701850586 Implement text wrapping element around the textwrap crate 2020-04-16 20:46:21 +02:00
Guillaume Desmottes
92163c46b2 flavors: remove git suffix from git dep
Not needed and will make cargo deny sources list homogeneous.
2020-04-16 14:04:21 +02:00
Guillaume Desmottes
bdb0e72cc7 fix LGPL-2.1+ license in Cargo.toml
The proper SPDX name is LGPL-2.1-or-later, see https://spdx.org/licenses/
2020-04-16 13:07:21 +02:00
Mathieu Duponchelle
2d6a220c00 Update all versions to 0.6.0 2020-04-15 20:39:50 +02:00
Mathieu Duponchelle
adfc25b123 Add update-version script 2020-04-15 20:39:31 +02:00
Mathieu Duponchelle
e10f88da50 transcribe: fix exception packet detection 2020-04-15 00:22:23 +02:00
Sebastian Dröge
f1e3212477 closedcaption: Convert bitfields to uint8_t for portability reasons
Contrary to what one might believe, this actually reduces the size of
the structs due to alignment constraints. On Linux x86-64 clang/gcc it
reduces the size of the caption_frame_t struct from 7760 bytes to 6800
bytes, on Windows x86-64 MSVC from 11600 bytes to 6800 bytes.

It also causes simpler and potentially faster assembly to be generated
as the values can be directly accessed as uint8_t instead of having to
extract the corresponding bits with bitwise operations.

It also gives us the same ABI with clang/gcc and MSVC.
2020-04-14 20:01:30 +03:00
Sebastian Dröge
70ef91fb4a closedcaption: Update bindgen generated FFI bindings to latest version 2020-04-14 19:34:57 +03:00
Sebastian Dröge
5435ea1b7c Fix/silence some clippy warnings 2020-04-14 09:22:43 +00:00
Sebastian Dröge
8370fb8a11 closedcaption: Port to combine 4 2020-04-14 09:22:43 +00:00
Guillaume Desmottes
660e325bbc ci: allow outdated job to fail
We'd like to be able to ignore some outdated deps which is not yet
possible: https://github.com/kbknapp/cargo-outdated/issues/127
2020-04-14 10:49:14 +02:00
Mathieu Duponchelle
7c79f73a4c gst-plugin-transcribe: address latest review comments 2020-04-13 17:48:36 +00:00
Mathieu Duponchelle
a31b3c5c83 gst-plugin-transcribe: address review comments 2020-04-13 17:48:36 +00:00
Mathieu Duponchelle
a2b3b70f3b gst-plugin-transcribe: implement element 2020-04-13 17:48:36 +00:00
Jordan Petridis
e7d49c45da gst-plugin-transcribe: implement parser 2020-04-13 17:48:36 +00:00
Mathieu Duponchelle
8e2b79a90c threadshare: remove hand-rolled get_current_running_time
Instead, use the new Element method exposed in
<https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/450>
2020-04-13 17:25:31 +00:00
Sebastian Dröge
5ad93604ef threadshare: Call gst::init() in all tests 2020-04-13 15:00:27 +03:00
Sebastian Dröge
3c226a05d5 closedcaption/mccparse: Refactor parser state handling a bit
To make it a bit less confusing. The name of the state previously was
what was previously parsed, not what is expected now.
2020-04-13 15:00:23 +03:00
Sebastian Dröge
163e8cf1a0 closedcaption/sccparse: Don't strictly require empty lines between each caption line
There is some broken software out there not inserting the empty lines
and we don't really need them for proper parsing. Only require an empty
line between header and the first caption line.
2020-04-13 15:00:11 +03:00
Luca BRUNO
bd90d1d9a6
audio/claxon: validate input depth info
This expands the depth input check into proper validation and resulting
enum, which can be reused by the rest of the logic.

Signed-off-by: Luca BRUNO <lucab@lucabruno.net>
2020-04-11 11:59:59 +00:00
Luca BRUNO
02935b7005
audio/claxon: remove some panic points
This remove some possible panic points due to unwrapping and
underflowing integer maths.

Signed-off-by: Luca BRUNO <lucab@lucabruno.net>
2020-04-11 10:25:39 +00:00
Guillaume Desmottes
281aad2243 ci: run 'cargo outdated' in scheduled jobs
Automatically detect if a crate we are directly using is outdated.
2020-04-10 12:18:42 +02:00
François Laignel
53194a64f3 threashare: benchmark: fix target path 2020-04-09 19:57:18 +02:00
Sebastian Dröge
ccdb704ca8 fallbackswitch: Update aggregator and aggregator bindings from gstreamer git master 2020-04-08 15:39:35 +03:00
Sebastian Dröge
577c980a6d threadshare/socket: Implement Drop on the non-refcounted inner part of the socket
We don't want to run it every time a strong reference is dropped but
only at the very end. Otherwise dropping the socket stream will cause a
panic because the socket itself is still running.
2020-04-08 15:39:35 +03:00
Sebastian Dröge
f6120fcf98 fallbackswitch: Switch from lazy_static to once_cell 2020-04-08 15:39:35 +03:00