Commit graph

2977 commits

Author SHA1 Message Date
Sebastian Dröge
c483270f27 Never return gst::FlowError::CustomError outside the element
It's for internal-usage and must be converted to a normal error at the
boundary to the base classes.
2019-07-09 19:29:45 +03:00
Sebastian Dröge
b41d5839d4 Always free video frames with NDIlib_recv_free_video_v2() after last use
And not potentially before or not at all.
2019-07-09 19:27:55 +03:00
Sebastian Dröge
7b8070c55d Use slice::from_raw_parts instead of Vec::from_raw_parts
The latter must only be called on memory that was allocated by Rust for
a Vec and will cause crashes depending on the platform otherwise.

Also it would free the memory as if a Vec was allocated, which would
free memory that we don't own to begin with.
2019-07-09 19:27:55 +03:00
Sebastian Dröge
bd1f8cb7d1 Use NDIlib_find_wait_for_sources() instead of thread::sleep() 2019-07-09 19:27:14 +03:00
Sebastian Dröge
38e39d181e Use correct library name for linking on Windows 2019-07-09 19:26:18 +03:00
Sebastian Dröge
3acd848b5f Use gst-plugin-version-helper crate to populate the plugin metadata 2019-07-09 18:35:47 +03:00
Sebastian Dröge
8b4f0f91a9 version-helper: Take CARGO_MANIFEST_DIR at runtime, not at compile-time
Otherwise we'll always look at the directory of the version-helper crate
instead of the crate that is actually compiled.
2019-07-07 13:36:48 +03:00
Sebastian Dröge
d0e5868880 version-helper: Add documentation 2019-07-07 13:36:48 +03:00
Sebastian Dröge
107183ad57 version-helper: Don't build the toml crate with all default features
We don't need to build serde, etc for our uses and it increases build
times quite a bit.
2019-07-07 13:36:48 +03:00
Sebastian Dröge
7ab4aff180 version-helper: Get ready for a release on crates.io 2019-07-07 13:36:48 +03:00
Sebastian Dröge
50730574ba version-helper: Check first for a git repository in the manifest dir and only then one directory up
This allows using the crate also in git repositories that contain a
single GStreamer plugin and not only in Cargo workspaces.
2019-07-07 13:36:48 +03:00
Sebastian Dröge
7e93c20b38 version-helper: Extract release version for plugins from a release.txt if there is no git repository
This will allow us packaging the plugins in a tarball and generate
proper plugin metadata.
2019-07-07 13:36:48 +03:00
Sebastian Dröge
924b89a880 closedcaption: Update version number in mcc_enc test 2019-07-07 13:36:25 +03:00
Sebastian Dröge
acc4b6a7e2 Update versions to 0.6.0 2019-07-07 13:20:15 +03:00
Sebastian Dröge
91adc3c416 Clean up Makefile some more
Use $(DESTDIR) as prefix for the installation to make distros' lifes
easier and have a simple "all" / "build" / "install" rule. By default we
do a release build, if DEBUG=1 is specified we do a debug build.
2019-07-06 10:32:22 +03:00
ahamedsajeer.15
ce1ed81922 reqwesthttpsrc: Report correct error messages based on HTTP error status codes
404 is mapped to ResourceError::NotFound
401,402,403,407 are mapped to ResourceError::NotAuthorized
other error status codes are mapped to ResourceError::OpenRead
This mirrors the behavior in souphttpsrc
2019-07-05 18:54:10 +05:30
ahamedsajeer.15
e20a1ce947 reqwesthttpsrc: test for 404 error 2019-07-05 08:58:19 +05:30
Sebastian Dröge
b4efa42d8f Fix various clippy warnings 2019-07-04 18:56:33 +03:00
Sebastian Dröge
63a840e0e7 Bring gitlab CI in sync with gstreamer-rs and add clippy task
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/issues/58
2019-07-04 18:21:29 +03:00
Sebastian Dröge
0a008354a4 reqwesthttpsrc: Drop the receiver before stopping the element
Otherwise there might still some thread waiting for the receiver to
consume a message and we would deadlock here. Dropping the receiver
drops all messages and unblocks them all immediately.

Also don't panic when sending messages to a dropped receiver.
2019-07-04 18:13:36 +03:00
Sebastian Dröge
2df6a5e049 sodium: Statically register the plugin in the example
So that it's not needed to set up GST_PLUGIN_PATH accordingly or install
the plugin first before running the examples.
2019-07-04 14:59:29 +03:00
Sebastian Dröge
e8d6a7cbd4 sodiumdecrypter: Fix some typos 2019-07-04 14:58:52 +03:00
Sebastian Dröge
b1061fe90a sodiumdecrypter: Ensure to pull enough data from upstream if not starting on a chunk boundary
We round down to the previous chunk boundary, but then we also have to
add the difference between the offset of that chunk to the requested
offset to the size of the buffer that is pulled from upstream. Otherwise
there will be an unneeded short read, which could cause downstream to
EOS too early.
2019-07-04 14:57:23 +03:00
Sebastian Dröge
d6f169866a togglerecord: Minor code cleanup 2019-07-03 18:44:25 +03:00
Sebastian Dröge
ecbf7097de togglerecord: Don't hold any mutexes while adding/removing pads
Otherwise something might easily deadlock if the application is doing
something from the pad-added/pad-removed signals.
2019-07-03 18:43:58 +03:00
Sebastian Dröge
11bd909bf1 Update rand to 0.7 and rusoto to 0.40 2019-07-02 18:16:23 +03:00
Sebastian Dröge
1f2d549a1e togglerecord: Register plugin as a static plugin in the example
Instead of doing complicated things with the plugin path and the
registry.
2019-07-02 10:51:54 +00:00
Sebastian Dröge
833b16def6 Update element/typefind factory ranks
The only None ranks now are:
- cdgdec/cdgparse: Primary
- rav1enc: Primary
- reqwesthttpsrc: Marginal
- s3sink/s3src: Primary
- mccenc/mccparse: Primary
- sccenc/sccparse: Primary

All other ranks are set to None until the elements are ready to replace
the existing C elements, or are otherwise production-ready and of a
element kind that should be autoplugged in one way or another.

For example the sodium elements are production-ready but can't be
autoplugged and as such should stay at a None rank.
2019-07-02 13:14:06 +03:00
Sebastian Dröge
d6a28ead84 Update Makefile with a release target, and an install and install-release target 2019-07-02 12:50:24 +03:00
Sebastian Dröge
6936ce11a7 reqwesthttpsrc: Add a basic unit test and a custom test harness 2019-07-01 02:03:20 +03:00
Alfonso Rodríguez Pereira
def42b5514
Merge pull request #26 from teltek/feature_gst_v0.14.0
Update to the new version of the GStreamer Rust bindings, 0.14.0
2019-06-27 13:10:10 +02:00
Marcin Kolny
aff2b8ffc5 Add plugin to stream data to AWS S3 bucket 2019-06-26 16:34:56 +01:00
ahamedsajeer.15
42d4d10b43 rshttpsrc: rename to reqwesthttpsrc 2019-06-26 18:28:12 +05:30
ahamedsajeer.15
7679becc66 rshttpsrc: Making recieving async/cancellable 2019-06-26 18:28:12 +05:30
rubenrua
28265f1151 Update to the new version of the GStreamer Rust bindings, 0.14.0
https://gstreamer.freedesktop.org/news/#2019-06-24T20:00:00Z
2019-06-25 18:20:50 +02:00
Sebastian Dröge
7948b266c5 cdg: ... ranges (inclusive) are deprecated in favour of ...= 2019-06-24 21:35:30 +03:00
Sebastian Dröge
294a888978 Update git2 dependency to 0.9 2019-06-24 21:22:35 +03:00
Sebastian Dröge
4c08971486 rav1enc: Update for API changes
Everything was moved into individual modules instead of exporting it all
from the top-level.
2019-06-14 09:12:28 +03:00
Mathieu Duponchelle
99aca7469e rav1e: fix building after API break in rav1e
7791bb185b
renamed Packet::number to Packet::input_frameno
2019-06-13 00:52:44 +02:00
Guillaume Desmottes
4327ad84e9 cdgparse: fix bytes to time None conversion
Use to crash when unwrapping.
2019-06-08 12:21:26 +05:30
Guillaume Desmottes
9af2823f58 cdgparse: fix time to bytes None conversion
Time(None) should be converted to Bytes(None).

Fix seeking with stop=-1
2019-06-07 16:57:30 +05:30
Guillaume Desmottes
288908edc0 cdg: implement typefind 2019-06-06 18:35:49 +05:30
Sebastian Dröge
50037325ff Explicitly add dyn keyword to trait objects
Trait objects without are deprecated with the latest nightly and this
makes it more clear that we're doing dynamic dispatch anyway.
2019-06-06 09:26:02 +03:00
Guillaume Desmottes
d12950a434 cdg: set rank of parser and decoder to Primary 2019-06-04 14:35:10 +05:30
Guillaume Desmottes
53e530f7db port all plugins to new register API
Rank is now an enum rather than a u32
2019-06-04 14:35:10 +05:30
Sebastian Dröge
ea14f36a0d Update for the TryInto/TryFrom gstreamer API changes 2019-06-03 19:47:26 +03:00
Guillaume Desmottes
4eac148045 cdgdec: remove parsing code
Now rely on cdgparse to do the parsing.
2019-06-03 17:39:32 +05:30
Guillaume Desmottes
0a9536046b cdg: add cdgparse 2019-06-03 17:39:32 +05:30
Guillaume Desmottes
79cef6cbf7 cdg: factor out constants module 2019-06-03 17:39:32 +05:30
ahamedsajeer.15
dc45b7f8ac Add build.rs that provides a version number, release date and other details 2019-06-03 11:11:29 +00:00