Commit graph

3498 commits

Author SHA1 Message Date
Guillaume Desmottes
90cb42fdf9 meson: check for openssl on not Windows/Mac platforms 2020-01-30 10:57:00 +00:00
Guillaume Desmottes
1b84dd1f6b meson: add sodium option
Allow us to pick between the built-in libsodium, use the one from the
system or disable the plugin.
2020-01-30 10:57:00 +00:00
Sebastian Dröge
a43ad8f2dd lewton: Don't copy decoded samples if no channel reordering is needed 2020-01-30 09:02:55 +00:00
Guillaume Desmottes
87f2c3b025 lewton: update to lewton 0.10
New version of the crate has just been released.
2020-01-30 13:53:36 +05:30
Sebastian Dröge
c25a3e13e3 tutorial: Port to once_cell::Lazy 2020-01-26 08:38:10 +00:00
Sebastian Dröge
1e778e9827 Update for Seqnum/GroupId API changes 2020-01-25 01:21:22 +02:00
François Laignel
e2add3f2c8 ts-jitterbuffer: add dedicated functions for state transitions + tests
fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/issues/95
2020-01-23 19:10:21 +01:00
Mathieu Duponchelle
c50aa09034 threadshare: fix latency query handlers
Returning 0 as the max latency in those sources is incorrect,
and may lead to sinks incorrectly complaining about insufficient
buffering elements.

Reproduce with:

gst-launch-1.0 ts-udpsrc port=50000 address=127.0.0.1 \
  caps="application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)PCMA, payload=(int)8" ! \
  rtppcmadepay ! alawdec ! autoaudiosink

gst-launch-1.0 audiotestsrc do-timestamp=true samplesperbuffer=400 ! \
  alawenc ! rtppcmapay max-ptime=50000000 min-ptime=50000000 ! \
  udpsink host=127.0.0.1 port=50000

Logs:

Not enough buffering available for  the processing deadline of 0:00:00.020000000,
add enough queues to buffer  0:00:00.020000000 additional data.
Shortening processing latency to 0:00:00.000000000.

This then causes glitches, there are many other ways for the problems
to manifest.
2020-01-23 15:36:22 +00:00
Mathieu Duponchelle
decc1e2029 threadshare: make live sources return NoPreroll from PlayingToPaused
Not returning NoPreroll in that transition causes downstream sinks
to wait for preroll forever.

Reproduce with:

gst-launch-1.0 audiotestsrc ! udpsink host=127.0.0.1 port=50000
gst-launch-1.0 ts-udpsrc address=127.0.0.1 port=50000 ! fakesink

ctrl + C in the receiver pipeline -> hangs forever
2020-01-23 15:56:11 +01:00
Sebastian Dröge
92941d7f92 closedcaption: Fix compilation after buffer copy flags were changed to a constant 2020-01-23 08:21:32 +02:00
François Laignel
d1cc8eaec8 ts: don't panic when operating on a Context without a valid PadContext
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/issues/94
2020-01-22 06:16:17 +00:00
Mathieu Duponchelle
0aa5b15564 jitterbuffer: return NoPreroll when going from READY to PAUSED
This is useful when upstream is not a live source

Fixes potential issue discussed in:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/issues/93#note_388528
2020-01-21 22:14:33 +01:00
Mathieu Duponchelle
1823ca525e jitterbuffer: don't try to lock in query handlers
Instead, add position and latency fields to the PadSrcHandler

Fixes #93
2020-01-21 22:14:06 +01:00
Sebastian Dröge
4d620cd737 Allow connecting to either an NDI name or URL/address again
Apparently the SDK allows both but the documentation was a bit
confusing.
2020-01-20 22:01:33 +02:00
Sebastian Dröge
8d2c025e47 Allow creating source elements from the device provider and don't do discovery during element setup anymore
While making it possible to create elements from the device provider,
this also speeds up the connection generally when starting up the
elements.

Also add the url-address property for additional filtering in addition
to the NDI name.
2020-01-20 22:01:33 +02:00
Sebastian Dröge
f2a4699d13 Add a device provider for listing available sources
Fixes https://github.com/teltek/gst-plugin-ndi/issues/36
2020-01-20 22:01:33 +02:00
Sebastian Dröge
5047ed480d claxondec: Fix/silence a few clippy warnings 2020-01-20 08:13:43 +02:00
Sebastian Dröge
1ad4e39cc9 meson: Add claxon plugin 2020-01-20 08:01:14 +02:00
Ruben Gonzalez
7d3ab342d2 Add claxon based FLAC decoder.
Audio decoder element structure is based in `gst-plugin-lewton` (a lewton based Vorbis decoder created by @slomo)

The element assumes correctly parsed input from `flacparse`.

Implementation details:

* Claxon returned frames does not contain audio channels interleaved, the reorganization of the channels is done by the element.
* Claxon output buffers are always Vec<i32>, mapping to the correct type (depending on the audio format) is also done by the element.

Mono s16 and stereo_s32 test are provided.

Complete pipelines to test are:

```
gst-launch-1.0  -v souphttpsrc location=https://archive.org/download/MLKDream/MLKDream.flac ! queue2 !  flacparse ! flacdec ! audioconvert ! autoaudiosink
gst-launch-1.0  -v audiotestsrc ! audio/x-raw, format=S16LE, layout=interleaved, rate=44100, channels=1 ! audioconvert ! flacenc ! flacparse ! claxondec ! autoaudiosink
```

Fixes #71
2020-01-19 16:01:23 +00:00
Sebastian Dröge
b84831c94f reqwesthttpsrc: Switch back to hyperx
It was updated to the new versions of its dependencies and provides
typed header types for more of the headers that we're using.
2020-01-18 10:51:25 +00:00
François Laignel
676ae87aed ts: queue & proxy: spawn on src_pad in PadSinkHandlers...
... instead of copying the src_pad's Context
2020-01-17 15:37:54 +01:00
Guillaume Desmottes
d98e76529d meson: build tests, bins and examples
Best to build as much as possible so we can detect build breakage
earlier and we won't have to build tests when running them.
2020-01-16 14:03:39 +05:30
François Laignel
7a4fea8669 ts-udpsrc: prepare socket immediately
Now that we can `Context::enter`, it is no longer necessary to spawn
a `Future` to prepare the `UdpSocket` and beneficiate from the
`Context`'s IO driver.
2020-01-16 00:44:48 +01:00
François Laignel
a15d60105b ts: fix FlushStart / FlushStop events handling 2020-01-16 00:44:45 +01:00
François Laignel
3eed2f69d9 ts: have block_on panic if running on a Context thread 2020-01-16 00:18:16 +01:00
Guillaume Desmottes
a6adc81eb4 tutorial: use GEnum derive 2020-01-13 09:31:05 +05:30
Sebastian Dröge
afc301de3a Port to NDI SDK v4
Most notably this allows the video line stride to be set to 0, in which
case a default value is to be used, and it deprecates selecting NDI
sources by their IP address and because of that we remove the relevant
properties.

Usually the SDK will give an URL instead of an IP address now, so usage
would've been broken anyway.
2020-01-10 12:29:24 +02:00
Guillaume Desmottes
ce004a5bac cdgdec: reset the interpreter when stopping
Fully reset the interpreter state as if we decode later it will be
another file.
2020-01-10 10:49:44 +05:30
Guillaume Desmottes
119afdde2a cdg: cdgdec: reset interpreter when flushing
Prevent visual artifacts from the previous position when seeking to a
not keyframe.

Dumping cdg_renderer version as we need the new reset API.
2020-01-09 17:16:03 +05:30
Guillaume Desmottes
28e3e3199c meson: add test wrapper
Allow us to run the tests using 'meson test'.

Needed for https://gitlab.freedesktop.org/gstreamer/gst-ci/issues/46
2020-01-07 14:19:13 +05:30
Guillaume Desmottes
accd10dfea meson: add 'command' argument to cargo wrapper
Will be used to add test support.
2020-01-07 14:06:14 +05:30
Tobias Morell
aa40eae581 tutorial: Add enum property to control output on progress bin
Fixes #84
2020-01-06 11:22:40 +02:00
Guillaume Desmottes
e73e27cda4 ci: include gst-ci
- Use gst-ci's stages instead of our own
- Override GIT_STRATEGY for Rust only builds as gst-ci relies on
  gst-build subprojects by default.

First step merging our Rust CI with gst-ci. Once this is merged we'll
enable Rust in gst-ci builds and so will guard gst-plugins-rs MR against
breaking gst-build.
2020-01-03 14:35:49 +05:30
Guillaume Desmottes
13d4029f70 meson: add dav1d option
Allow to ensure that the plugin is actually build.
2020-01-03 09:46:29 +05:30
Guillaume Desmottes
46dda60db9 meson: don't pass empty --exclude when building all plugins
''.split(',') returns [''] and not [].
2020-01-03 09:41:41 +05:30
Guillaume Desmottes
e158f4ef88 meson: rename cargo.py to cargo_wrapper.py
Fix 'cargo build' on Windows as its $PATH includes $PWD, it seems to
pick our script rather than the actual cargo.
2020-01-03 09:35:10 +05:30
Mathieu Duponchelle
e2a2a17f09 fallbackswitch: disable extra warnings for aggregator build 2020-01-02 15:07:10 +00:00
Sebastian Dröge
9cade5bbe0 closedcaption: Put framerates into the src pad template caps of sccparse/mccparse
We're always providing a framerate on the output and without this it's
not possible to link the parsers to ccconvert while having it convert to
CEA708 CDP.
2020-01-02 16:44:38 +02:00
Sebastian Dröge
05b807aff0 Fix some minor clippy warnings 2020-01-02 13:06:53 +02:00
Guillaume Desmottes
cbb1912e99 meson: check for dav1d dep
Needed to build dav1d-sys which is required by the dav1d decoder plugin.

Exclude the plugin if the dep isn't found, preventing the build to fail.
2020-01-02 08:19:55 +00:00
Guillaume Desmottes
db8b2ad08b threadshare: fix coding style
Just ran 'gst-indent'.
2020-01-02 11:49:39 +05:30
Guillaume Desmottes
9b33c3627d fallbackswitch: fix coding style
Just ran 'gst-indent'.
2020-01-02 11:49:13 +05:30
Sebastian Dröge
6d2ab03f56 reqwesthttpsrc: Simplify code to block on futures 2019-12-31 14:19:04 +02:00
Sebastian Dröge
b1e85c7fa0 reqwest: Update tests to hyper 0.13 2019-12-31 12:20:14 +02:00
Sebastian Dröge
672cb730a8 reqwest: Update to reqwest 0.10 / tokio 0.2 2019-12-31 11:49:09 +02:00
Philippe Normand
9d659fbd00 ci: Add dav1d build support 2019-12-24 15:10:58 +01:00
Philippe Normand
84c40b872d dav1d: Add dav1ddec element
This element uses the Dav1d AV1 decoder library to decode AV1 video.
2019-12-24 15:10:58 +01:00
Guillaume Desmottes
317679fec3 meson: add gstreamer-rs deps
Fix race when building from gst-build as we need to be sure that all
these deps have been built before starting building gst-plugins-rs which
will build gstreamer-rs.
2019-12-24 13:58:56 +05:30
Alfonso Rodríguez Pereira
edcb10820d
Merge pull request #45 from sdroege/update-to-gstreamer-0.15
Update to gstreamer 0.15 and byte-slice-cast 0.3
2019-12-23 16:24:30 +01:00
Sebastian Dröge
e877da0ba3 rav1e: Update for VideoEncoder::set_format() API changes 2019-12-23 13:31:24 +02:00