Commit graph

140 commits

Author SHA1 Message Date
Sanchayan Maity 81437bb1c9 net/rusoto: Rename to aws
Rename all the elements to use aws prefix now but still register a
backwards compat element factory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/759>
2022-06-14 08:03:49 +00:00
Sanchayan Maity 2b0bf218b1 net/rusoto: Drop rusoto crates
Now that all elements are migrated to AWS SDK drop the rusoto
dependencies.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/759>
2022-06-14 08:03:49 +00:00
Sanchayan Maity 753425507a Migrate transcriber to aws sdk
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/759>
2022-06-14 08:03:49 +00:00
Sanchayan Maity 768fad2445 Migrate s3src and s3sink to use AWS SDK
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/759>
2022-06-14 08:03:49 +00:00
Mathieu Duponchelle ab01fc6143 onvifaggregator: refactor to support duration-less media buffers
For instance when dealing with a variable framerate media stream,
input media buffers may not hold a duration, in which case we try
to calculate one by waiting for the following buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/765>
2022-05-25 17:35:04 +00:00
Mathieu Duponchelle 77260a8442 onvifaggregator: implement proper EOS support
We could otherwise busy loop in aggregate forever when the meta
sink pad received EOS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/765>
2022-05-25 17:35:04 +00:00
Sebastian Dröge dcad6ffe34 rtponvifdepay: Set caps on the source pad
The RTP depayloader base class does not take care of this in any way and
it has to be done manually.
2022-05-13 13:34:30 +03:00
Mathieu Duponchelle 7425b31173 onvifaggregator: always push current media buffer on timeout
Even when aggregator.meta_frames is empty

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/751>
2022-05-10 14:35:50 +00:00
Sebastian Dröge 817231b4d0 hlssink3: PadTemplate::name_template() returns a &str now instead of Option<String> 2022-05-08 13:31:10 +03:00
Sebastian Dröge 92c66be943 onvifaggregator: Update for minor PadTemplate API changes
`PadTemplate::caps()` returns a reference to the caps now instead of a
new strong reference, so keeping the template in scope as long as the
caps reference is required.
2022-05-08 13:31:03 +03:00
Mathieu Duponchelle a4a5caec53 net/onvif: implement ONVIF metadata processing elements
- RTP payloader and depayloader

- Aggregator to pair per-frame metadata with media frames

- Overlay to render detected shapes
2022-05-06 11:17:04 +03:00
Sebastian Dröge 3e10efa134 rusoto: Update to crc 3 and rusoto 0.48 2022-04-26 11:22:24 +03:00
Sebastian Dröge 9e3f713aa9 Update to m3u8-rs 4.0 2022-04-14 07:41:18 +00:00
Vivia Nikolaidou b5a3a99825 m3u8-rs: Depend on version exactly 3.0.0
https://github.com/rutgersc/m3u8-rs/pull/46#issuecomment-1094867533
2022-04-11 13:22:44 +03:00
Sebastian Dröge 803e452889 Update minimum supported GStreamer version to 1.14 2022-04-07 12:41:54 +03:00
Sebastian Dröge 88edc93a8a reqwest: Don't unnecessarily borrow dereferenced values explicitly
warning: this expression borrows a value the compiler would automatically borrow
   --> net/reqwest/tests/reqwesthttpsrc.rs:126:56
    |
126 |                     async move { Ok::<_, hyper::Error>((&mut *http_func.lock().unwrap())(req)) }
    |                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*http_func.lock().unwrap())`
    |
    = note: `#[warn(clippy::needless_borrow)]` on by default
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
2022-03-24 12:50:47 +02:00
Arun Raghavan 09a697faef rusoto: s3sink: Expose property to control all timeout/retry durations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/690>
2022-03-18 16:03:11 +05:30
Arun Raghavan 94c5cbbfb8 rusoto: s3sink: Make remaining requests bounded in time
This implements a default timeout and retry duration for the remaining
S3 requests that were still able to be blocked indefinitely. There are 3
classes of operations: multipart upload creation/abort (should not take
too long), uploads (duration depends on part size), multipart upload
completion (can take several minutes according to documentation).

We currently only expose the part upload times as configurable, and hard
code the rest. If it seems sensible, we can expose the other two sets of
parameters as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/690>
2022-03-18 16:03:10 +05:30
Arun Raghavan 5fe95afe87 s3src: Consolidate stream reading into get object retries
Previously, the actual reading from the streaming body of a GetObject
request was not within the same timeout/retry path as the dispatch of
the HTTP request itself. We consolidate these two into a single async
block and create a sum type to encapsulate the rusoto and std library
error paths within that future.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/690>
2022-03-18 16:02:20 +05:30
Arun Raghavan 22bb6ec74a rusoto: s3src: Implement timeout and retries
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/690>
2022-03-18 15:17:37 +05:30
Arun Raghavan e973d41bac rusoto: s3sink, s3src: Retry on server errors
We can retry in the case of 500/503/other errors that might occur that
might be recoverable, instead of bailing.
2022-03-17 04:51:00 +00:00
Ray Tiley a3db85d869 awstranscribe - increase presisigned url duration to 5 mins from 60s
Have seen a few times where machines that are in perfect time sync with a good source the requests fail with `RequestExpired` errors.

https://docs.aws.amazon.com/transcribe/latest/dg/CommonErrors.html

While not perfect, bumping to five minutes gives more a chance that the signed requests to start streaming won't be expired.
2022-03-16 11:45:49 +00:00
Sebastian Dröge 6cf7d28481 Use SPDX license format in Cargo.toml 2022-03-14 10:23:16 +02: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
Sebastian Dröge 04648546d1 rusoto: Update async-tungstenite dependency to 0.17 2022-02-28 09:31:58 +02:00
Arun Raghavan c2aafa4f46 rusoto: s3sink: Implement timeout/retry for part uploads
Rusoto does not implement timeouts or retries for any of its HTTP
requests. This is particularly problematic for the part upload stage of
multipart uploads, as a blip in the network could cause part uploads to
freeze for a long duration and eventually bail.

To avoid this, for part uploads, we add (a) (configurable) timeouts for
each request, and (b) retries with exponential backoff, upto a
configurable duration.

It is not clear if/how we want to do this for other types of requests.
The creation of a multipart upload should be relatively quick, but the
completion of an upload might take several minutes, so there is no
one-size-fits-all configuration, necessarily.

It would likely make more sense to implement some sensible hard-coded
defaults for these other sorts of requests.
2022-02-23 13:53:39 -05: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
Rafael Caricio 5a0f7f6976
rusoto: Export AwsTranscriberResultStability enum 2022-02-06 15:11:12 +01: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 b2d0172422 Replace Foo::from_instance(foo) with foo.imp() 2022-01-17 19:36:41 +02:00
Sebastian Dröge eb8dfb28f1 hlssink3: Fix version 2022-01-16 14:15:29 +02:00
Sebastian Dröge 0dd6e303ce rusoto: Add missing license file 2022-01-16 14:15:29 +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
Rafael Caricio 9ae8f0d330 hlssink3: fix segment paths in playlist file 2021-12-09 12:38:35 +00:00
Sanchayan Maity 099a3f2114 rusoto: s3sink: Support aborting or completing multipart upload on error
A multipart upload should either be completed or aborted on error. In
the current state of things, a multipart upload would neither be
completed nor aborted, putting the onus on an external entity to take
care of finishing incomplete uploads or relying on a sane bucket
life cycle policy configured to abort incomplete multipart uploads.

An incomplete multipart upload still contributes to the storage costs as
long as it exists.

We introduce a property here to allow the user to select either aborting
or completing multipart uploads on error. Aborting the upload causes
whole of data to be discarded and the same upload ID is not usable for
uploading more parts to the same.

Completing an incomplete multipart upload can be useful in situations
like having a streamable MP4 where one might want to complete the upload
and have part of the data which was uploaded be preserved.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/618>
2021-12-07 18:29:52 +05:30
Tim-Philipp Müller febbd5c2c9 hlssink3: fix symbolic link to LICENSE file 2021-12-01 15:38:47 +00:00
Sebastian Dröge c46901d150 Fix or silence various new 1.57 clippy warnings 2021-11-30 16:31:50 +02:00
Mathieu Duponchelle 97e6a89cac aws_transcriber: sanity check alternative length
The design of the element is based on the assumption that when
receiving a partial result, the following result will contain
at least as many items as there were stable items in the previous
result.

This patch adds a sanity check to make sure our "partial index"
isn't larger than the new received result, and errors out otherwise.

partial_index will eventually be reset to 0 once we receive a
new non-partial result.
2021-11-24 13:10:00 +00:00
Guillaume Desmottes 0b348406ef s3sink: add metadata property
This property can be used to set metadata on the S3 storage object.
2021-11-22 17:03:24 +01:00
Guillaume Desmottes 11bef9066c s3sink: log when setting properties 2021-11-22 16:52:04 +01:00
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 651ea7de5f hlssink3: Minor cleanup of debug output
Pass the object instance to the debug logs too to be able to distinguish
multiple instances.
2021-11-21 18:18:56 +02:00
Sebastian Dröge c68f6b2631 Update for GLib signal emit_by_name() API changes 2021-11-21 18:15:04 +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