Commit graph

500 commits

Author SHA1 Message Date
Sebastian Dröge
88bf03bedf Update muldiv dependency to 1.0 2020-10-13 12:56:49 +03:00
Seungha Yang
6559287bea cdg: Fix assertion failure while typefinding with too short file
thread '<unnamed>' panicked at 'assertion failed: step != 0', ...

Don't iterate with zero step size.
2020-10-04 20:44:44 +09:00
Guillaume Desmottes
fab361d32d cdg: disable default features for the image crate
We don't need JPEG, GIF, etc. support so depending on the whole
dependency chain of them is not needed and only wastes CPU time.

As a result we can remove the gif crate exception in deny.toml.
2020-09-23 10:28:55 +02:00
Guillaume Desmottes
b81c7e2fd7 cdg: update cdg_renderer 2020-09-23 10:12:44 +02:00
Sebastian Dröge
6de1ca7ed3 video/gif: Update gif dependency to 0.11 2020-09-22 14:40:07 +03:00
Matthew Waters
dc8b722f72 video/closedcaption: add a ccdetect element
Detects whether valid closed caption data is available in CC708 data.
2020-09-10 20:54:09 +10:00
Sebastian Dröge
0eb777cf5a Update for removal of ObjectImpl::get_type_data() 2020-07-26 18:46:32 +03:00
Sebastian Dröge
1730de6cea video/gif: Add description to Cargo.toml 2020-07-10 13:07:17 +03:00
Sebastian Dröge
ad34160083 video/gif: Don't set NON_DROPPABLE flag on buffers
It doesn't make sense in this context and the flag only exists since
1.12.
2020-07-10 13:07:17 +03:00
Sebastian Dröge
6061d22fad video/dav1d/rav1e: Depend on gstreamer-video 1.12 for the 12 bit formats
Can be made conditional if someone needs that.
2020-07-10 13:07:07 +03:00
Sebastian Dröge
e9b61b733d Add LICENSE files to each individual crate 2020-07-10 13:06:28 +03:00
Sebastian Dröge
bde998ce50 video/cdgdec: Box CdgInterpreter state to prevent GObject private size to become too big
Only 64k are allowed for the sum of all private instance structs in the
class hierarchy, as well as for the public instance structs.

The CdgInterpreter itself is huge and adding just another two integers
to GstVideoDecoderPrivate in libgstvideo is causing the limit to be
reached, so let's allocate it in a separate memory area.
2020-07-01 01:51:23 +03:00
Sebastian Dröge
a28455f0ce Update for Element::post_message() signature change 2020-06-30 21:28:02 +00:00
Sebastian Dröge
48c20471d5 Fix compilation after flags cleanup 2020-06-30 12:04:50 +03:00
Sebastian Dröge
d03c6cb26a Update various dependencies 2020-06-30 10:49:27 +03:00
Sebastian Dröge
f62c11f851 Update for functions returning a Builder being renamed to builder() instead of new()
And new video event APIs.
2020-06-25 19:49:07 +03:00
François Laignel
e40267e95d event,message,query: update instantiation
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/532
2020-06-25 11:26:32 +02:00
Sebastian Dröge
fc20df294e Remove a few unused dependencies 2020-06-22 16:29:13 +03:00
Sebastian Dröge
9bb3e75fb9 Update to use the new pad builders for safely setting pad functions
Only two uses of unsafely setting the pad functions is left:
- fallbacksrc for overriding the chain function of the proxy pad of a
  ghost pad
- threadshare for overriding the pad functions after creationg, which
  probably needs some fixing at some point
2020-06-22 11:28:19 +03:00
Sebastian Dröge
f4e7f127d9 flavors: Update num-rational dependency to 0.3 2020-06-18 13:07:09 +03:00
Sebastian Dröge
60321edb8c Update for new_with_XXX/new_from_XXX function renaming 2020-06-16 11:56:48 +03:00
Guillaume Desmottes
e85799b9d6 use new constructor names 2020-06-11 13:07:01 +02:00
Mathieu Duponchelle
ed4fa7fde4 tttocea608: insert preambles in roll-up mode
I thought I could spare some bandwidth by letting renderers pick
the base row, but it turns out this triggers some unwanted behaviours
with compliant renderers.

Instead, we now follow the protocol laid out in EIA/CEA-608-B,
section B.8.1

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/355>
2020-06-10 22:05:02 +02:00
Sebastian Dröge
321f418518 video: Handle Result returned by VideoMeta::add()
By simply unwrapping for now, which is still better silently having no
VideoMeta.
2020-06-08 11:08:27 +03:00
Mathieu Duponchelle
0bb626c653 closedcaption: implement cea608overlay
Useful complement to cea708overlay, that can only render native
708.

The element isn't an aggregator, and simply parses and renders
closed caption meta on its input video buffers.

No property is exposed, the rendering is done using a monospace
font, over a 32 x 15 grid with the font size fitted to fill as
much of the viewport as possible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/343>
2020-06-04 16:53:04 +02:00
Mathieu Duponchelle
f27173e2b9 tttocea608: fix pts incrementation in roll up mode
Simple operator mistake

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/351>
2020-06-03 00:51:40 +02:00
Sebastian Dröge
13d3fd1cc8 Remove now unneeded gobject_sys imports 2020-05-30 11:15:33 +03:00
Mathieu Duponchelle
83b0596242 tttocea608: add roll-up modes
In roll-up mode, the element expects input text without layout
(eg new lines), and the characters it outputs are displayed
immediately, without double-buffering as in pop-on mode.

Once the last column is reached, the element simply outputs
a carriage return and the text scrolls up, potentially splitting
words with no hyphenation.

The main advantage of this mode is its simplicity and the near-zero
latency it introduces.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/347>
2020-05-30 01:36:11 +02:00
neithanmo
d130b29146 video/png: Add PNG encoder element
It can encode raw video formats like Gray8/16, RGB and RGBA and
uses the PNG crate which is a decoding and encoding library in pure Rust
2020-05-15 08:30:32 -06:00
Sebastian Dröge
36bcd54306 closedcaption/{scc,mcc}parse: Allow an optional UTF-8 BOM at the beginning
Some software is apparently writing an UTF-8 BOM at the beinning of the
file.
2020-05-13 10:10:45 +03:00
Guillaume Desmottes
6c6917077d cdgdec: fix test with gst master
Test was relying on 'blocksize' property on the source which can
only be used in push mode.

This change in baseparse broke it:
e906197c62
so ensure we are actually in push mode by using pushfilesrc.
2020-05-01 10:29:28 +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
5a7fcfad7f Fix various new clippy warnings with clippy 1.43 2020-04-24 13:55:01 +03: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
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
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
8370fb8a11 closedcaption: Port to combine 4 2020-04-14 09:22:43 +00: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
Guillaume Desmottes
acbd3066e8 cdg: update image and cdg_renderer deps 2020-04-06 10:49:14 +02:00
Arun Raghavan
bc5d05f5e8 Update all documentation to point to the updated repository name
Just gst-plugin-rs -> gst-plugins-rs
2020-04-05 19:10:47 +00:00
Arun Raghavan
9c0416b56d Rename flv directory as flavors
Follows the same convention as all the other plugins.
2020-04-05 19:10:47 +00:00
Arun Raghavan
dc3c8fd049 Drop gst-plugin- prefix in plugin directory name 2020-04-05 19:10:47 +00:00
Arun Raghavan
205b6040fb Reorganise plugins into directories by function
This should start making navigating the tree a little easier to start
with, and we can then move to allowing building specific groups of
plugins as well.

The plugins are moved into the following hierarchy:

  audio
    / gst-plugin-audiofx
    / gst-plugin-claxon
    / gst-plugin-csound
    / gst-plugin-lewton
  generic
    / gst-plugin-file
    / gst-plugin-sodium
    / gst-plugin-threadshare
  net
    / gst-plugin-reqwest
    / gst-plugin-rusoto
  utils
    / gst-plugin-fallbackswitch
    / gst-plugin-togglerecord
  video
    / gst-plugin-cdg
    / gst-plugin-closedcaption
    / gst-plugin-dav1d
    / gst-plugin-flv
    / gst-plugin-gif
    / gst-plugin-rav1e

  gst-plugin-tutorial
  gst-plugin-version-helper
2020-04-05 19:10:46 +00:00