mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-09-27 14:30:27 +00:00
Compare commits
186 commits
Author | SHA1 | Date | |
---|---|---|---|
|
d8db1f502d | ||
|
6393572b37 | ||
|
8fe0388010 | ||
|
7c5bc496b1 | ||
|
1526bfc399 | ||
|
3525b5c625 | ||
|
584dff7961 | ||
|
acff5a9394 | ||
|
369e555e13 | ||
|
12bb9afd81 | ||
|
adb113a591 | ||
|
83a2c52f32 | ||
|
e7f70cc228 | ||
|
a291a2f098 | ||
|
72c53e8c55 | ||
|
4f78e7b92e | ||
|
88313fd2a5 | ||
|
698db4b13e | ||
|
bbc775b8dc | ||
|
c5ce52852b | ||
|
8f19a01fdd | ||
|
0c3def8b9e | ||
|
50a979d772 | ||
|
ce21db5171 | ||
|
3e31c12d0f | ||
|
16a1a6d4c5 | ||
|
870f7fd89b | ||
|
87dac3001a | ||
|
69d4ecc3be | ||
|
51173cfdc8 | ||
|
12f1f5b097 | ||
|
d3cda3dd3a | ||
|
f4324fd30e | ||
|
ab8525451a | ||
|
1e6fb1c1a4 | ||
|
ca54e26edc | ||
|
b0a3939267 | ||
|
7829a07629 | ||
|
12ca3808a0 | ||
|
927c3e9bdf | ||
|
f3ae457cfa | ||
|
dbd8946608 | ||
|
719455815f | ||
|
638ffc3c7c | ||
|
0998f9a303 | ||
|
06c5d8766d | ||
|
aa799bc26c | ||
|
bea00c7413 | ||
|
47a213b322 | ||
|
d0d97bfc03 | ||
|
361152d884 | ||
|
1edf4a144e | ||
|
5bbd7002a7 | ||
|
14168930cd | ||
|
52b30a37ed | ||
|
7e9cb37892 | ||
|
febc28863e | ||
|
245990a078 | ||
|
c9d2ba306b | ||
|
ea202411f9 | ||
|
18773a9df1 | ||
|
e8e247d1ed | ||
|
70f92ddbf7 | ||
|
da51c3a58b | ||
|
2bb0a666a8 | ||
|
77f003f699 | ||
|
b8b718fe62 | ||
|
b72a0a2177 | ||
|
e4702d1378 | ||
|
c1d6094bc4 | ||
|
0e447a9316 | ||
|
1dc96548c4 | ||
|
403ac0c188 | ||
|
48cc8570e4 | ||
|
19ffa05bb4 | ||
|
2b7f87b0b7 | ||
|
573307b32e | ||
|
d750e801bc | ||
|
6e40c73a95 | ||
|
fb0aca9586 | ||
|
41ea793fd8 | ||
|
fbd6c89612 | ||
|
9dc92da832 | ||
|
91fe56468a | ||
|
2b6a908911 | ||
|
0e6b9df932 | ||
|
2cb1fd7fc1 | ||
|
b27d4c2550 | ||
|
96f355ba96 | ||
|
7a0f6272ce | ||
|
d7ec86defe | ||
|
a29769789f | ||
|
1db07fe451 | ||
|
0c83f82b7f | ||
|
1daac1e301 | ||
|
60e89fd46d | ||
|
5c580709ee | ||
|
b98aa4e17c | ||
|
a76330e76c | ||
|
1f26b9e336 | ||
|
33be56bd26 | ||
|
7726008d52 | ||
|
8a72ec563e | ||
|
701f53b9fe | ||
|
d2db786136 | ||
|
88548f41b6 | ||
|
fdd9b3f638 | ||
|
48ffd4eb49 | ||
|
df471188dc | ||
|
0d8a5245b0 | ||
|
2e2ec4efdc | ||
|
198477e63b | ||
|
b2a0591676 | ||
|
329956de87 | ||
|
edc366f612 | ||
|
525e3afe70 | ||
|
6f63abe653 | ||
|
5bb65d3e33 | ||
|
f15fd82f83 | ||
|
73dc6a8ef9 | ||
|
ff85d27944 | ||
|
97bcab5da0 | ||
|
82bc045aba | ||
|
3b27132bca | ||
|
0ba8d8b856 | ||
|
3cdaa881db | ||
|
67de191be2 | ||
|
70ed344348 | ||
|
e2c64d667d | ||
|
18c1587399 | ||
|
2b118c867f | ||
|
444146249f | ||
|
6b53562495 | ||
|
9fab2744ab | ||
|
751a4c7597 | ||
|
821cccdb16 | ||
|
1015439b01 | ||
|
3c650a9544 | ||
|
76739f23c5 | ||
|
fb79f30393 | ||
|
8c7fbdfb19 | ||
|
8eb5d9a441 | ||
|
5f3515232a | ||
|
48d908afc0 | ||
|
8eaa0c6ed1 | ||
|
adfa99946e | ||
|
3a394e0118 | ||
|
9a3f86f497 | ||
|
09a9877f40 | ||
|
ffd70356c1 | ||
|
4e4d226b71 | ||
|
b903503a01 | ||
|
20b18c23e6 | ||
|
160033cb5b | ||
|
3dde725560 | ||
|
1113e0aa51 | ||
|
9b33184018 | ||
|
528f46a510 | ||
|
8b8f10691c | ||
|
6936bf65c4 | ||
|
b3cb41eae3 | ||
|
84bae8b9cf | ||
|
eb296a0e63 | ||
|
b64da48508 | ||
|
37877efc90 | ||
|
f22b3420b6 | ||
|
b17348b08d | ||
|
bf0a23d560 | ||
|
384a9d05f0 | ||
|
eda0d9abe1 | ||
|
3c4d22bc5c | ||
|
56a25af929 | ||
|
54adcb8482 | ||
|
46d7c177c2 | ||
|
2fc2357306 | ||
|
9cd68ffb5f | ||
|
73a5703eeb | ||
|
7d7f73768b | ||
|
510cda303a | ||
|
d2cd2ef5ac | ||
|
a505dba3a2 | ||
|
a4d5a35403 | ||
|
8a6895a73e | ||
|
f3c1a91fb9 | ||
|
6df679d69f | ||
|
85bf8d6c63 |
185 changed files with 23873 additions and 1768 deletions
|
@ -1,4 +1,4 @@
|
|||
.templates_sha: &templates_sha 567700e483aabed992d0a4fea84994a0472deff6
|
||||
.templates_sha: &templates_sha fddab8aa63e89a8e65214f59860d9c0f030360c9
|
||||
|
||||
include:
|
||||
- project: 'freedesktop/ci-templates'
|
||||
|
@ -6,7 +6,7 @@ include:
|
|||
file: '/templates/debian.yml'
|
||||
|
||||
- project: 'gstreamer/gstreamer-rs'
|
||||
ref: main
|
||||
ref: '0.20'
|
||||
file: '/ci/images_template.yml'
|
||||
|
||||
- project: 'gstreamer/gstreamer'
|
||||
|
@ -66,37 +66,30 @@ trigger:
|
|||
when: 'manual'
|
||||
allow_failure: false
|
||||
|
||||
.debian:11:
|
||||
.debian:12:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: 'bullseye-slim'
|
||||
FDO_DISTRIBUTION_VERSION: 'bookworm-slim'
|
||||
before_script:
|
||||
- source ./ci/env.sh
|
||||
- mkdir .cargo && echo -e "[net]\ngit-fetch-with-cli = true" > .cargo/config
|
||||
# If cargo exists assume we probably will want to update
|
||||
# the lockfile
|
||||
- |
|
||||
if command -v cargo; then
|
||||
cargo generate-lockfile
|
||||
cargo update
|
||||
fi
|
||||
|
||||
.debian:11-stable:
|
||||
extends: .debian:11
|
||||
.debian:12-stable:
|
||||
extends: .debian:12
|
||||
variables:
|
||||
FDO_DISTRIBUTION_TAG: '$GST_RS_STABLE-${GST_RS_IMG_TAG}_2022-11-05.0'
|
||||
FDO_BASE_IMAGE: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/bullseye-slim:$GST_RS_STABLE-$GST_RS_IMG_TAG"
|
||||
FDO_DISTRIBUTION_TAG: '$GST_RS_STABLE-${GST_RS_IMG_TAG}_2023-02-20.0'
|
||||
FDO_BASE_IMAGE: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/bookworm-slim:$GST_RS_STABLE-$GST_RS_IMG_TAG"
|
||||
|
||||
.debian:11-msrv:
|
||||
extends: .debian:11
|
||||
.debian:12-msrv:
|
||||
extends: .debian:12
|
||||
variables:
|
||||
FDO_DISTRIBUTION_TAG: '$GST_RS_MSRV-${GST_RS_IMG_TAG}_2022-11-05.0'
|
||||
FDO_BASE_IMAGE: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/bullseye-slim:$GST_RS_MSRV-$GST_RS_IMG_TAG"
|
||||
FDO_DISTRIBUTION_TAG: '$GST_RS_MSRV-${GST_RS_IMG_TAG}_2023-02-20.0'
|
||||
FDO_BASE_IMAGE: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/bookworm-slim:$GST_RS_MSRV-$GST_RS_IMG_TAG"
|
||||
|
||||
.debian:11-nightly:
|
||||
extends: .debian:11
|
||||
.debian:12-nightly:
|
||||
extends: .debian:12
|
||||
variables:
|
||||
FDO_DISTRIBUTION_TAG: 'nightly-${GST_RS_IMG_TAG}_2022-11-05.0'
|
||||
FDO_BASE_IMAGE: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/bullseye-slim:nightly-$GST_RS_IMG_TAG"
|
||||
FDO_DISTRIBUTION_TAG: 'nightly-${GST_RS_IMG_TAG}_2023-02-20.0'
|
||||
FDO_BASE_IMAGE: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/bookworm-slim:nightly-$GST_RS_IMG_TAG"
|
||||
|
||||
.build-debian-container:
|
||||
extends:
|
||||
|
@ -108,7 +101,7 @@ trigger:
|
|||
bash ci/install-dav1d.sh &&
|
||||
apt clean &&
|
||||
bash ./ci/install-rust-ext.sh &&
|
||||
pip install tomli
|
||||
pip install tomli --break-system-packages
|
||||
needs:
|
||||
- "trigger"
|
||||
rules:
|
||||
|
@ -117,17 +110,17 @@ trigger:
|
|||
build-stable:
|
||||
extends:
|
||||
- .build-debian-container
|
||||
- .debian:11-stable
|
||||
- .debian:12-stable
|
||||
|
||||
build-msrv:
|
||||
extends:
|
||||
- .build-debian-container
|
||||
- .debian:11-msrv
|
||||
- .debian:12-msrv
|
||||
|
||||
build-nightly:
|
||||
extends:
|
||||
- .build-debian-container
|
||||
- .debian:11-nightly
|
||||
- .debian:12-nightly
|
||||
|
||||
# Those jobs are triggered by gstreamer-rs when updating its images
|
||||
update-stable:
|
||||
|
@ -162,7 +155,7 @@ update-nightly:
|
|||
.img-stable:
|
||||
extends:
|
||||
- .dist-debian-container
|
||||
- .debian:11-stable
|
||||
- .debian:12-stable
|
||||
needs:
|
||||
- job: 'build-stable'
|
||||
optional: true
|
||||
|
@ -172,7 +165,7 @@ update-nightly:
|
|||
.img-msrv:
|
||||
extends:
|
||||
- .dist-debian-container
|
||||
- .debian:11-msrv
|
||||
- .debian:12-msrv
|
||||
needs:
|
||||
- job: 'build-msrv'
|
||||
optional: true
|
||||
|
@ -182,7 +175,7 @@ update-nightly:
|
|||
.img-nightly:
|
||||
extends:
|
||||
- .dist-debian-container
|
||||
- .debian:11-nightly
|
||||
- .debian:12-nightly
|
||||
needs:
|
||||
- job: 'build-nightly'
|
||||
optional: true
|
||||
|
@ -275,7 +268,6 @@ documentation:
|
|||
variables:
|
||||
MESON_ARGS: >
|
||||
-Ddoc=enabled
|
||||
-Domx=disabled
|
||||
-Dpython=disabled
|
||||
-Dlibav=disabled
|
||||
-Dlibnice=disabled
|
||||
|
|
228
CHANGELOG.md
Normal file
228
CHANGELOG.md
Normal file
|
@ -0,0 +1,228 @@
|
|||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html),
|
||||
specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field).
|
||||
|
||||
## [0.10.11] - 2023-07-20
|
||||
### Fixed
|
||||
- fallbackswitch: Fix pad health calculation and notifies.
|
||||
- fallbackswitch: Change the threshold for trailing buffers.
|
||||
- webrtcsink: Fix pipeline when input caps contain a max-framerate field.
|
||||
- webrtcsink: Set VP8/VP9 payloader properties based on payloader element
|
||||
factory name.
|
||||
- webrtcsink: Set config-interval=-1 and aggregate-mode=zero-latency for
|
||||
H264/5 payloaders.
|
||||
- webrtcsink: Translate force-keyunit events to custom force-IDR API of NVIDIA
|
||||
encoders.
|
||||
- webrtcsink: Configure only 4 threads instead of 12 for x264enc for Chrome
|
||||
compatibility.
|
||||
- fmp4mux: Fix draining in chunk mode if keyframes are after the desired
|
||||
fragment end.
|
||||
|
||||
## [0.10.10] - 2023-07-05
|
||||
### Fixed
|
||||
- livesync: Improve EOS handling to be in sync with `queue`'s behaviour.
|
||||
- livesync: Wait for the end timestamp of the previous buffer before looking
|
||||
at queue to actually make use of the available latency.
|
||||
- webrtcsink: Avoid panic on unprepare from an async tokio context.
|
||||
- webrtc/signalling: Fix race condition in message ordering.
|
||||
- webrtcsink: Use the correct property types when configuring `nvvideoconvert`.
|
||||
- videofx: Minimize dependencies of the image crate.
|
||||
- togglerecord: Fix segment clipping to actually work as intended.
|
||||
|
||||
### Added
|
||||
- gtk4paintablesink: Support for WGL/EGL on Windows.
|
||||
- gtk4paintablesink: Add Python example application to the repository.
|
||||
|
||||
## [0.10.9] - 2023-06-19
|
||||
### Fixed
|
||||
- mp4mux/fmp4mux: Fix byte order in Opus extension box.
|
||||
- webrtcsrc: Add twcc extension to the codec-preferences when present.
|
||||
- webrtcsink: Don't try using cudaconvert if it is not present.
|
||||
- mccparse: Don't offset the first timecode to a zero PTS.
|
||||
- Correctly use MPL as license specifier instead of MPL-2 for plugins that
|
||||
compile with GStreamer < 1.20.
|
||||
|
||||
### Added
|
||||
- fallbackswitch: Add `stop-on-eos` property.
|
||||
|
||||
## [0.10.8] - 2023-06-07
|
||||
### Fixed
|
||||
- fmp4mux: Use updated start PTS when checking if a stream is filled instead
|
||||
of a stale one.
|
||||
- fmp4mux: Fix various issues with stream gaps, especially in the beginning.
|
||||
- fmp4mux: Fix waiting in live pipelines.
|
||||
- uriplaylistbin: Prevent deadlocks during property notifications.
|
||||
- webrtcsink: Fix panics during `twcc-stats` callback and related issues.
|
||||
- awstranscriber: Handle stream disconts correctly.
|
||||
- roundedcorners: Fix caps negotiation to not use I420 if a border radius is
|
||||
configured.
|
||||
- whipsink: Use the correct pad template to request pads from the internal
|
||||
webrtcbin.
|
||||
- fallbacksrc: Don't apply fallback audio caps to the main stream.
|
||||
- webrtcsrc: Fix caps handling during transceiver creation.
|
||||
|
||||
### Changed
|
||||
- rtpgccbwe: Improve packet handling.
|
||||
|
||||
## [0.10.7] - 2023-05-09
|
||||
### Fixed
|
||||
- ffv1dec: Drop rank until the implementation is feature-complete.
|
||||
- spotifyaudiosrc: Check cached credentials before use and fix usage of
|
||||
credentials cache.
|
||||
- tttocea608: Specify raw CEA608 field.
|
||||
- gtk4paintablesink: Fix compilation on non-Linux UNIX systems.
|
||||
- webrtcsrc: Don't set stun-server to the empty string if none was set.
|
||||
- webrtcsink: Abort statistics collection before stopping the signaller.
|
||||
- rtpgccbwe: Don't process empty lists.
|
||||
|
||||
### Changed
|
||||
- ndi: Update to libloading 0.8.
|
||||
- aws: Update to AWS SDK 0.55/0.27.
|
||||
- webrtcsink: Order pads by serial number.
|
||||
- Update to async-tungstenite 0.22.
|
||||
|
||||
### Added
|
||||
- webrtcsink/webrtcsrc: Add `request-encoded-filter` signal to add support for
|
||||
inserting custom filters between encoder/payloader or depayloader/decoder.
|
||||
This allows interacting with the "insertable streams" API from Chrome.
|
||||
|
||||
## [0.10.6] - 2023-04-06
|
||||
### Fixed
|
||||
- webrtcsink: Fix max/min-bitrate property blurb/nick.
|
||||
- uriplaylistbin: Add missing queues to example.
|
||||
- tttocea608: Fix pushing of caps events that sometimes contained unfixed caps.
|
||||
- tttocea608: Fix disappearing text after special character in non-popon mode.
|
||||
- transcriberbin: Fix deadlock on construction.
|
||||
- transcriberbin: Fix initial bin setup.
|
||||
- fallbacksrc: Handle incompatible downstream caps without panicking.
|
||||
- ndisrc: Fix copying of raw video frames with different NDI/GStreamer strides.
|
||||
- livesync: Correctly assume zero upstream latency if latency query fails.
|
||||
|
||||
### Added
|
||||
- webrtcsink: Add `ice-transport-policy` property that proxies the same
|
||||
`webrtcbin` property.
|
||||
|
||||
## [0.10.5] - 2023-03-19
|
||||
### Fixed
|
||||
- gtk4: Fix build with OpenGL support on macOS.
|
||||
- threadshare: Fix symbol conflicts when statically linking the plugin.
|
||||
|
||||
## [0.10.4] - 2023-03-14
|
||||
### Fixed
|
||||
- fmp4mux: Return a running time from `AggregatorImpl::next_time()` to fix
|
||||
waiting in live pipelines.
|
||||
- fmp4mux: Fix `hls_live` example to set properties on the right element.
|
||||
- uriplaylistbin: Reset element when switching back to `NULL` state.
|
||||
- livesync: Handle variable framerates correctly in fallback buffer duration
|
||||
calculation.
|
||||
- meson: Fix GStreamer version feature detection.
|
||||
|
||||
### Added
|
||||
- webrtc: New `webrtc` element.
|
||||
|
||||
## [0.10.3] - 2023-03-02
|
||||
### Added
|
||||
- tracers: `queue_levels` tracer now also supports printing the `appsrc` levels.
|
||||
- webrtc: `webrtcsink` can use `nvvidconv` if `nvvideoconvert` does not exist
|
||||
on an NVIDIA platform.
|
||||
|
||||
### Fixed
|
||||
- gtk4: Set the sync point on the video frame after mapping it as otherwise
|
||||
the frame might not be ready yet for further usage.
|
||||
- livesync: Correctly calculate the fallback buffer duration from the video
|
||||
framerate.
|
||||
- ndi: Handle caps changes correctly in `ndisinkcombiner`.
|
||||
|
||||
### Changed
|
||||
- webrtc: Minor cleanup.
|
||||
|
||||
## [0.10.2] - 2023-02-23
|
||||
### Fixed
|
||||
- hlssink3: Allow signal handlers to return `None`
|
||||
- gtk4: Make GL context sharing more reliable in pipelines with multiple
|
||||
`gtk4paintablesinks`
|
||||
- gtk4: Attach channel receiver to the main context from the correct thread to
|
||||
make it possible to start the sink from a different thread than the main
|
||||
thread without having retrieved the paintable from the main thread before.
|
||||
- fmp4mux/mp4mux: Ignore caps changes if only the framerate changes.
|
||||
|
||||
### Changed
|
||||
- gtk4: Simplify and refactor GL context sharing. Apart from being more
|
||||
reliable this reduces GL resource usage.
|
||||
|
||||
## [0.10.1] - 2023-02-13
|
||||
### Fixed
|
||||
- rtpav1pay: Fix calculation of Leb128 size size to work correctly with
|
||||
streams from certain encoders.
|
||||
|
||||
## [0.10.0] - 2023-02-10
|
||||
### Fixed
|
||||
- audiornnoise: Use correct value range for the samples
|
||||
- awss3sink: Treat stopping without EOS as an error for multipart upload
|
||||
- awss3hlssink: Fix the name of the hlssink child element
|
||||
- awss3hlssink: Fix deadlock on EOS
|
||||
- dav1d: Various fixes to improve performance, to handle decoding errors more
|
||||
gracefully and to make sure all frames are output in the end
|
||||
- fmp4mux: Various fixes to fragment splitting behaviour, output formatting
|
||||
and header generation
|
||||
- gtk4: Various stability and rendering fixes
|
||||
- meson: Various fixes and improvements to the meson-based build system
|
||||
- ndi: provide non-Linux/macOS UNIX fallback for the soname
|
||||
- ndisrc: Use default channel mask for audio output to allow >2 channels to
|
||||
work better
|
||||
- rav1e: Correctly enable threading support
|
||||
- rtpav1: Various fixes to the payloader and depayloader to handle streams
|
||||
more correctly and to handle errors more cleanly
|
||||
- rtpav1depay: Set caps on the source pad
|
||||
- spotify: fix "start a runtime from within a runtime" with static link
|
||||
- textahead: fix previous buffers
|
||||
- textwrap: Don't panic on empty buffers
|
||||
- tttocea608: Don't fail if a GAP event contains no duration
|
||||
- webrtchttp: whipsink: construct TURN URL correctly
|
||||
- webrtcsink: fix panic on pre-bwe request error
|
||||
- whipsink: Send ICE candidates together with the offer
|
||||
- whipsink: Various cleanups and minor fixes
|
||||
|
||||
### Added
|
||||
- audiornnoise: Add voice detection threshold property
|
||||
- awss3hlssink: Add `stats` property
|
||||
- awss3sink: Add properties to set Content-Type and Content-Disposition
|
||||
- fmp4mux: add 'offset-to-zero' property
|
||||
- fmp4mux/mp4mux: add support for muxing Opus, VP8, VP9 and AV1 streams
|
||||
- fmp4mux/mp4mux: Make media/track timescales configurable
|
||||
- fmp4mux: Add support for CMAF-style chunking, e.g. low-latency / LL HLS and DASH
|
||||
- gtk4: Support for rendering GL textures on X11/EGL, X11/GLX, Wayland and macOS
|
||||
- hlssink3: Allow generating i-frame-only playlist
|
||||
- livesync: New element that alllows maintaining a contiguous live stream
|
||||
without gaps from a potentially unstable source.
|
||||
- mp4mux: New non-fragmented MP4 muxer element
|
||||
- spotifyaudiosrc: Support configurable bitrate
|
||||
- textahead: add settings to display previous buffers
|
||||
- threadshare: Introduce new ts-audiotestsrc
|
||||
- webrtcsink: Support nvv4l2vp9enc
|
||||
- whepsource: Add a WebRTC WHEP source element
|
||||
|
||||
### Changed
|
||||
- audiofx: Derive from AudioFilter where possible
|
||||
- dav1ddec: Lower rank to primary to allow usage of hardware decoders with
|
||||
higher ranks
|
||||
- fmp4mux: Only push `fragment_offset` if `write-mfra` is true to reduce memory usage
|
||||
- webrtcsink: Make the `turn-server` property a `turn-servers` list
|
||||
- webrtcsink: Move from async-std to tokio
|
||||
|
||||
[Unreleased]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/compare/0.10.11...HEAD
|
||||
[0.10.11]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/compare/0.10.9...0.10.11
|
||||
[0.10.10]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/compare/0.10.9...0.10.10
|
||||
[0.10.9]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/compare/0.10.8...0.10.9
|
||||
[0.10.8]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/compare/0.10.7...0.10.8
|
||||
[0.10.7]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/compare/0.10.6...0.10.7
|
||||
[0.10.6]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/compare/0.10.5...0.10.6
|
||||
[0.10.5]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/compare/0.10.4...0.10.5
|
||||
[0.10.4]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/compare/0.10.3...0.10.4
|
||||
[0.10.3]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/compare/0.10.2...0.10.3
|
||||
[0.10.2]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/compare/0.10.1...0.10.2
|
||||
[0.10.1]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/compare/0.10.0...0.10.1
|
||||
[0.10.0]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/compare/0.9.0...0.10.0
|
6167
Cargo.lock
generated
Normal file
6167
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -110,6 +110,8 @@ You will find the following plugins in this repository:
|
|||
|
||||
- `fmp4`: A fragmented MP4/ISOBMFF/CMAF muxer for generating e.g. DASH/HLS media fragments.
|
||||
|
||||
- `mp4`: A non-fragmented MP4 muxer for generating MP4 files.
|
||||
|
||||
* `text`
|
||||
- `ahead`: A plugin to display upcoming text buffers ahead.
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
[package]
|
||||
name = "gst-plugin-audiofx"
|
||||
version = "0.10.0-alpha.1"
|
||||
version = "0.10.11"
|
||||
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
|
||||
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
|
||||
license = "MPL-2.0"
|
||||
description = "GStreamer Rust Audio Effects Plugin"
|
||||
edition = "2021"
|
||||
rust-version = "1.63"
|
||||
rust-version = "1.64"
|
||||
|
||||
[dependencies]
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_16"] }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_16"] }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_16"] }
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_16"] }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_16"] }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_16"] }
|
||||
anyhow = "1"
|
||||
byte-slice-cast = "1.0"
|
||||
num-traits = "0.2"
|
||||
|
@ -29,11 +29,11 @@ crate-type = ["cdylib", "rlib"]
|
|||
path = "src/lib.rs"
|
||||
|
||||
[dev-dependencies]
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] }
|
||||
gst-app = { package = "gstreamer-app", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_18"] }
|
||||
gst-app = { package = "gstreamer-app", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
|
||||
[build-dependencies]
|
||||
gst-plugin-version-helper = { path="../../version-helper" }
|
||||
gst-plugin-version-helper = { path="../../version-helper", version = "0.7" }
|
||||
|
||||
[features]
|
||||
static = []
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-MPL-2.0
|
373
audio/audiofx/LICENSE-MPL-2.0
Normal file
373
audio/audiofx/LICENSE-MPL-2.0
Normal file
|
@ -0,0 +1,373 @@
|
|||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
|
@ -782,8 +782,8 @@ impl State {
|
|||
self.offset
|
||||
);
|
||||
|
||||
let mut outbuf = gst::Buffer::with_size(src.len() * mem::size_of::<f64>())
|
||||
.map_err(|_| gst::FlowError::Error)?;
|
||||
let mut outbuf =
|
||||
gst::Buffer::with_size(mem::size_of_val(src)).map_err(|_| gst::FlowError::Error)?;
|
||||
{
|
||||
let outbuf = outbuf.get_mut().unwrap();
|
||||
let mut dst = outbuf.map_writable().map_err(|_| gst::FlowError::Error)?;
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
[package]
|
||||
name = "gst-plugin-claxon"
|
||||
version = "0.10.0-alpha.1"
|
||||
version = "0.10.11"
|
||||
authors = ["Ruben Gonzalez <rgonzalez@fluendo.com>"]
|
||||
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "GStreamer Claxon FLAC Decoder Plugin"
|
||||
edition = "2021"
|
||||
rust-version = "1.63"
|
||||
rust-version = "1.64"
|
||||
|
||||
[dependencies]
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
claxon = { version = "0.4" }
|
||||
byte-slice-cast = "1.0"
|
||||
atomic_refcell = "0.1"
|
||||
once_cell = "1"
|
||||
|
||||
[dev-dependencies]
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
|
||||
[lib]
|
||||
name = "gstclaxon"
|
||||
|
@ -25,7 +25,7 @@ crate-type = ["cdylib", "rlib"]
|
|||
path = "src/lib.rs"
|
||||
|
||||
[build-dependencies]
|
||||
gst-plugin-version-helper = { path="../../version-helper" }
|
||||
gst-plugin-version-helper = { path="../../version-helper", version = "0.7" }
|
||||
|
||||
[features]
|
||||
static = []
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-APACHE
|
201
audio/claxon/LICENSE-APACHE
Normal file
201
audio/claxon/LICENSE-APACHE
Normal file
|
@ -0,0 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-MIT
|
23
audio/claxon/LICENSE-MIT
Normal file
23
audio/claxon/LICENSE-MIT
Normal file
|
@ -0,0 +1,23 @@
|
|||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
|
@ -1,23 +1,23 @@
|
|||
[package]
|
||||
name = "gst-plugin-csound"
|
||||
version = "0.10.0-alpha.1"
|
||||
version = "0.10.11"
|
||||
authors = ["Natanael Mojica <neithanmo@gmail.com>"]
|
||||
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
|
||||
license = "MPL-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.63"
|
||||
rust-version = "1.64"
|
||||
description = "GStreamer Audio Filter plugin based on Csound"
|
||||
|
||||
[dependencies]
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
csound = "0.1.8"
|
||||
once_cell = "1.0"
|
||||
byte-slice-cast = "1.0"
|
||||
|
||||
[dev-dependencies]
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
|
||||
[lib]
|
||||
name = "gstcsound"
|
||||
|
@ -29,7 +29,7 @@ name = "csound-effect"
|
|||
path = "examples/effect_example.rs"
|
||||
|
||||
[build-dependencies]
|
||||
gst-plugin-version-helper = { path = "../../version-helper" }
|
||||
gst-plugin-version-helper = { path = "../../version-helper", version = "0.7" }
|
||||
|
||||
[features]
|
||||
static = []
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-MPL-2.0
|
373
audio/csound/LICENSE-MPL-2.0
Normal file
373
audio/csound/LICENSE-MPL-2.0
Normal file
|
@ -0,0 +1,373 @@
|
|||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
|
@ -1,23 +1,23 @@
|
|||
[package]
|
||||
name = "gst-plugin-lewton"
|
||||
version = "0.10.0-alpha.1"
|
||||
version = "0.10.11"
|
||||
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
|
||||
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "GStreamer lewton Vorbis Decoder Plugin"
|
||||
edition = "2021"
|
||||
rust-version = "1.63"
|
||||
rust-version = "1.64"
|
||||
|
||||
[dependencies]
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
lewton = { version = "0.10", default-features = false }
|
||||
byte-slice-cast = "1.0"
|
||||
atomic_refcell = "0.1"
|
||||
once_cell = "1.0"
|
||||
|
||||
[dev-dependencies]
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
|
||||
[lib]
|
||||
name = "gstlewton"
|
||||
|
@ -25,7 +25,7 @@ crate-type = ["cdylib", "rlib"]
|
|||
path = "src/lib.rs"
|
||||
|
||||
[build-dependencies]
|
||||
gst-plugin-version-helper = { path="../../version-helper" }
|
||||
gst-plugin-version-helper = { path="../../version-helper", version = "0.7" }
|
||||
|
||||
[features]
|
||||
static = []
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-APACHE
|
201
audio/lewton/LICENSE-APACHE
Normal file
201
audio/lewton/LICENSE-APACHE
Normal file
|
@ -0,0 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-MIT
|
23
audio/lewton/LICENSE-MIT
Normal file
23
audio/lewton/LICENSE-MIT
Normal file
|
@ -0,0 +1,23 @@
|
|||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
|
@ -1,16 +1,16 @@
|
|||
[package]
|
||||
name = "gst-plugin-spotify"
|
||||
version = "0.10.0-alpha.1"
|
||||
version = "0.10.11"
|
||||
authors = ["Guillaume Desmottes <guillaume@desmottes.be>"]
|
||||
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
|
||||
license = "MPL-2.0"
|
||||
description = "GStreamer Spotify Plugin"
|
||||
edition = "2021"
|
||||
rust-version = "1.63"
|
||||
rust-version = "1.64"
|
||||
|
||||
[dependencies]
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
once_cell = "1.0"
|
||||
librespot = { version = "0.4", default-features = false }
|
||||
tokio = "1.0"
|
||||
|
@ -24,7 +24,7 @@ crate-type = ["cdylib", "rlib"]
|
|||
path = "src/lib.rs"
|
||||
|
||||
[build-dependencies]
|
||||
gst-plugin-version-helper = { path="../../version-helper" }
|
||||
gst-plugin-version-helper = { path="../../version-helper", version = "0.7" }
|
||||
|
||||
[features]
|
||||
static = []
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-MPL-2.0
|
373
audio/spotify/LICENSE-MPL-2.0
Normal file
373
audio/spotify/LICENSE-MPL-2.0
Normal file
|
@ -0,0 +1,373 @@
|
|||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
194
audio/spotify/src/common.rs
Normal file
194
audio/spotify/src/common.rs
Normal file
|
@ -0,0 +1,194 @@
|
|||
// Copyright (C) 2021 Guillaume Desmottes <guillaume@desmottes.be>
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public License, v2.0.
|
||||
// If a copy of the MPL was not distributed with this file, You can obtain one at
|
||||
// <https://mozilla.org/MPL/2.0/>.
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use anyhow::bail;
|
||||
|
||||
use gst::glib;
|
||||
use gst::prelude::*;
|
||||
|
||||
use librespot::core::{
|
||||
cache::Cache, config::SessionConfig, session::Session, spotify_id::SpotifyId,
|
||||
};
|
||||
use librespot::discovery::Credentials;
|
||||
|
||||
#[derive(Default, Debug, Clone)]
|
||||
pub struct Settings {
|
||||
username: String,
|
||||
password: String,
|
||||
cache_credentials: String,
|
||||
cache_files: String,
|
||||
cache_max_size: u64,
|
||||
pub track: String,
|
||||
}
|
||||
|
||||
impl Settings {
|
||||
pub fn properties() -> Vec<glib::ParamSpec> {
|
||||
vec![glib::ParamSpecString::builder("username")
|
||||
.nick("Username")
|
||||
.blurb("Spotify device username from https://www.spotify.com/us/account/set-device-password/")
|
||||
.default_value(Some(""))
|
||||
.mutable_ready()
|
||||
.build(),
|
||||
glib::ParamSpecString::builder("password")
|
||||
.nick("Password")
|
||||
.blurb("Spotify device password from https://www.spotify.com/us/account/set-device-password/")
|
||||
.default_value(Some(""))
|
||||
.mutable_ready()
|
||||
.build(),
|
||||
glib::ParamSpecString::builder("cache-credentials")
|
||||
.nick("Credentials cache")
|
||||
.blurb("Directory where to cache Spotify credentials")
|
||||
.default_value(Some(""))
|
||||
.mutable_ready()
|
||||
.build(),
|
||||
glib::ParamSpecString::builder("cache-files")
|
||||
.nick("Files cache")
|
||||
.blurb("Directory where to cache downloaded files from Spotify")
|
||||
.default_value(Some(""))
|
||||
.mutable_ready()
|
||||
.build(),
|
||||
glib::ParamSpecUInt64::builder("cache-max-size")
|
||||
.nick("Cache max size")
|
||||
.blurb("The max allowed size of the cache, in bytes, or 0 to disable the cache limit")
|
||||
.default_value(0)
|
||||
.mutable_ready()
|
||||
.build(),
|
||||
glib::ParamSpecString::builder("track")
|
||||
.nick("Spotify URI")
|
||||
.blurb("Spotify track URI, in the form 'spotify:track:$SPOTIFY_ID'")
|
||||
.default_value(Some(""))
|
||||
.mutable_ready()
|
||||
.build(),
|
||||
]
|
||||
}
|
||||
|
||||
pub fn set_property(&mut self, value: &glib::Value, pspec: &glib::ParamSpec) {
|
||||
match pspec.name() {
|
||||
"username" => {
|
||||
self.username = value.get().expect("type checked upstream");
|
||||
}
|
||||
"password" => {
|
||||
self.password = value.get().expect("type checked upstream");
|
||||
}
|
||||
"cache-credentials" => {
|
||||
self.cache_credentials = value.get().expect("type checked upstream");
|
||||
}
|
||||
"cache-files" => {
|
||||
self.cache_files = value.get().expect("type checked upstream");
|
||||
}
|
||||
"cache-max-size" => {
|
||||
self.cache_max_size = value.get().expect("type checked upstream");
|
||||
}
|
||||
"track" => {
|
||||
self.track = value.get().expect("type checked upstream");
|
||||
}
|
||||
_ => unimplemented!(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn property(&self, pspec: &glib::ParamSpec) -> glib::Value {
|
||||
match pspec.name() {
|
||||
"username" => self.username.to_value(),
|
||||
"password" => self.password.to_value(),
|
||||
"cache-credentials" => self.cache_credentials.to_value(),
|
||||
"cache-files" => self.cache_files.to_value(),
|
||||
"cache-max-size" => self.cache_max_size.to_value(),
|
||||
"track" => self.track.to_value(),
|
||||
_ => unimplemented!(),
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn connect_session<T>(
|
||||
&self,
|
||||
src: T,
|
||||
cat: &gst::DebugCategory,
|
||||
) -> anyhow::Result<Session>
|
||||
where
|
||||
T: glib::IsA<glib::Object>,
|
||||
{
|
||||
let credentials_cache = if self.cache_credentials.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(&self.cache_credentials)
|
||||
};
|
||||
|
||||
let files_cache = if self.cache_files.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(&self.cache_files)
|
||||
};
|
||||
|
||||
let max_size = if self.cache_max_size != 0 {
|
||||
Some(self.cache_max_size)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let cache = Cache::new(credentials_cache, None, files_cache, max_size)?;
|
||||
|
||||
if let Some(cached_cred) = cache.credentials() {
|
||||
if !self.username.is_empty() && self.username != cached_cred.username {
|
||||
gst::debug!(
|
||||
cat,
|
||||
obj: &src,
|
||||
"ignore cached credentials for user {} which mismatch user {}",
|
||||
cached_cred.username,
|
||||
self.username
|
||||
);
|
||||
} else {
|
||||
gst::debug!(
|
||||
cat,
|
||||
obj: &src,
|
||||
"reuse cached credentials for user {}",
|
||||
cached_cred.username
|
||||
);
|
||||
if let Ok((session, _credentials)) = Session::connect(
|
||||
SessionConfig::default(),
|
||||
cached_cred,
|
||||
Some(cache.clone()),
|
||||
true,
|
||||
)
|
||||
.await
|
||||
{
|
||||
return Ok(session);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gst::debug!(
|
||||
cat,
|
||||
obj: &src,
|
||||
"credentials not in cache or cached credentials invalid",
|
||||
);
|
||||
|
||||
if self.username.is_empty() {
|
||||
bail!("username is not set and credentials are not in cache");
|
||||
}
|
||||
if self.password.is_empty() {
|
||||
bail!("password is not set and credentials are not in cache");
|
||||
}
|
||||
|
||||
let cred = Credentials::with_password(&self.username, &self.password);
|
||||
|
||||
let (session, _credentials) =
|
||||
Session::connect(SessionConfig::default(), cred, Some(cache), true).await?;
|
||||
|
||||
Ok(session)
|
||||
}
|
||||
|
||||
pub fn track_id(&self) -> anyhow::Result<SpotifyId> {
|
||||
if self.track.is_empty() {
|
||||
bail!("track is not set");
|
||||
}
|
||||
let track = SpotifyId::from_uri(&self.track).map_err(|_| {
|
||||
anyhow::anyhow!("failed to create Spotify URI from track {}", self.track)
|
||||
})?;
|
||||
|
||||
Ok(track)
|
||||
}
|
||||
}
|
|
@ -14,6 +14,7 @@
|
|||
*/
|
||||
use gst::glib;
|
||||
|
||||
mod common;
|
||||
mod spotifyaudiosrc;
|
||||
|
||||
fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
use std::sync::{mpsc, Arc, Mutex, MutexGuard};
|
||||
|
||||
use anyhow::bail;
|
||||
use futures::future::{AbortHandle, Abortable, Aborted};
|
||||
use once_cell::sync::Lazy;
|
||||
use tokio::{runtime, task::JoinHandle};
|
||||
|
@ -18,10 +17,6 @@ use gst::prelude::*;
|
|||
use gst::subclass::prelude::*;
|
||||
use gst_base::subclass::{base_src::CreateSuccess, prelude::*};
|
||||
|
||||
use librespot::core::{
|
||||
cache::Cache, config::SessionConfig, session::Session, spotify_id::SpotifyId,
|
||||
};
|
||||
use librespot::discovery::Credentials;
|
||||
use librespot::playback::{
|
||||
audio_backend::{Sink, SinkResult},
|
||||
config::PlayerConfig,
|
||||
|
@ -67,12 +62,7 @@ struct State {
|
|||
|
||||
#[derive(Default)]
|
||||
struct Settings {
|
||||
username: String,
|
||||
password: String,
|
||||
cache_credentials: String,
|
||||
cache_files: String,
|
||||
cache_max_size: u64,
|
||||
track: String,
|
||||
common: crate::common::Settings,
|
||||
bitrate: Bitrate,
|
||||
}
|
||||
|
||||
|
@ -99,118 +89,39 @@ impl ObjectSubclass for SpotifyAudioSrc {
|
|||
impl ObjectImpl for SpotifyAudioSrc {
|
||||
fn properties() -> &'static [glib::ParamSpec] {
|
||||
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
|
||||
vec![glib::ParamSpecString::builder("username")
|
||||
.nick("Username")
|
||||
.blurb("Spotify device username from https://www.spotify.com/us/account/set-device-password/")
|
||||
.default_value(Some(""))
|
||||
let mut props = crate::common::Settings::properties();
|
||||
let default = Settings::default();
|
||||
|
||||
props.push(
|
||||
glib::ParamSpecEnum::builder_with_default::<Bitrate>("bitrate", default.bitrate)
|
||||
.nick("Spotify bitrate")
|
||||
.blurb("Spotify audio bitrate in kbit/s")
|
||||
.mutable_ready()
|
||||
.build(),
|
||||
glib::ParamSpecString::builder("password")
|
||||
.nick("Password")
|
||||
.blurb("Spotify device password from https://www.spotify.com/us/account/set-device-password/")
|
||||
.default_value(Some(""))
|
||||
.mutable_ready()
|
||||
.build(),
|
||||
glib::ParamSpecString::builder("cache-credentials")
|
||||
.nick("Credentials cache")
|
||||
.blurb("Directory where to cache Spotify credentials")
|
||||
.default_value(Some(""))
|
||||
.mutable_ready()
|
||||
.build(),
|
||||
glib::ParamSpecString::builder("cache-files")
|
||||
.nick("Files cache")
|
||||
.blurb("Directory where to cache downloaded files from Spotify")
|
||||
.default_value(Some(""))
|
||||
.mutable_ready()
|
||||
.build(),
|
||||
glib::ParamSpecUInt64::builder("cache-max-size")
|
||||
.nick("Cache max size")
|
||||
.blurb("The max allowed size of the cache, in bytes, or 0 to disable the cache limit")
|
||||
.default_value(0)
|
||||
.mutable_ready()
|
||||
.build(),
|
||||
glib::ParamSpecString::builder("track")
|
||||
.nick("Spotify URI")
|
||||
.blurb("Spotify track URI, in the form 'spotify:track:$SPOTIFY_ID'")
|
||||
.default_value(Some(""))
|
||||
.mutable_ready()
|
||||
.build(),
|
||||
glib::ParamSpecEnum::builder::<Bitrate>("bitrate")
|
||||
.nick("Spotify bitrate")
|
||||
.blurb("Spotify audio bitrate in kbit/s")
|
||||
.mutable_ready()
|
||||
.build()
|
||||
]
|
||||
);
|
||||
props
|
||||
});
|
||||
|
||||
PROPERTIES.as_ref()
|
||||
}
|
||||
|
||||
fn set_property(&self, _id: usize, value: &glib::Value, pspec: &glib::ParamSpec) {
|
||||
let mut settings = self.settings.lock().unwrap();
|
||||
|
||||
match pspec.name() {
|
||||
"username" => {
|
||||
let mut settings = self.settings.lock().unwrap();
|
||||
settings.username = value.get().expect("type checked upstream");
|
||||
}
|
||||
"password" => {
|
||||
let mut settings = self.settings.lock().unwrap();
|
||||
settings.password = value.get().expect("type checked upstream");
|
||||
}
|
||||
"cache-credentials" => {
|
||||
let mut settings = self.settings.lock().unwrap();
|
||||
settings.cache_credentials = value.get().expect("type checked upstream");
|
||||
}
|
||||
"cache-files" => {
|
||||
let mut settings = self.settings.lock().unwrap();
|
||||
settings.cache_files = value.get().expect("type checked upstream");
|
||||
}
|
||||
"cache-max-size" => {
|
||||
let mut settings = self.settings.lock().unwrap();
|
||||
settings.cache_max_size = value.get().expect("type checked upstream");
|
||||
}
|
||||
"track" => {
|
||||
let mut settings = self.settings.lock().unwrap();
|
||||
settings.track = value.get().expect("type checked upstream");
|
||||
}
|
||||
"bitrate" => {
|
||||
let mut settings = self.settings.lock().unwrap();
|
||||
settings.bitrate = value.get().expect("type checked upstream");
|
||||
}
|
||||
_ => unimplemented!(),
|
||||
_ => settings.common.set_property(value, pspec),
|
||||
}
|
||||
}
|
||||
|
||||
fn property(&self, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||
let settings = self.settings.lock().unwrap();
|
||||
|
||||
match pspec.name() {
|
||||
"username" => {
|
||||
let settings = self.settings.lock().unwrap();
|
||||
settings.username.to_value()
|
||||
}
|
||||
"password" => {
|
||||
let settings = self.settings.lock().unwrap();
|
||||
settings.password.to_value()
|
||||
}
|
||||
"cache-credentials" => {
|
||||
let settings = self.settings.lock().unwrap();
|
||||
settings.cache_credentials.to_value()
|
||||
}
|
||||
"cache-files" => {
|
||||
let settings = self.settings.lock().unwrap();
|
||||
settings.cache_files.to_value()
|
||||
}
|
||||
"cache-max-size" => {
|
||||
let settings = self.settings.lock().unwrap();
|
||||
settings.cache_max_size.to_value()
|
||||
}
|
||||
"track" => {
|
||||
let settings = self.settings.lock().unwrap();
|
||||
settings.track.to_value()
|
||||
}
|
||||
"bitrate" => {
|
||||
let settings = self.settings.lock().unwrap();
|
||||
settings.bitrate.to_value()
|
||||
}
|
||||
_ => unimplemented!(),
|
||||
"bitrate" => settings.bitrate.to_value(),
|
||||
_ => settings.common.property(pspec),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -388,10 +299,10 @@ impl URIHandlerImpl for SpotifyAudioSrc {
|
|||
fn uri(&self) -> Option<String> {
|
||||
let settings = self.settings.lock().unwrap();
|
||||
|
||||
if settings.track.is_empty() {
|
||||
if settings.common.track.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(settings.track.clone())
|
||||
Some(settings.common.track.clone())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -450,63 +361,23 @@ impl SpotifyAudioSrc {
|
|||
}
|
||||
}
|
||||
|
||||
let (credentials, cache, track, bitrate) = {
|
||||
let settings = self.settings.lock().unwrap();
|
||||
let src = self.obj();
|
||||
|
||||
let credentials_cache = if settings.cache_credentials.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(&settings.cache_credentials)
|
||||
let (session, track, bitrate) = {
|
||||
let (common, bitrate) = {
|
||||
let settings = self.settings.lock().unwrap();
|
||||
let bitrate = settings.bitrate.into();
|
||||
|
||||
(settings.common.clone(), bitrate)
|
||||
};
|
||||
|
||||
let files_cache = if settings.cache_files.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(&settings.cache_files)
|
||||
};
|
||||
|
||||
let max_size = if settings.cache_max_size != 0 {
|
||||
Some(settings.cache_max_size)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let cache = Cache::new(credentials_cache, None, files_cache, max_size)?;
|
||||
|
||||
let credentials = match cache.credentials() {
|
||||
Some(cached_cred) => {
|
||||
gst::debug!(CAT, imp: self, "reuse credentials from cache",);
|
||||
cached_cred
|
||||
}
|
||||
None => {
|
||||
gst::debug!(CAT, imp: self, "credentials not in cache",);
|
||||
|
||||
if settings.username.is_empty() {
|
||||
bail!("username is not set and credentials are not in cache");
|
||||
}
|
||||
if settings.password.is_empty() {
|
||||
bail!("password is not set and credentials are not in cache");
|
||||
}
|
||||
|
||||
let cred = Credentials::with_password(&settings.username, &settings.password);
|
||||
cache.save_credentials(&cred);
|
||||
cred
|
||||
}
|
||||
};
|
||||
|
||||
if settings.track.is_empty() {
|
||||
bail!("track is not set")
|
||||
}
|
||||
|
||||
let bitrate = settings.bitrate.into();
|
||||
let session = common.connect_session(src.clone(), &CAT).await?;
|
||||
let track = common.track_id()?;
|
||||
gst::debug!(CAT, imp: self, "Requesting bitrate {:?}", bitrate);
|
||||
|
||||
(credentials, cache, settings.track.clone(), bitrate)
|
||||
(session, track, bitrate)
|
||||
};
|
||||
|
||||
let (session, _credentials) =
|
||||
Session::connect(SessionConfig::default(), credentials, Some(cache), false).await?;
|
||||
|
||||
let player_config = PlayerConfig {
|
||||
passthrough: true,
|
||||
bitrate,
|
||||
|
@ -522,11 +393,6 @@ impl SpotifyAudioSrc {
|
|||
Box::new(BufferSink { sender })
|
||||
});
|
||||
|
||||
let track = match SpotifyId::from_uri(&track) {
|
||||
Ok(track) => track,
|
||||
Err(_) => bail!("Failed to create Spotify URI from track"),
|
||||
};
|
||||
|
||||
player.load(track, true, 0);
|
||||
|
||||
let player_channel_handle = RUNTIME.spawn(async move {
|
||||
|
|
|
@ -82,6 +82,16 @@ if __name__ == "__main__":
|
|||
pkg_config_path.append(str(opts.root_dir / 'meson-uninstalled'))
|
||||
env['PKG_CONFIG_PATH'] = os.pathsep.join(pkg_config_path)
|
||||
|
||||
rustc_target = None
|
||||
if 'RUSTFLAGS' in env:
|
||||
# grab target from RUSTFLAGS
|
||||
rust_flags = env['RUSTFLAGS'].split()
|
||||
if '--target' in rust_flags:
|
||||
rustc_target_idx = rust_flags.index('--target')
|
||||
_ = rust_flags.pop(rustc_target_idx) # drop '--target'
|
||||
rustc_target = rust_flags.pop(rustc_target_idx)
|
||||
env['RUSTFLAGS'] = ' '.join(rust_flags)
|
||||
|
||||
features = opts.features
|
||||
if opts.command == 'build':
|
||||
cargo_cmd = ['cargo']
|
||||
|
@ -100,6 +110,8 @@ if __name__ == "__main__":
|
|||
print("Unknown command:", opts.command, file=logfile)
|
||||
sys.exit(1)
|
||||
|
||||
if rustc_target:
|
||||
cargo_cmd += ['--target', rustc_target]
|
||||
if features:
|
||||
cargo_cmd += ['--features', ','.join(features)]
|
||||
cargo_cmd += ['--target-dir', cargo_target_dir]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
set -e
|
||||
|
||||
RELEASE=1.0.0
|
||||
RELEASE=1.1.0
|
||||
|
||||
git clone https://code.videolan.org/videolan/dav1d.git --branch $RELEASE
|
||||
cd dav1d
|
||||
|
|
|
@ -3,4 +3,4 @@ source ./ci/env.sh
|
|||
set -e
|
||||
export CARGO_HOME='/usr/local/cargo'
|
||||
|
||||
cargo install cargo-c --version 0.9.14+cargo-0.66
|
||||
cargo install cargo-c --version 0.9.13+cargo-0.65
|
||||
|
|
84
deny.toml
84
deny.toml
|
@ -14,8 +14,6 @@ ignore = [
|
|||
"RUSTSEC-2020-0071",
|
||||
# sodiumoxide is deprecated
|
||||
"RUSTSEC-2021-0137",
|
||||
# https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/256
|
||||
"RUSTSEC-2022-0048",
|
||||
]
|
||||
|
||||
[licenses]
|
||||
|
@ -58,14 +56,6 @@ wildcards = "allow"
|
|||
name = "time"
|
||||
version = "0.1"
|
||||
|
||||
# ignore duplicated rustc_version dependency because rav1e depends on an old version
|
||||
[[bans.skip]]
|
||||
name = "rustc_version"
|
||||
version = "0.3"
|
||||
[[bans.skip]]
|
||||
name = "semver"
|
||||
version = "0.11"
|
||||
|
||||
# ignore duplicated crc dependency because ffv1 depends on an old version
|
||||
# https://github.com/rust-av/ffv1/issues/21
|
||||
[[bans.skip]]
|
||||
|
@ -105,12 +95,6 @@ version = "0.5"
|
|||
name = "idna"
|
||||
version = "0.2"
|
||||
|
||||
# image depends on older gif
|
||||
# https://github.com/image-rs/image/pull/1826
|
||||
[[bans.skip]]
|
||||
name = "gif"
|
||||
version = "0.11"
|
||||
|
||||
# field-offset and nix depend on an older memoffset
|
||||
# https://github.com/Diggsey/rust-field-offset/pull/23
|
||||
# https://github.com/nix-rust/nix/pull/1885
|
||||
|
@ -135,6 +119,74 @@ version = "0.13"
|
|||
[[bans.skip]]
|
||||
name = "windows-sys"
|
||||
version = "0.42"
|
||||
[[bans.skip]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.42"
|
||||
[[bans.skip]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.42"
|
||||
[[bans.skip]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.42"
|
||||
[[bans.skip]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.42"
|
||||
[[bans.skip]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.42"
|
||||
[[bans.skip]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.42"
|
||||
[[bans.skip]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.42"
|
||||
|
||||
# Various crates depend on an older version of socket2
|
||||
[[bans.skip]]
|
||||
name = "socket2"
|
||||
version = "0.4"
|
||||
|
||||
# Various crates depend on an older version of syn
|
||||
[[bans.skip]]
|
||||
name = "syn"
|
||||
version = "1.0"
|
||||
|
||||
# Various crates depend on an older version of bitflags
|
||||
[[bans.skip]]
|
||||
name = "bitflags"
|
||||
version = "1.0"
|
||||
|
||||
# cargo-lock depends on an old version of the toml crate
|
||||
# https://github.com/rustsec/rustsec/pull/805
|
||||
[[bans.skip]]
|
||||
name = "toml"
|
||||
version = "0.5"
|
||||
|
||||
# Various crates depend on an older version of redox_syscall
|
||||
[[bans.skip]]
|
||||
name = "redox_syscall"
|
||||
version = "0.2"
|
||||
|
||||
# Various crates depend on an older version of miniz_oxide
|
||||
[[bans.skip]]
|
||||
name = "miniz_oxide"
|
||||
version = "0.6"
|
||||
|
||||
# tracing-subscriber depends on an older version of regex-syntax
|
||||
[[bans.skip]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6"
|
||||
|
||||
# publicsuffix depends on an older version of idna
|
||||
# https://github.com/rushmorem/publicsuffix/pull/39
|
||||
[[bans.skip]]
|
||||
name = "idna"
|
||||
version = "0.3"
|
||||
|
||||
# Various crates depend on an older version of fastrand
|
||||
[[bans.skip]]
|
||||
name = "fastrand"
|
||||
version = "1.0"
|
||||
|
||||
[sources]
|
||||
unknown-registry = "deny"
|
||||
|
|
|
@ -19,6 +19,8 @@ except ImportError:
|
|||
PARSER = ArgumentParser()
|
||||
PARSER.add_argument('src_dir', type=Path)
|
||||
PARSER.add_argument('plugins', nargs='*')
|
||||
PARSER.add_argument('--features', action="store_true", help="Get list of features to activate")
|
||||
PARSER.add_argument('--gst-version', help="Get list of features to activate")
|
||||
|
||||
|
||||
# Map plugin name to directory name, for those that does not match.
|
||||
|
@ -38,27 +40,73 @@ RENAMES = {
|
|||
'textwrap': 'wrap',
|
||||
}
|
||||
|
||||
class CargoAnalyzer:
|
||||
def __init__(self):
|
||||
self.src_dir = None
|
||||
self.plugins = None
|
||||
self.features = False
|
||||
self.gst_version = "1.18"
|
||||
|
||||
def extract_version(self, feature_name):
|
||||
if feature_name.startswith('v'):
|
||||
verindex = 1
|
||||
elif feature_name.startswith('gst'):
|
||||
verindex = 3
|
||||
else:
|
||||
return None
|
||||
|
||||
(majver, minver) = feature_name[verindex:].split("_")
|
||||
return (int(majver), int(minver))
|
||||
|
||||
def extract_features(self, cargo_data):
|
||||
features = cargo_data['features']
|
||||
wanted_features = set()
|
||||
gst_version_major = int(self.gst_version.split('.')[0])
|
||||
gst_version_minor = int(self.gst_version.split('.')[1])
|
||||
for (name, value) in features.items():
|
||||
version = self.extract_version(name)
|
||||
|
||||
if version is None:
|
||||
continue
|
||||
(majver, minver) = version
|
||||
|
||||
if gst_version_major < majver or gst_version_minor < minver:
|
||||
continue
|
||||
wanted_features |= set(value)
|
||||
if name.startswith("gst"):
|
||||
# Required for some reason for rswebrtc which has a specific feature
|
||||
wanted_features |= {f"{cargo_data['package']['name']}/{name}"}
|
||||
|
||||
return wanted_features
|
||||
|
||||
def run(self):
|
||||
with (opts.src_dir / 'Cargo.toml').open('rb') as f:
|
||||
crates = tomllib.load(f)['workspace']['members']
|
||||
res = set()
|
||||
for name in opts.plugins:
|
||||
if name.startswith('gst'):
|
||||
name = name[3:]
|
||||
|
||||
name = RENAMES.get(name, name)
|
||||
crate_path = None
|
||||
for crate in crates:
|
||||
if Path(crate).name == name:
|
||||
crate_path = opts.src_dir / crate / 'Cargo.toml'
|
||||
assert crate_path
|
||||
with crate_path.open('rb') as f:
|
||||
data = tomllib.load(f)
|
||||
if opts.features:
|
||||
res |= self.extract_features(data)
|
||||
else:
|
||||
try:
|
||||
requires = data['package']['metadata']['capi']['pkg_config']['requires_private']
|
||||
except KeyError:
|
||||
continue
|
||||
res.update([i.strip().replace('>', "|>").replace('<', "|<").replace("==", "|==") for i in requires.split(',')])
|
||||
return res
|
||||
|
||||
if __name__ == "__main__":
|
||||
opts = PARSER.parse_args()
|
||||
analyzer = CargoAnalyzer()
|
||||
opts = PARSER.parse_args(namespace=analyzer)
|
||||
|
||||
with (opts.src_dir / 'Cargo.toml').open('rb') as f:
|
||||
crates = tomllib.load(f)['workspace']['members']
|
||||
deps = set()
|
||||
for p in opts.plugins:
|
||||
assert p.startswith('gst')
|
||||
name = p[3:]
|
||||
name = RENAMES.get(name, name)
|
||||
crate_path = None
|
||||
for crate in crates:
|
||||
if Path(crate).name == name:
|
||||
crate_path = opts.src_dir / crate / 'Cargo.toml'
|
||||
assert crate_path
|
||||
with crate_path.open('rb') as f:
|
||||
data = tomllib.load(f)
|
||||
try:
|
||||
requires = data['package']['metadata']['capi']['pkg_config']['requires_private']
|
||||
except KeyError:
|
||||
continue
|
||||
deps.update([i.strip().replace('>', "|>").replace('<', "|<").replace("==", "|==") for i in requires.split(',')])
|
||||
print(','.join(deps))
|
||||
print(','.join(analyzer.run()))
|
||||
|
|
|
@ -99,9 +99,17 @@ foreach plugin_name: list_plugin_res.stdout().split(':')
|
|||
gst_index: 'plugins/index.md',
|
||||
include_paths: join_paths(meson.current_source_dir(), '..'),
|
||||
gst_smart_index: true,
|
||||
gst_c_source_filters: [
|
||||
'../target/*/*.rs',
|
||||
'../target/*/*/*.rs',
|
||||
'../target/*/*/*/*.rs',
|
||||
'../target/*/*/*/*/*.rs',
|
||||
'../target/*/*/*/*/*/*.rs',
|
||||
],
|
||||
gst_c_sources: [
|
||||
'../*/*/*/*.rs',
|
||||
'../*/*/*/*/*.rs',
|
||||
'../*/*/*/*/*/*.rs',
|
||||
],
|
||||
dependencies: [gst_dep],
|
||||
gst_order_generated_subpages: true,
|
||||
|
|
|
@ -1475,6 +1475,18 @@
|
|||
"type": "guint64",
|
||||
"writable": true
|
||||
},
|
||||
"stop-on-eos": {
|
||||
"blurb": "Stop forwarding buffers as soon as one input pad is eos",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "false",
|
||||
"mutable": "ready",
|
||||
"readable": true,
|
||||
"type": "gboolean",
|
||||
"writable": true
|
||||
},
|
||||
"timeout": {
|
||||
"blurb": "Timeout on an input before switching to a lower priority input.",
|
||||
"conditionally-available": false,
|
||||
|
@ -1544,7 +1556,7 @@
|
|||
"writable": false
|
||||
},
|
||||
"priority": {
|
||||
"blurb": "Selection priority for this stream",
|
||||
"blurb": "Selection priority for this stream (lower number has a higher priority)",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
|
@ -1593,7 +1605,7 @@
|
|||
"presence": "always"
|
||||
}
|
||||
},
|
||||
"rank": "primary + 1"
|
||||
"rank": "none"
|
||||
}
|
||||
},
|
||||
"filename": "gstffv1",
|
||||
|
@ -4890,7 +4902,7 @@
|
|||
"presence": "always"
|
||||
},
|
||||
"src": {
|
||||
"caps": "closedcaption/x-cea-608:\n format: raw\n framerate: [ 1/2147483647, 2147483647/1 ]\n",
|
||||
"caps": "closedcaption/x-cea-608:\n format: raw\n framerate: [ 1/2147483647, 2147483647/1 ]\n field: 0\n",
|
||||
"direction": "src",
|
||||
"presence": "always"
|
||||
}
|
||||
|
@ -5375,7 +5387,7 @@
|
|||
}
|
||||
},
|
||||
"filename": "gstrsonvif",
|
||||
"license": "MPL",
|
||||
"license": "MPL-2.0",
|
||||
"other-types": {},
|
||||
"package": "gst-plugin-onvif",
|
||||
"source": "gst-plugin-onvif",
|
||||
|
@ -5608,7 +5620,7 @@
|
|||
"writable": true
|
||||
},
|
||||
"max-bitrate": {
|
||||
"blurb": "Maximal bitrate to use (in bit/sec) when computing it through the bandwidth estimation algorithm",
|
||||
"blurb": "Maximum bitrate to use (in bit/sec) when computing it through the bandwidth estimation algorithm",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
|
@ -5640,7 +5652,7 @@
|
|||
}
|
||||
},
|
||||
"filename": "gstrsrtp",
|
||||
"license": "MPL",
|
||||
"license": "MPL-2.0",
|
||||
"other-types": {},
|
||||
"package": "gst-plugin-rtp",
|
||||
"source": "gst-plugin-rtp",
|
||||
|
@ -5994,8 +6006,20 @@
|
|||
"type": "gboolean",
|
||||
"writable": true
|
||||
},
|
||||
"ice-transport-policy": {
|
||||
"blurb": "The policy to apply for ICE transport",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "all (0)",
|
||||
"mutable": "ready",
|
||||
"readable": true,
|
||||
"type": "GstWebRTCICETransportPolicy",
|
||||
"writable": true
|
||||
},
|
||||
"max-bitrate": {
|
||||
"blurb": "Minimal bitrate to use (in bit/sec) when computing it through the congestion control algorithm",
|
||||
"blurb": "Maximum bitrate to use (in bit/sec) when computing it through the congestion control algorithm",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
|
@ -6148,6 +6172,135 @@
|
|||
"args": [],
|
||||
"return-type": "GStrv",
|
||||
"when": "last"
|
||||
},
|
||||
"request-encoded-filter": {
|
||||
"args": [
|
||||
{
|
||||
"name": "arg0",
|
||||
"type": "gchararray"
|
||||
},
|
||||
{
|
||||
"name": "arg1",
|
||||
"type": "gchararray"
|
||||
},
|
||||
{
|
||||
"name": "arg2",
|
||||
"type": "GstCaps"
|
||||
}
|
||||
],
|
||||
"return-type": "GstElement",
|
||||
"when": "last"
|
||||
}
|
||||
}
|
||||
},
|
||||
"webrtcsrc": {
|
||||
"author": "Thibault Saunier <tsaunier@igalia.com>",
|
||||
"description": "WebRTC src",
|
||||
"hierarchy": [
|
||||
"GstWebRTCSrc",
|
||||
"GstBin",
|
||||
"GstElement",
|
||||
"GstObject",
|
||||
"GInitiallyUnowned",
|
||||
"GObject"
|
||||
],
|
||||
"interfaces": [
|
||||
"GstChildProxy",
|
||||
"GstURIHandler"
|
||||
],
|
||||
"klass": "Source/Network/WebRTC",
|
||||
"long-name": "WebRTCSrc",
|
||||
"pad-templates": {
|
||||
"audio_%%u": {
|
||||
"caps": "audio/x-raw(ANY):\naudio/x-opus:\napplication/x-rtp:\n",
|
||||
"direction": "src",
|
||||
"presence": "sometimes",
|
||||
"type": "GstWebRTCSrcPad"
|
||||
},
|
||||
"video_%%u": {
|
||||
"caps": "video/x-raw(ANY):\napplication/x-rtp:\n",
|
||||
"direction": "src",
|
||||
"presence": "sometimes",
|
||||
"type": "GstWebRTCSrcPad"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"audio-codecs": {
|
||||
"blurb": "Names of audio codecs to be be used during the SDP negotiation. Valid values: [OPUS]",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"mutable": "ready",
|
||||
"readable": true,
|
||||
"type": "GstValueArray",
|
||||
"writable": true
|
||||
},
|
||||
"meta": {
|
||||
"blurb": "Free form metadata about the consumer",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"mutable": "ready",
|
||||
"readable": true,
|
||||
"type": "GstStructure",
|
||||
"writable": true
|
||||
},
|
||||
"signaller": {
|
||||
"blurb": "The Signallable object to use to handle WebRTC Signalling",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"mutable": "ready",
|
||||
"readable": true,
|
||||
"type": "GstRSWebRTCSignallableIface",
|
||||
"writable": true
|
||||
},
|
||||
"stun-server": {
|
||||
"blurb": "NULL",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "stun://stun.l.google.com:19302",
|
||||
"mutable": "null",
|
||||
"readable": true,
|
||||
"type": "gchararray",
|
||||
"writable": true
|
||||
},
|
||||
"video-codecs": {
|
||||
"blurb": "Names of video codecs to be be used during the SDP negotiation. Valid values: [VP8, H264, VP9, H265]",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"mutable": "ready",
|
||||
"readable": true,
|
||||
"type": "GstValueArray",
|
||||
"writable": true
|
||||
}
|
||||
},
|
||||
"rank": "primary",
|
||||
"signals": {
|
||||
"request-encoded-filter": {
|
||||
"args": [
|
||||
{
|
||||
"name": "arg0",
|
||||
"type": "gchararray"
|
||||
},
|
||||
{
|
||||
"name": "arg1",
|
||||
"type": "gchararray"
|
||||
},
|
||||
{
|
||||
"name": "arg2",
|
||||
"type": "GstCaps"
|
||||
}
|
||||
],
|
||||
"return-type": "GstElement",
|
||||
"when": "last"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6155,6 +6308,144 @@
|
|||
"filename": "gstrswebrtc",
|
||||
"license": "MPL-2.0",
|
||||
"other-types": {
|
||||
"GstRSWebRTCSignallableIface": {
|
||||
"hierarchy": [
|
||||
"GstRSWebRTCSignallableIface",
|
||||
"GInterface"
|
||||
],
|
||||
"kind": "interface",
|
||||
"signals": {
|
||||
"error": {
|
||||
"args": [
|
||||
{
|
||||
"name": "arg0",
|
||||
"type": "gchararray"
|
||||
}
|
||||
],
|
||||
"return-type": "void",
|
||||
"when": "last"
|
||||
},
|
||||
"handle-ice": {
|
||||
"args": [
|
||||
{
|
||||
"name": "arg0",
|
||||
"type": "gchararray"
|
||||
},
|
||||
{
|
||||
"name": "arg1",
|
||||
"type": "guint"
|
||||
},
|
||||
{
|
||||
"name": "arg2",
|
||||
"type": "gchararray"
|
||||
},
|
||||
{
|
||||
"name": "arg3",
|
||||
"type": "gchararray"
|
||||
}
|
||||
],
|
||||
"return-type": "void",
|
||||
"when": "last"
|
||||
},
|
||||
"producer-added": {
|
||||
"args": [
|
||||
{
|
||||
"name": "arg0",
|
||||
"type": "gchararray"
|
||||
},
|
||||
{
|
||||
"name": "arg1",
|
||||
"type": "GstStructure"
|
||||
}
|
||||
],
|
||||
"return-type": "void",
|
||||
"when": "last"
|
||||
},
|
||||
"producer-removed": {
|
||||
"args": [
|
||||
{
|
||||
"name": "arg0",
|
||||
"type": "gchararray"
|
||||
},
|
||||
{
|
||||
"name": "arg1",
|
||||
"type": "GstStructure"
|
||||
}
|
||||
],
|
||||
"return-type": "void",
|
||||
"when": "last"
|
||||
},
|
||||
"request-meta": {
|
||||
"args": [],
|
||||
"return-type": "GstStructure",
|
||||
"when": "last"
|
||||
},
|
||||
"session-description": {
|
||||
"args": [
|
||||
{
|
||||
"name": "arg0",
|
||||
"type": "gchararray"
|
||||
},
|
||||
{
|
||||
"name": "arg1",
|
||||
"type": "GstWebRTCSessionDescription"
|
||||
}
|
||||
],
|
||||
"return-type": "void",
|
||||
"when": "last"
|
||||
},
|
||||
"session-ended": {
|
||||
"args": [
|
||||
{
|
||||
"name": "arg0",
|
||||
"type": "gchararray"
|
||||
}
|
||||
],
|
||||
"return-type": "void",
|
||||
"when": "last"
|
||||
},
|
||||
"session-requested": {
|
||||
"args": [
|
||||
{
|
||||
"name": "arg0",
|
||||
"type": "gchararray"
|
||||
},
|
||||
{
|
||||
"name": "arg1",
|
||||
"type": "gchararray"
|
||||
}
|
||||
],
|
||||
"return-type": "void",
|
||||
"when": "last"
|
||||
},
|
||||
"session-started": {
|
||||
"args": [
|
||||
{
|
||||
"name": "arg0",
|
||||
"type": "gchararray"
|
||||
},
|
||||
{
|
||||
"name": "arg1",
|
||||
"type": "gchararray"
|
||||
}
|
||||
],
|
||||
"return-type": "void",
|
||||
"when": "last"
|
||||
},
|
||||
"start": {
|
||||
"action": true,
|
||||
"args": [],
|
||||
"return-type": "void",
|
||||
"when": "last"
|
||||
},
|
||||
"stop": {
|
||||
"action": true,
|
||||
"args": [],
|
||||
"return-type": "void",
|
||||
"when": "last"
|
||||
}
|
||||
}
|
||||
},
|
||||
"GstWebRTCSinkCongestionControl": {
|
||||
"kind": "enum",
|
||||
"values": [
|
||||
|
@ -6174,6 +6465,18 @@
|
|||
"value": "2"
|
||||
}
|
||||
]
|
||||
},
|
||||
"GstWebRTCSrcPad": {
|
||||
"hierarchy": [
|
||||
"GstWebRTCSrcPad",
|
||||
"GstGhostPad",
|
||||
"GstProxyPad",
|
||||
"GstPad",
|
||||
"GstObject",
|
||||
"GInitiallyUnowned",
|
||||
"GObject"
|
||||
],
|
||||
"kind": "object"
|
||||
}
|
||||
},
|
||||
"package": "gst-plugin-webrtc",
|
||||
|
@ -7928,7 +8231,7 @@
|
|||
}
|
||||
},
|
||||
"filename": "gsttogglerecord",
|
||||
"license": "MPL-2.0",
|
||||
"license": "MPL",
|
||||
"other-types": {},
|
||||
"package": "gst-plugin-togglerecord",
|
||||
"source": "gst-plugin-togglerecord",
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
[package]
|
||||
name = "gst-plugin-file"
|
||||
version = "0.10.0-alpha.1"
|
||||
version = "0.10.11"
|
||||
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
|
||||
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "GStreamer Rust File Source/Sink Plugin"
|
||||
edition = "2021"
|
||||
rust-version = "1.63"
|
||||
rust-version = "1.64"
|
||||
|
||||
[dependencies]
|
||||
url = "2"
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
once_cell = "1.0"
|
||||
|
||||
[lib]
|
||||
|
@ -20,7 +20,7 @@ crate-type = ["cdylib", "rlib"]
|
|||
path = "src/lib.rs"
|
||||
|
||||
[build-dependencies]
|
||||
gst-plugin-version-helper = { path="../../version-helper" }
|
||||
gst-plugin-version-helper = { path="../../version-helper", version = "0.7" }
|
||||
|
||||
[features]
|
||||
static = []
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-APACHE
|
201
generic/file/LICENSE-APACHE
Normal file
201
generic/file/LICENSE-APACHE
Normal file
|
@ -0,0 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-MIT
|
23
generic/file/LICENSE-MIT
Normal file
23
generic/file/LICENSE-MIT
Normal file
|
@ -0,0 +1,23 @@
|
|||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
|
@ -38,15 +38,14 @@ impl Default for Settings {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
enum State {
|
||||
#[default]
|
||||
Stopped,
|
||||
Started { file: File, position: u64 },
|
||||
}
|
||||
|
||||
impl Default for State {
|
||||
fn default() -> State {
|
||||
State::Stopped
|
||||
}
|
||||
Started {
|
||||
file: File,
|
||||
position: u64,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
|
|
@ -38,15 +38,14 @@ impl Default for Settings {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
enum State {
|
||||
#[default]
|
||||
Stopped,
|
||||
Started { file: File, position: u64 },
|
||||
}
|
||||
|
||||
impl Default for State {
|
||||
fn default() -> State {
|
||||
State::Stopped
|
||||
}
|
||||
Started {
|
||||
file: File,
|
||||
position: u64,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
[package]
|
||||
name = "gst-plugin-sodium"
|
||||
version = "0.10.0-alpha.1"
|
||||
version = "0.10.11"
|
||||
authors = ["Jordan Petridis <jordan@centricular.com>"]
|
||||
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
|
||||
description = "GStreamer plugin for libsodium-based file encryption and decryption"
|
||||
license = "MIT"
|
||||
edition = "2021"
|
||||
rust-version = "1.63"
|
||||
rust-version = "1.64"
|
||||
|
||||
[dependencies]
|
||||
gst = { package="gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst = { package="gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
sodiumoxide = "0.2.1"
|
||||
once_cell = "1.3.0"
|
||||
hex = "0.4"
|
||||
|
@ -27,10 +27,14 @@ rand = "0.8"
|
|||
|
||||
[dev-dependencies.gst-check]
|
||||
git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs"
|
||||
branch = "0.20"
|
||||
version = "0.20"
|
||||
package="gstreamer-check"
|
||||
|
||||
[dev-dependencies.gst-app]
|
||||
git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs"
|
||||
branch = "0.20"
|
||||
version = "0.20"
|
||||
package="gstreamer-app"
|
||||
|
||||
[lib]
|
||||
|
@ -54,7 +58,7 @@ path = "examples/decrypt_example.rs"
|
|||
required-features = ["serde", "serde_json", "clap"]
|
||||
|
||||
[build-dependencies]
|
||||
gst-plugin-version-helper = { path="../../version-helper" }
|
||||
gst-plugin-version-helper = { path="../../version-helper", version = "0.7" }
|
||||
|
||||
[features]
|
||||
static = []
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-MIT
|
23
generic/sodium/LICENSE-MIT
Normal file
23
generic/sodium/LICENSE-MIT
Normal file
|
@ -0,0 +1,23 @@
|
|||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
|
@ -1,12 +1,12 @@
|
|||
[package]
|
||||
name = "gst-plugin-threadshare"
|
||||
version = "0.10.0-alpha.1"
|
||||
version = "0.10.11"
|
||||
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
|
||||
license = "LGPL-2.1-or-later"
|
||||
description = "GStreamer Threadshare Plugin"
|
||||
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
|
||||
edition = "2021"
|
||||
rust-version = "1.63"
|
||||
rust-version = "1.64"
|
||||
|
||||
[dependencies]
|
||||
async-task = "4.3.0"
|
||||
|
@ -14,17 +14,17 @@ concurrent-queue = "2"
|
|||
flume = "0.10.13"
|
||||
futures = "0.3.21"
|
||||
libc = "0.2"
|
||||
gio = { git = "https://github.com/gtk-rs/gtk-rs-core" }
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-net = { package = "gstreamer-net", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-rtp = { package = "gstreamer-rtp", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gio = { git = "https://github.com/gtk-rs/gtk-rs-core", branch = "0.17", version = "0.17" }
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-net = { package = "gstreamer-net", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-rtp = { package = "gstreamer-rtp", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
once_cell = "1"
|
||||
pin-project-lite = "0.2.0"
|
||||
polling = "2.2.0"
|
||||
rand = "0.8"
|
||||
slab = "0.4.7"
|
||||
socket2 = {features = ["all"], version = "0.4"}
|
||||
socket2 = {features = ["all"], version = "0.5"}
|
||||
waker-fn = "1.1"
|
||||
|
||||
# Used by examples
|
||||
|
@ -34,8 +34,8 @@ clap = { version = "4", features = ["derive"], optional = true }
|
|||
winapi = { version = "0.3.9", features = ["winsock2", "processthreadsapi"] }
|
||||
|
||||
[dev-dependencies]
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-app = { package = "gstreamer-app", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-app = { package = "gstreamer-app", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
|
||||
[lib]
|
||||
name = "gstthreadshare"
|
||||
|
@ -59,7 +59,7 @@ name = "ts-standalone"
|
|||
path = "examples/standalone/main.rs"
|
||||
|
||||
[build-dependencies]
|
||||
gst-plugin-version-helper = { path="../../version-helper" }
|
||||
gst-plugin-version-helper = { path="../../version-helper", version = "0.7" }
|
||||
cc = "1.0.38"
|
||||
pkg-config = "0.3.15"
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-LGPLv2
|
502
generic/threadshare/LICENSE-LGPLv2
Normal file
502
generic/threadshare/LICENSE-LGPLv2
Normal file
|
@ -0,0 +1,502 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
|
@ -106,7 +106,6 @@ fn main() {
|
|||
|
||||
let bus = pipeline.bus().unwrap();
|
||||
let terminated_count = Arc::new(AtomicU32::new(0));
|
||||
let pipeline_clone = pipeline.clone();
|
||||
let l_clone = l.clone();
|
||||
bus.add_watch(move |_, msg| {
|
||||
use gst::MessageView;
|
||||
|
@ -162,11 +161,11 @@ fn main() {
|
|||
|
||||
gst::info!(CAT, "Switching to Ready");
|
||||
let stop = Instant::now();
|
||||
pipeline_clone.set_state(gst::State::Ready).unwrap();
|
||||
pipeline.set_state(gst::State::Ready).unwrap();
|
||||
gst::info!(CAT, "Switching to Ready took {:.2?}", stop.elapsed());
|
||||
|
||||
gst::info!(CAT, "Shutting down");
|
||||
let stop = Instant::now();
|
||||
pipeline_clone.set_state(gst::State::Null).unwrap();
|
||||
pipeline.set_state(gst::State::Null).unwrap();
|
||||
gst::info!(CAT, "Shutting down took {:.2?}", stop.elapsed());
|
||||
}
|
||||
|
|
|
@ -57,27 +57,27 @@ pub const RTP_JITTER_BUFFER_MODE_BUFFER: RTPJitterBufferMode = 2;
|
|||
pub const RTP_JITTER_BUFFER_MODE_SYNCED: RTPJitterBufferMode = 4;
|
||||
|
||||
extern "C" {
|
||||
pub fn rtp_jitter_buffer_new() -> *mut RTPJitterBuffer;
|
||||
pub fn rtp_jitter_buffer_get_type() -> GType;
|
||||
pub fn ts_rtp_jitter_buffer_new() -> *mut RTPJitterBuffer;
|
||||
pub fn ts_rtp_jitter_buffer_get_type() -> GType;
|
||||
#[allow(dead_code)]
|
||||
pub fn rtp_jitter_buffer_get_mode(jbuf: *mut RTPJitterBuffer) -> RTPJitterBufferMode;
|
||||
pub fn ts_rtp_jitter_buffer_get_mode(jbuf: *mut RTPJitterBuffer) -> RTPJitterBufferMode;
|
||||
#[allow(dead_code)]
|
||||
pub fn rtp_jitter_buffer_set_mode(jbuf: *mut RTPJitterBuffer, mode: RTPJitterBufferMode);
|
||||
pub fn ts_rtp_jitter_buffer_set_mode(jbuf: *mut RTPJitterBuffer, mode: RTPJitterBufferMode);
|
||||
#[allow(dead_code)]
|
||||
pub fn rtp_jitter_buffer_get_delay(jbuf: *mut RTPJitterBuffer) -> GstClockTime;
|
||||
pub fn rtp_jitter_buffer_set_delay(jbuf: *mut RTPJitterBuffer, delay: GstClockTime);
|
||||
pub fn rtp_jitter_buffer_set_clock_rate(jbuf: *mut RTPJitterBuffer, clock_rate: c_uint);
|
||||
pub fn ts_rtp_jitter_buffer_get_delay(jbuf: *mut RTPJitterBuffer) -> GstClockTime;
|
||||
pub fn ts_rtp_jitter_buffer_set_delay(jbuf: *mut RTPJitterBuffer, delay: GstClockTime);
|
||||
pub fn ts_rtp_jitter_buffer_set_clock_rate(jbuf: *mut RTPJitterBuffer, clock_rate: c_uint);
|
||||
#[allow(dead_code)]
|
||||
pub fn rtp_jitter_buffer_get_clock_rate(jbuf: *mut RTPJitterBuffer) -> c_uint;
|
||||
pub fn rtp_jitter_buffer_reset_skew(jbuf: *mut RTPJitterBuffer);
|
||||
pub fn ts_rtp_jitter_buffer_get_clock_rate(jbuf: *mut RTPJitterBuffer) -> c_uint;
|
||||
pub fn ts_rtp_jitter_buffer_reset_skew(jbuf: *mut RTPJitterBuffer);
|
||||
|
||||
pub fn rtp_jitter_buffer_flush(jbuf: *mut RTPJitterBuffer, free_func: glib::ffi::GFunc);
|
||||
pub fn rtp_jitter_buffer_find_earliest(
|
||||
pub fn ts_rtp_jitter_buffer_flush(jbuf: *mut RTPJitterBuffer, free_func: glib::ffi::GFunc);
|
||||
pub fn ts_rtp_jitter_buffer_find_earliest(
|
||||
jbuf: *mut RTPJitterBuffer,
|
||||
pts: *mut GstClockTime,
|
||||
seqnum: *mut c_uint,
|
||||
);
|
||||
pub fn rtp_jitter_buffer_calculate_pts(
|
||||
pub fn ts_rtp_jitter_buffer_calculate_pts(
|
||||
jbuf: *mut RTPJitterBuffer,
|
||||
dts: GstClockTime,
|
||||
estimated_dts: gboolean,
|
||||
|
@ -86,30 +86,30 @@ extern "C" {
|
|||
gap: c_int,
|
||||
is_rtx: gboolean,
|
||||
) -> GstClockTime;
|
||||
pub fn rtp_jitter_buffer_insert(
|
||||
pub fn ts_rtp_jitter_buffer_insert(
|
||||
jbuf: *mut RTPJitterBuffer,
|
||||
item: *mut RTPJitterBufferItem,
|
||||
head: *mut gboolean,
|
||||
percent: *mut c_int,
|
||||
) -> gboolean;
|
||||
pub fn rtp_jitter_buffer_pop(
|
||||
pub fn ts_rtp_jitter_buffer_pop(
|
||||
jbuf: *mut RTPJitterBuffer,
|
||||
percent: *mut c_int,
|
||||
) -> *mut RTPJitterBufferItem;
|
||||
pub fn rtp_jitter_buffer_peek(jbuf: *mut RTPJitterBuffer) -> *mut RTPJitterBufferItem;
|
||||
pub fn ts_rtp_jitter_buffer_peek(jbuf: *mut RTPJitterBuffer) -> *mut RTPJitterBufferItem;
|
||||
|
||||
pub fn gst_rtp_packet_rate_ctx_reset(ctx: *mut RTPPacketRateCtx, clock_rate: c_int);
|
||||
pub fn gst_rtp_packet_rate_ctx_update(
|
||||
pub fn ts_gst_rtp_packet_rate_ctx_reset(ctx: *mut RTPPacketRateCtx, clock_rate: c_int);
|
||||
pub fn ts_gst_rtp_packet_rate_ctx_update(
|
||||
ctx: *mut RTPPacketRateCtx,
|
||||
seqnum: c_ushort,
|
||||
ts: c_uint,
|
||||
) -> c_uint;
|
||||
pub fn gst_rtp_packet_rate_ctx_get_max_dropout(
|
||||
pub fn ts_gst_rtp_packet_rate_ctx_get_max_dropout(
|
||||
ctx: *mut RTPPacketRateCtx,
|
||||
time_ms: c_int,
|
||||
) -> c_uint;
|
||||
#[allow(dead_code)]
|
||||
pub fn gst_rtp_packet_rate_ctx_get_max_misorder(
|
||||
pub fn ts_gst_rtp_packet_rate_ctx_get_max_misorder(
|
||||
ctx: *mut RTPPacketRateCtx,
|
||||
time_ms: c_int,
|
||||
) -> c_uint;
|
||||
|
|
|
@ -32,7 +32,7 @@ glib::wrapper! {
|
|||
pub struct RTPJitterBuffer(Object<ffi::RTPJitterBuffer>);
|
||||
|
||||
match fn {
|
||||
type_ => || ffi::rtp_jitter_buffer_get_type(),
|
||||
type_ => || ffi::ts_rtp_jitter_buffer_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -180,25 +180,25 @@ impl RTPPacketRateCtx {
|
|||
pub fn new() -> RTPPacketRateCtx {
|
||||
unsafe {
|
||||
let mut ptr = std::mem::MaybeUninit::uninit();
|
||||
ffi::gst_rtp_packet_rate_ctx_reset(ptr.as_mut_ptr(), -1);
|
||||
ffi::ts_gst_rtp_packet_rate_ctx_reset(ptr.as_mut_ptr(), -1);
|
||||
RTPPacketRateCtx(Box::new(ptr.assume_init()))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn reset(&mut self, clock_rate: i32) {
|
||||
unsafe { ffi::gst_rtp_packet_rate_ctx_reset(&mut *self.0, clock_rate) }
|
||||
unsafe { ffi::ts_gst_rtp_packet_rate_ctx_reset(&mut *self.0, clock_rate) }
|
||||
}
|
||||
|
||||
pub fn update(&mut self, seqnum: u16, ts: u32) -> u32 {
|
||||
unsafe { ffi::gst_rtp_packet_rate_ctx_update(&mut *self.0, seqnum, ts) }
|
||||
unsafe { ffi::ts_gst_rtp_packet_rate_ctx_update(&mut *self.0, seqnum, ts) }
|
||||
}
|
||||
|
||||
pub fn max_dropout(&mut self, time_ms: i32) -> u32 {
|
||||
unsafe { ffi::gst_rtp_packet_rate_ctx_get_max_dropout(&mut *self.0, time_ms) }
|
||||
unsafe { ffi::ts_gst_rtp_packet_rate_ctx_get_max_dropout(&mut *self.0, time_ms) }
|
||||
}
|
||||
|
||||
pub fn max_misorder(&mut self, time_ms: i32) -> u32 {
|
||||
unsafe { ffi::gst_rtp_packet_rate_ctx_get_max_misorder(&mut *self.0, time_ms) }
|
||||
unsafe { ffi::ts_gst_rtp_packet_rate_ctx_get_max_misorder(&mut *self.0, time_ms) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -219,38 +219,38 @@ pub enum RTPJitterBufferMode {
|
|||
|
||||
impl RTPJitterBuffer {
|
||||
pub fn new() -> RTPJitterBuffer {
|
||||
unsafe { from_glib_full(ffi::rtp_jitter_buffer_new()) }
|
||||
unsafe { from_glib_full(ffi::ts_rtp_jitter_buffer_new()) }
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn mode(&self) -> RTPJitterBufferMode {
|
||||
unsafe { from_glib(ffi::rtp_jitter_buffer_get_mode(self.to_glib_none().0)) }
|
||||
unsafe { from_glib(ffi::ts_rtp_jitter_buffer_get_mode(self.to_glib_none().0)) }
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn set_mode(&self, mode: RTPJitterBufferMode) {
|
||||
unsafe { ffi::rtp_jitter_buffer_set_mode(self.to_glib_none().0, mode.into_glib()) }
|
||||
unsafe { ffi::ts_rtp_jitter_buffer_set_mode(self.to_glib_none().0, mode.into_glib()) }
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn delay(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
try_from_glib(ffi::rtp_jitter_buffer_get_delay(self.to_glib_none().0))
|
||||
try_from_glib(ffi::ts_rtp_jitter_buffer_get_delay(self.to_glib_none().0))
|
||||
.expect("undefined delay")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_delay(&self, delay: gst::ClockTime) {
|
||||
unsafe { ffi::rtp_jitter_buffer_set_delay(self.to_glib_none().0, delay.into_glib()) }
|
||||
unsafe { ffi::ts_rtp_jitter_buffer_set_delay(self.to_glib_none().0, delay.into_glib()) }
|
||||
}
|
||||
|
||||
pub fn set_clock_rate(&self, clock_rate: u32) {
|
||||
unsafe { ffi::rtp_jitter_buffer_set_clock_rate(self.to_glib_none().0, clock_rate) }
|
||||
unsafe { ffi::ts_rtp_jitter_buffer_set_clock_rate(self.to_glib_none().0, clock_rate) }
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn clock_rate(&self) -> u32 {
|
||||
unsafe { ffi::rtp_jitter_buffer_get_clock_rate(self.to_glib_none().0) }
|
||||
unsafe { ffi::ts_rtp_jitter_buffer_get_clock_rate(self.to_glib_none().0) }
|
||||
}
|
||||
|
||||
pub fn calculate_pts(
|
||||
|
@ -263,7 +263,7 @@ impl RTPJitterBuffer {
|
|||
is_rtx: bool,
|
||||
) -> Option<gst::ClockTime> {
|
||||
unsafe {
|
||||
from_glib(ffi::rtp_jitter_buffer_calculate_pts(
|
||||
from_glib(ffi::ts_rtp_jitter_buffer_calculate_pts(
|
||||
self.to_glib_none().0,
|
||||
dts.into().into_glib(),
|
||||
estimated_dts.into_glib(),
|
||||
|
@ -280,7 +280,7 @@ impl RTPJitterBuffer {
|
|||
let mut head = mem::MaybeUninit::uninit();
|
||||
let mut percent = mem::MaybeUninit::uninit();
|
||||
let ptr = item.0.take().expect("Invalid wrapper");
|
||||
let ret: bool = from_glib(ffi::rtp_jitter_buffer_insert(
|
||||
let ret: bool = from_glib(ffi::ts_rtp_jitter_buffer_insert(
|
||||
self.to_glib_none().0,
|
||||
ptr.as_ptr(),
|
||||
head.as_mut_ptr(),
|
||||
|
@ -298,7 +298,7 @@ impl RTPJitterBuffer {
|
|||
let mut pts = mem::MaybeUninit::uninit();
|
||||
let mut seqnum = mem::MaybeUninit::uninit();
|
||||
|
||||
ffi::rtp_jitter_buffer_find_earliest(
|
||||
ffi::ts_rtp_jitter_buffer_find_earliest(
|
||||
self.to_glib_none().0,
|
||||
pts.as_mut_ptr(),
|
||||
seqnum.as_mut_ptr(),
|
||||
|
@ -319,7 +319,7 @@ impl RTPJitterBuffer {
|
|||
pub fn pop(&self) -> (Option<RTPJitterBufferItem>, i32) {
|
||||
unsafe {
|
||||
let mut percent = mem::MaybeUninit::uninit();
|
||||
let item = ffi::rtp_jitter_buffer_pop(self.to_glib_none().0, percent.as_mut_ptr());
|
||||
let item = ffi::ts_rtp_jitter_buffer_pop(self.to_glib_none().0, percent.as_mut_ptr());
|
||||
|
||||
(
|
||||
if item.is_null() {
|
||||
|
@ -334,7 +334,7 @@ impl RTPJitterBuffer {
|
|||
|
||||
pub fn peek(&self) -> (Option<gst::ClockTime>, Option<u16>) {
|
||||
unsafe {
|
||||
let item = ffi::rtp_jitter_buffer_peek(self.to_glib_none().0);
|
||||
let item = ffi::ts_rtp_jitter_buffer_peek(self.to_glib_none().0);
|
||||
if item.is_null() {
|
||||
(None, None)
|
||||
} else {
|
||||
|
@ -356,12 +356,12 @@ impl RTPJitterBuffer {
|
|||
}
|
||||
|
||||
unsafe {
|
||||
ffi::rtp_jitter_buffer_flush(self.to_glib_none().0, Some(free_item));
|
||||
ffi::ts_rtp_jitter_buffer_flush(self.to_glib_none().0, Some(free_item));
|
||||
}
|
||||
}
|
||||
|
||||
pub fn reset_skew(&self) {
|
||||
unsafe { ffi::rtp_jitter_buffer_reset_skew(self.to_glib_none().0) }
|
||||
unsafe { ffi::ts_rtp_jitter_buffer_reset_skew(self.to_glib_none().0) }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,10 +42,10 @@ enum
|
|||
};
|
||||
|
||||
/* GObject vmethods */
|
||||
static void rtp_jitter_buffer_finalize (GObject * object);
|
||||
static void ts_rtp_jitter_buffer_finalize (GObject * object);
|
||||
|
||||
GType
|
||||
rtp_jitter_buffer_mode_get_type (void)
|
||||
ts_rtp_jitter_buffer_mode_get_type (void)
|
||||
{
|
||||
static GType jitter_buffer_mode_type = 0;
|
||||
static const GEnumValue jitter_buffer_modes[] = {
|
||||
|
@ -67,36 +67,36 @@ rtp_jitter_buffer_mode_get_type (void)
|
|||
|
||||
/* static guint rtp_jitter_buffer_signals[LAST_SIGNAL] = { 0 }; */
|
||||
|
||||
G_DEFINE_TYPE (RTPJitterBuffer, rtp_jitter_buffer, G_TYPE_OBJECT);
|
||||
G_DEFINE_TYPE (TsRTPJitterBuffer, ts_rtp_jitter_buffer, G_TYPE_OBJECT);
|
||||
|
||||
static void
|
||||
rtp_jitter_buffer_class_init (RTPJitterBufferClass * klass)
|
||||
ts_rtp_jitter_buffer_class_init (TsRTPJitterBufferClass * klass)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
|
||||
gobject_class = (GObjectClass *) klass;
|
||||
|
||||
gobject_class->finalize = rtp_jitter_buffer_finalize;
|
||||
gobject_class->finalize = ts_rtp_jitter_buffer_finalize;
|
||||
|
||||
GST_DEBUG_CATEGORY_INIT (rtp_jitter_buffer_debug, "rtpjitterbuffer", 0,
|
||||
"RTP Jitter Buffer");
|
||||
}
|
||||
|
||||
static void
|
||||
rtp_jitter_buffer_init (RTPJitterBuffer * jbuf)
|
||||
ts_rtp_jitter_buffer_init (TsRTPJitterBuffer * jbuf)
|
||||
{
|
||||
g_mutex_init (&jbuf->clock_lock);
|
||||
|
||||
jbuf->packets = g_queue_new ();
|
||||
jbuf->mode = RTP_JITTER_BUFFER_MODE_SLAVE;
|
||||
|
||||
rtp_jitter_buffer_reset_skew (jbuf);
|
||||
ts_rtp_jitter_buffer_reset_skew (jbuf);
|
||||
}
|
||||
|
||||
static void
|
||||
rtp_jitter_buffer_finalize (GObject * object)
|
||||
ts_rtp_jitter_buffer_finalize (GObject * object)
|
||||
{
|
||||
RTPJitterBuffer *jbuf;
|
||||
TsRTPJitterBuffer *jbuf;
|
||||
RTPJitterBufferItem *item;
|
||||
|
||||
jbuf = RTP_JITTER_BUFFER_CAST (object);
|
||||
|
@ -127,7 +127,7 @@ rtp_jitter_buffer_finalize (GObject * object)
|
|||
|
||||
g_mutex_clear (&jbuf->clock_lock);
|
||||
|
||||
G_OBJECT_CLASS (rtp_jitter_buffer_parent_class)->finalize (object);
|
||||
G_OBJECT_CLASS (ts_rtp_jitter_buffer_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -137,10 +137,10 @@ rtp_jitter_buffer_finalize (GObject * object)
|
|||
*
|
||||
* Returns: a new #RTPJitterBuffer. Use g_object_unref() after usage.
|
||||
*/
|
||||
RTPJitterBuffer *
|
||||
rtp_jitter_buffer_new (void)
|
||||
TsRTPJitterBuffer *
|
||||
ts_rtp_jitter_buffer_new (void)
|
||||
{
|
||||
RTPJitterBuffer *jbuf;
|
||||
TsRTPJitterBuffer *jbuf;
|
||||
|
||||
jbuf = g_object_new (RTP_TYPE_JITTER_BUFFER, NULL);
|
||||
|
||||
|
@ -156,7 +156,7 @@ rtp_jitter_buffer_new (void)
|
|||
* Returns: the current jitterbuffer mode.
|
||||
*/
|
||||
RTPJitterBufferMode
|
||||
rtp_jitter_buffer_get_mode (RTPJitterBuffer * jbuf)
|
||||
ts_rtp_jitter_buffer_get_mode (TsRTPJitterBuffer * jbuf)
|
||||
{
|
||||
return jbuf->mode;
|
||||
}
|
||||
|
@ -169,20 +169,20 @@ rtp_jitter_buffer_get_mode (RTPJitterBuffer * jbuf)
|
|||
* Set the buffering and clock slaving algorithm used in the @jbuf.
|
||||
*/
|
||||
void
|
||||
rtp_jitter_buffer_set_mode (RTPJitterBuffer * jbuf, RTPJitterBufferMode mode)
|
||||
ts_rtp_jitter_buffer_set_mode (TsRTPJitterBuffer * jbuf, RTPJitterBufferMode mode)
|
||||
{
|
||||
jbuf->mode = mode;
|
||||
}
|
||||
|
||||
GstClockTime
|
||||
rtp_jitter_buffer_get_delay (RTPJitterBuffer * jbuf)
|
||||
ts_rtp_jitter_buffer_get_delay (RTPJitterBuffer * jbuf)
|
||||
{
|
||||
g_print ("%p getting delay (%" G_GUINT64_FORMAT ")\n", jbuf, jbuf->delay);
|
||||
return jbuf->delay;
|
||||
}
|
||||
|
||||
void
|
||||
rtp_jitter_buffer_set_delay (RTPJitterBuffer * jbuf, GstClockTime delay)
|
||||
ts_rtp_jitter_buffer_set_delay (TsRTPJitterBuffer * jbuf, GstClockTime delay)
|
||||
{
|
||||
jbuf->delay = delay;
|
||||
jbuf->low_level = (delay * 15) / 100;
|
||||
|
@ -203,13 +203,13 @@ rtp_jitter_buffer_set_delay (RTPJitterBuffer * jbuf, GstClockTime delay)
|
|||
* Set the clock rate in the jitterbuffer.
|
||||
*/
|
||||
void
|
||||
rtp_jitter_buffer_set_clock_rate (RTPJitterBuffer * jbuf, guint32 clock_rate)
|
||||
ts_rtp_jitter_buffer_set_clock_rate (TsRTPJitterBuffer * jbuf, guint32 clock_rate)
|
||||
{
|
||||
if (jbuf->clock_rate != clock_rate) {
|
||||
GST_DEBUG ("Clock rate changed from %" G_GUINT32_FORMAT " to %"
|
||||
G_GUINT32_FORMAT, jbuf->clock_rate, clock_rate);
|
||||
jbuf->clock_rate = clock_rate;
|
||||
rtp_jitter_buffer_reset_skew (jbuf);
|
||||
ts_rtp_jitter_buffer_reset_skew (jbuf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,7 @@ rtp_jitter_buffer_set_clock_rate (RTPJitterBuffer * jbuf, guint32 clock_rate)
|
|||
* Returns: the current clock-rate
|
||||
*/
|
||||
guint32
|
||||
rtp_jitter_buffer_get_clock_rate (RTPJitterBuffer * jbuf)
|
||||
ts_rtp_jitter_buffer_get_clock_rate (RTPJitterBuffer * jbuf)
|
||||
{
|
||||
return jbuf->clock_rate;
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ media_clock_synced_cb (GstClock * clock G_GNUC_UNUSED,
|
|||
*
|
||||
*/
|
||||
void
|
||||
rtp_jitter_buffer_set_media_clock (RTPJitterBuffer * jbuf, GstClock * clock,
|
||||
ts_rtp_jitter_buffer_set_media_clock (TsRTPJitterBuffer * jbuf, GstClock * clock,
|
||||
guint64 clock_offset)
|
||||
{
|
||||
g_mutex_lock (&jbuf->clock_lock);
|
||||
|
@ -295,7 +295,7 @@ rtp_jitter_buffer_set_media_clock (RTPJitterBuffer * jbuf, GstClock * clock,
|
|||
*
|
||||
*/
|
||||
void
|
||||
rtp_jitter_buffer_set_pipeline_clock (RTPJitterBuffer * jbuf, GstClock * clock)
|
||||
ts_rtp_jitter_buffer_set_pipeline_clock (TsRTPJitterBuffer * jbuf, GstClock * clock)
|
||||
{
|
||||
g_mutex_lock (&jbuf->clock_lock);
|
||||
if (jbuf->pipeline_clock)
|
||||
|
@ -319,13 +319,13 @@ rtp_jitter_buffer_set_pipeline_clock (RTPJitterBuffer * jbuf, GstClock * clock)
|
|||
}
|
||||
|
||||
gboolean
|
||||
rtp_jitter_buffer_get_rfc7273_sync (RTPJitterBuffer * jbuf)
|
||||
ts_rtp_jitter_buffer_get_rfc7273_sync (RTPJitterBuffer * jbuf)
|
||||
{
|
||||
return jbuf->rfc7273_sync;
|
||||
}
|
||||
|
||||
void
|
||||
rtp_jitter_buffer_set_rfc7273_sync (RTPJitterBuffer * jbuf,
|
||||
ts_rtp_jitter_buffer_set_rfc7273_sync (TsRTPJitterBuffer * jbuf,
|
||||
gboolean rfc7273_sync)
|
||||
{
|
||||
jbuf->rfc7273_sync = rfc7273_sync;
|
||||
|
@ -338,7 +338,7 @@ rtp_jitter_buffer_set_rfc7273_sync (RTPJitterBuffer * jbuf,
|
|||
* Reset the skew calculations in @jbuf.
|
||||
*/
|
||||
void
|
||||
rtp_jitter_buffer_reset_skew (RTPJitterBuffer * jbuf)
|
||||
ts_rtp_jitter_buffer_reset_skew (TsRTPJitterBuffer * jbuf)
|
||||
{
|
||||
jbuf->base_time = -1;
|
||||
jbuf->base_rtptime = -1;
|
||||
|
@ -365,13 +365,13 @@ rtp_jitter_buffer_reset_skew (RTPJitterBuffer * jbuf)
|
|||
* Enable or disable buffering on @jbuf.
|
||||
*/
|
||||
void
|
||||
rtp_jitter_buffer_disable_buffering (RTPJitterBuffer * jbuf, gboolean disabled)
|
||||
ts_rtp_jitter_buffer_disable_buffering (TsRTPJitterBuffer * jbuf, gboolean disabled)
|
||||
{
|
||||
jbuf->buffering_disabled = disabled;
|
||||
}
|
||||
|
||||
static void
|
||||
rtp_jitter_buffer_resync (RTPJitterBuffer * jbuf, GstClockTime time,
|
||||
ts_rtp_jitter_buffer_resync (TsRTPJitterBuffer * jbuf, GstClockTime time,
|
||||
GstClockTime gstrtptime, guint64 ext_rtptime, gboolean reset_skew)
|
||||
{
|
||||
jbuf->base_time = time;
|
||||
|
@ -438,7 +438,7 @@ get_buffer_level (RTPJitterBuffer * jbuf)
|
|||
}
|
||||
|
||||
static void
|
||||
update_buffer_level (RTPJitterBuffer * jbuf, gint * percent)
|
||||
update_buffer_level (TsRTPJitterBuffer * jbuf, gint * percent)
|
||||
{
|
||||
gboolean post = FALSE;
|
||||
guint64 level;
|
||||
|
@ -587,7 +587,7 @@ calculate_skew (RTPJitterBuffer * jbuf, guint64 ext_rtptime,
|
|||
if (ABS (delta - jbuf->skew) > GST_SECOND) {
|
||||
GST_WARNING ("delta - skew: %" GST_TIME_FORMAT " too big, reset skew",
|
||||
GST_TIME_ARGS (ABS (delta - jbuf->skew)));
|
||||
rtp_jitter_buffer_resync (jbuf, time, gstrtptime, ext_rtptime, TRUE);
|
||||
ts_rtp_jitter_buffer_resync (jbuf, time, gstrtptime, ext_rtptime, TRUE);
|
||||
send_diff = 0;
|
||||
delta = 0;
|
||||
gap = 0;
|
||||
|
@ -692,7 +692,7 @@ no_skew:
|
|||
}
|
||||
|
||||
static void
|
||||
queue_do_insert (RTPJitterBuffer * jbuf, GList * list, GList * item)
|
||||
queue_do_insert (TsRTPJitterBuffer * jbuf, GList * list, GList * item)
|
||||
{
|
||||
GQueue *queue = jbuf->packets;
|
||||
|
||||
|
@ -714,7 +714,7 @@ queue_do_insert (RTPJitterBuffer * jbuf, GList * list, GList * item)
|
|||
}
|
||||
|
||||
GstClockTime
|
||||
rtp_jitter_buffer_calculate_pts (RTPJitterBuffer * jbuf, GstClockTime dts,
|
||||
ts_rtp_jitter_buffer_calculate_pts (RTPJitterBuffer * jbuf, GstClockTime dts,
|
||||
gboolean estimated_dts, guint32 rtptime, GstClockTime base_time,
|
||||
gint gap, gboolean is_rtx)
|
||||
{
|
||||
|
@ -742,7 +742,7 @@ rtp_jitter_buffer_calculate_pts (RTPJitterBuffer * jbuf, GstClockTime dts,
|
|||
/* reset even if we don't have valid incoming time;
|
||||
* still better than producing possibly very bogus output timestamp */
|
||||
GST_WARNING ("rtp delta too big, reset skew");
|
||||
rtp_jitter_buffer_reset_skew (jbuf);
|
||||
ts_rtp_jitter_buffer_reset_skew (jbuf);
|
||||
} else {
|
||||
GST_WARNING ("rtp delta too big: ignore rtx packet");
|
||||
media_clock = NULL;
|
||||
|
@ -823,7 +823,7 @@ rtp_jitter_buffer_calculate_pts (RTPJitterBuffer * jbuf, GstClockTime dts,
|
|||
}
|
||||
GST_INFO ("resync to time %" GST_TIME_FORMAT ", rtptime %"
|
||||
GST_TIME_FORMAT, GST_TIME_ARGS (dts), GST_TIME_ARGS (gstrtptime));
|
||||
rtp_jitter_buffer_resync (jbuf, dts, gstrtptime, ext_rtptime, FALSE);
|
||||
ts_rtp_jitter_buffer_resync (jbuf, dts, gstrtptime, ext_rtptime, FALSE);
|
||||
}
|
||||
|
||||
GST_DEBUG ("extrtp %" G_GUINT64_FORMAT ", gstrtp %" GST_TIME_FORMAT ", base %"
|
||||
|
@ -973,7 +973,7 @@ rtp_jitter_buffer_calculate_pts (RTPJitterBuffer * jbuf, GstClockTime dts,
|
|||
GST_DEBUG ("out %" GST_TIME_FORMAT " + %" G_GUINT64_FORMAT " < time %"
|
||||
GST_TIME_FORMAT ", reset jitterbuffer and discard", GST_TIME_ARGS (pts),
|
||||
jbuf->delay, GST_TIME_ARGS (dts));
|
||||
rtp_jitter_buffer_reset_skew (jbuf);
|
||||
ts_rtp_jitter_buffer_reset_skew (jbuf);
|
||||
pts = GST_CLOCK_TIME_NONE;
|
||||
goto done;
|
||||
}
|
||||
|
@ -1009,7 +1009,7 @@ done:
|
|||
* Returns: %FALSE if a packet with the same number already existed.
|
||||
*/
|
||||
gboolean
|
||||
rtp_jitter_buffer_insert (RTPJitterBuffer * jbuf, RTPJitterBufferItem * item,
|
||||
ts_rtp_jitter_buffer_insert (RTPJitterBuffer * jbuf, RTPJitterBufferItem * item,
|
||||
gboolean * head, gint * percent)
|
||||
{
|
||||
GList *list, *event = NULL;
|
||||
|
@ -1102,7 +1102,7 @@ duplicate:
|
|||
* Returns: a #GstBuffer or %NULL when there was no packet in the queue.
|
||||
*/
|
||||
RTPJitterBufferItem *
|
||||
rtp_jitter_buffer_pop (RTPJitterBuffer * jbuf, gint * percent)
|
||||
ts_rtp_jitter_buffer_pop (TsRTPJitterBuffer * jbuf, gint * percent)
|
||||
{
|
||||
GList *item = NULL;
|
||||
GQueue *queue;
|
||||
|
@ -1142,7 +1142,7 @@ rtp_jitter_buffer_pop (RTPJitterBuffer * jbuf, gint * percent)
|
|||
* Returns: a #GstBuffer or %NULL when there was no packet in the queue.
|
||||
*/
|
||||
RTPJitterBufferItem *
|
||||
rtp_jitter_buffer_peek (RTPJitterBuffer * jbuf)
|
||||
ts_rtp_jitter_buffer_peek (TsRTPJitterBuffer * jbuf)
|
||||
{
|
||||
g_return_val_if_fail (jbuf != NULL, NULL);
|
||||
|
||||
|
@ -1158,7 +1158,7 @@ rtp_jitter_buffer_peek (RTPJitterBuffer * jbuf)
|
|||
* Flush all packets from the jitterbuffer.
|
||||
*/
|
||||
void
|
||||
rtp_jitter_buffer_flush (RTPJitterBuffer * jbuf, GFunc free_func,
|
||||
ts_rtp_jitter_buffer_flush (TsRTPJitterBuffer * jbuf, GFunc free_func,
|
||||
gpointer user_data)
|
||||
{
|
||||
GList *item;
|
||||
|
@ -1180,7 +1180,7 @@ rtp_jitter_buffer_flush (RTPJitterBuffer * jbuf, GFunc free_func,
|
|||
* Returns: the buffering state of @jbuf
|
||||
*/
|
||||
gboolean
|
||||
rtp_jitter_buffer_is_buffering (RTPJitterBuffer * jbuf)
|
||||
ts_rtp_jitter_buffer_is_buffering (RTPJitterBuffer * jbuf)
|
||||
{
|
||||
return jbuf->buffering && !jbuf->buffering_disabled;
|
||||
}
|
||||
|
@ -1193,7 +1193,7 @@ rtp_jitter_buffer_is_buffering (RTPJitterBuffer * jbuf)
|
|||
* Forces @jbuf to go into the buffering state.
|
||||
*/
|
||||
void
|
||||
rtp_jitter_buffer_set_buffering (RTPJitterBuffer * jbuf, gboolean buffering)
|
||||
ts_rtp_jitter_buffer_set_buffering (TsRTPJitterBuffer * jbuf, gboolean buffering)
|
||||
{
|
||||
jbuf->buffering = buffering;
|
||||
}
|
||||
|
@ -1207,7 +1207,7 @@ rtp_jitter_buffer_set_buffering (RTPJitterBuffer * jbuf, gboolean buffering)
|
|||
* Returns: the buffering percent
|
||||
*/
|
||||
gint
|
||||
rtp_jitter_buffer_get_percent (RTPJitterBuffer * jbuf)
|
||||
ts_rtp_jitter_buffer_get_percent (RTPJitterBuffer * jbuf)
|
||||
{
|
||||
gint percent;
|
||||
guint64 level;
|
||||
|
@ -1234,7 +1234,7 @@ rtp_jitter_buffer_get_percent (RTPJitterBuffer * jbuf)
|
|||
* Returns: The number of packets in @jbuf.
|
||||
*/
|
||||
guint
|
||||
rtp_jitter_buffer_num_packets (RTPJitterBuffer * jbuf)
|
||||
ts_rtp_jitter_buffer_num_packets (RTPJitterBuffer * jbuf)
|
||||
{
|
||||
g_return_val_if_fail (jbuf != NULL, 0);
|
||||
|
||||
|
@ -1251,7 +1251,7 @@ rtp_jitter_buffer_num_packets (RTPJitterBuffer * jbuf)
|
|||
* Returns: The difference expressed in the timestamp units of the packets.
|
||||
*/
|
||||
guint32
|
||||
rtp_jitter_buffer_get_ts_diff (RTPJitterBuffer * jbuf)
|
||||
ts_rtp_jitter_buffer_get_ts_diff (RTPJitterBuffer * jbuf)
|
||||
{
|
||||
guint64 high_ts, low_ts;
|
||||
RTPJitterBufferItem *high_buf, *low_buf;
|
||||
|
@ -1288,7 +1288,7 @@ rtp_jitter_buffer_get_ts_diff (RTPJitterBuffer * jbuf)
|
|||
* Returns: The difference expressed in seqnum.
|
||||
*/
|
||||
static guint16
|
||||
rtp_jitter_buffer_get_seqnum_diff (RTPJitterBuffer * jbuf)
|
||||
ts_rtp_jitter_buffer_get_seqnum_diff (RTPJitterBuffer * jbuf)
|
||||
{
|
||||
guint32 high_seqnum, low_seqnum;
|
||||
RTPJitterBufferItem *high_buf, *low_buf;
|
||||
|
@ -1338,7 +1338,7 @@ rtp_jitter_buffer_get_seqnum_diff (RTPJitterBuffer * jbuf)
|
|||
* @last_rtptime.
|
||||
*/
|
||||
void
|
||||
rtp_jitter_buffer_get_sync (RTPJitterBuffer * jbuf, guint64 * rtptime,
|
||||
ts_rtp_jitter_buffer_get_sync (TsRTPJitterBuffer * jbuf, guint64 * rtptime,
|
||||
guint64 * timestamp, guint32 * clock_rate, guint64 * last_rtptime)
|
||||
{
|
||||
if (rtptime)
|
||||
|
@ -1362,16 +1362,16 @@ rtp_jitter_buffer_get_sync (RTPJitterBuffer * jbuf, guint64 * rtptime,
|
|||
* Returns: %TRUE if the required number of consecutive packets was found.
|
||||
*/
|
||||
gboolean
|
||||
rtp_jitter_buffer_can_fast_start (RTPJitterBuffer * jbuf, gint num_packet)
|
||||
ts_rtp_jitter_buffer_can_fast_start (RTPJitterBuffer * jbuf, gint num_packet)
|
||||
{
|
||||
gboolean ret = TRUE;
|
||||
RTPJitterBufferItem *last_item = NULL, *item;
|
||||
gint i;
|
||||
|
||||
if (rtp_jitter_buffer_num_packets (jbuf) < (guint) num_packet)
|
||||
if (ts_rtp_jitter_buffer_num_packets (jbuf) < (guint) num_packet)
|
||||
return FALSE;
|
||||
|
||||
item = rtp_jitter_buffer_peek (jbuf);
|
||||
item = ts_rtp_jitter_buffer_peek (jbuf);
|
||||
for (i = 0; i < num_packet; i++) {
|
||||
if (G_LIKELY (last_item)) {
|
||||
guint16 expected_seqnum = last_item->seqnum + 1;
|
||||
|
@ -1390,14 +1390,14 @@ rtp_jitter_buffer_can_fast_start (RTPJitterBuffer * jbuf, gint num_packet)
|
|||
}
|
||||
|
||||
gboolean
|
||||
rtp_jitter_buffer_is_full (RTPJitterBuffer * jbuf)
|
||||
ts_rtp_jitter_buffer_is_full (RTPJitterBuffer * jbuf)
|
||||
{
|
||||
return rtp_jitter_buffer_get_seqnum_diff (jbuf) >= 32765 &&
|
||||
rtp_jitter_buffer_num_packets (jbuf) > 10000;
|
||||
return ts_rtp_jitter_buffer_get_seqnum_diff (jbuf) >= 32765 &&
|
||||
ts_rtp_jitter_buffer_num_packets (jbuf) > 10000;
|
||||
}
|
||||
|
||||
void
|
||||
rtp_jitter_buffer_find_earliest (RTPJitterBuffer * jbuf, GstClockTime * pts,
|
||||
ts_rtp_jitter_buffer_find_earliest (TsRTPJitterBuffer * jbuf, GstClockTime * pts,
|
||||
guint * seqnum)
|
||||
{
|
||||
GList *tmp;
|
||||
|
|
|
@ -23,16 +23,16 @@
|
|||
#include <gst/gst.h>
|
||||
#include <gst/rtp/gstrtcpbuffer.h>
|
||||
|
||||
typedef struct _RTPJitterBuffer RTPJitterBuffer;
|
||||
typedef struct _RTPJitterBufferClass RTPJitterBufferClass;
|
||||
typedef struct _RTPJitterBuffer TsRTPJitterBuffer;
|
||||
typedef struct _RTPJitterBufferClass TsRTPJitterBufferClass;
|
||||
typedef struct _RTPJitterBufferItem RTPJitterBufferItem;
|
||||
|
||||
#define RTP_TYPE_JITTER_BUFFER (rtp_jitter_buffer_get_type())
|
||||
#define RTP_JITTER_BUFFER(src) (G_TYPE_CHECK_INSTANCE_CAST((src),RTP_TYPE_JITTER_BUFFER,RTPJitterBuffer))
|
||||
#define RTP_JITTER_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),RTP_TYPE_JITTER_BUFFER,RTPJitterBufferClass))
|
||||
#define RTP_TYPE_JITTER_BUFFER (ts_rtp_jitter_buffer_get_type())
|
||||
#define RTP_JITTER_BUFFER(src) (G_TYPE_CHECK_INSTANCE_CAST((src),RTP_TYPE_JITTER_BUFFER,TsRTPJitterBuffer))
|
||||
#define RTP_JITTER_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),RTP_TYPE_JITTER_BUFFER,TsRTPJitterBufferClass))
|
||||
#define RTP_IS_JITTER_BUFFER(src) (G_TYPE_CHECK_INSTANCE_TYPE((src),RTP_TYPE_JITTER_BUFFER))
|
||||
#define RTP_IS_JITTER_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),RTP_TYPE_JITTER_BUFFER))
|
||||
#define RTP_JITTER_BUFFER_CAST(src) ((RTPJitterBuffer *)(src))
|
||||
#define RTP_JITTER_BUFFER_CAST(src) ((TsRTPJitterBuffer *)(src))
|
||||
|
||||
/**
|
||||
* RTPJitterBufferMode:
|
||||
|
@ -61,8 +61,8 @@ typedef enum {
|
|||
RTP_JITTER_BUFFER_MODE_LAST
|
||||
} RTPJitterBufferMode;
|
||||
|
||||
#define RTP_TYPE_JITTER_BUFFER_MODE (rtp_jitter_buffer_mode_get_type())
|
||||
GType rtp_jitter_buffer_mode_get_type (void);
|
||||
#define RTP_TYPE_JITTER_BUFFER_MODE (ts_rtp_jitter_buffer_mode_get_type())
|
||||
GType ts_rtp_jitter_buffer_mode_get_type (void);
|
||||
|
||||
#define RTP_JITTER_BUFFER_MAX_WINDOW 512
|
||||
/**
|
||||
|
@ -144,58 +144,58 @@ struct _RTPJitterBufferItem {
|
|||
guint rtptime;
|
||||
};
|
||||
|
||||
GType rtp_jitter_buffer_get_type (void);
|
||||
GType ts_rtp_jitter_buffer_get_type (void);
|
||||
|
||||
/* managing lifetime */
|
||||
RTPJitterBuffer* rtp_jitter_buffer_new (void);
|
||||
TsRTPJitterBuffer* ts_rtp_jitter_buffer_new (void);
|
||||
|
||||
RTPJitterBufferMode rtp_jitter_buffer_get_mode (RTPJitterBuffer *jbuf);
|
||||
void rtp_jitter_buffer_set_mode (RTPJitterBuffer *jbuf, RTPJitterBufferMode mode);
|
||||
RTPJitterBufferMode ts_rtp_jitter_buffer_get_mode (TsRTPJitterBuffer *jbuf);
|
||||
void ts_rtp_jitter_buffer_set_mode (TsRTPJitterBuffer *jbuf, RTPJitterBufferMode mode);
|
||||
|
||||
GstClockTime rtp_jitter_buffer_get_delay (RTPJitterBuffer *jbuf);
|
||||
void rtp_jitter_buffer_set_delay (RTPJitterBuffer *jbuf, GstClockTime delay);
|
||||
GstClockTime ts_rtp_jitter_buffer_get_delay (RTPJitterBuffer *jbuf);
|
||||
void ts_rtp_jitter_buffer_set_delay (TsRTPJitterBuffer *jbuf, GstClockTime delay);
|
||||
|
||||
void rtp_jitter_buffer_set_clock_rate (RTPJitterBuffer *jbuf, guint32 clock_rate);
|
||||
guint32 rtp_jitter_buffer_get_clock_rate (RTPJitterBuffer *jbuf);
|
||||
void ts_rtp_jitter_buffer_set_clock_rate (TsRTPJitterBuffer *jbuf, guint32 clock_rate);
|
||||
guint32 ts_rtp_jitter_buffer_get_clock_rate (RTPJitterBuffer *jbuf);
|
||||
|
||||
void rtp_jitter_buffer_set_media_clock (RTPJitterBuffer *jbuf, GstClock * clock, guint64 clock_offset);
|
||||
void rtp_jitter_buffer_set_pipeline_clock (RTPJitterBuffer *jbuf, GstClock * clock);
|
||||
void ts_rtp_jitter_buffer_set_media_clock (TsRTPJitterBuffer *jbuf, GstClock * clock, guint64 clock_offset);
|
||||
void ts_rtp_jitter_buffer_set_pipeline_clock (TsRTPJitterBuffer *jbuf, GstClock * clock);
|
||||
|
||||
gboolean rtp_jitter_buffer_get_rfc7273_sync (RTPJitterBuffer *jbuf);
|
||||
void rtp_jitter_buffer_set_rfc7273_sync (RTPJitterBuffer *jbuf, gboolean rfc7273_sync);
|
||||
gboolean ts_rtp_jitter_buffer_get_rfc7273_sync (RTPJitterBuffer *jbuf);
|
||||
void ts_rtp_jitter_buffer_set_rfc7273_sync (TsRTPJitterBuffer *jbuf, gboolean rfc7273_sync);
|
||||
|
||||
void rtp_jitter_buffer_reset_skew (RTPJitterBuffer *jbuf);
|
||||
void ts_rtp_jitter_buffer_reset_skew (TsRTPJitterBuffer *jbuf);
|
||||
|
||||
gboolean rtp_jitter_buffer_insert (RTPJitterBuffer *jbuf,
|
||||
RTPJitterBufferItem *item,
|
||||
gboolean *head, gint *percent);
|
||||
gboolean ts_rtp_jitter_buffer_insert (RTPJitterBuffer *jbuf,
|
||||
RTPJitterBufferItem *item,
|
||||
gboolean *head, gint *percent);
|
||||
|
||||
void rtp_jitter_buffer_disable_buffering (RTPJitterBuffer *jbuf, gboolean disabled);
|
||||
void ts_rtp_jitter_buffer_disable_buffering (TsRTPJitterBuffer *jbuf, gboolean disabled);
|
||||
|
||||
RTPJitterBufferItem * rtp_jitter_buffer_peek (RTPJitterBuffer *jbuf);
|
||||
RTPJitterBufferItem * rtp_jitter_buffer_pop (RTPJitterBuffer *jbuf, gint *percent);
|
||||
RTPJitterBufferItem * ts_rtp_jitter_buffer_peek (TsRTPJitterBuffer *jbuf);
|
||||
RTPJitterBufferItem * ts_rtp_jitter_buffer_pop (TsRTPJitterBuffer *jbuf, gint *percent);
|
||||
|
||||
void rtp_jitter_buffer_flush (RTPJitterBuffer *jbuf,
|
||||
GFunc free_func, gpointer user_data);
|
||||
void ts_rtp_jitter_buffer_flush (TsRTPJitterBuffer *jbuf,
|
||||
GFunc free_func, gpointer user_data);
|
||||
|
||||
gboolean rtp_jitter_buffer_is_buffering (RTPJitterBuffer * jbuf);
|
||||
void rtp_jitter_buffer_set_buffering (RTPJitterBuffer * jbuf, gboolean buffering);
|
||||
gint rtp_jitter_buffer_get_percent (RTPJitterBuffer * jbuf);
|
||||
gboolean ts_rtp_jitter_buffer_is_buffering (RTPJitterBuffer * jbuf);
|
||||
void ts_rtp_jitter_buffer_set_buffering (TsRTPJitterBuffer * jbuf, gboolean buffering);
|
||||
gint ts_rtp_jitter_buffer_get_percent (RTPJitterBuffer * jbuf);
|
||||
|
||||
guint rtp_jitter_buffer_num_packets (RTPJitterBuffer *jbuf);
|
||||
guint32 rtp_jitter_buffer_get_ts_diff (RTPJitterBuffer *jbuf);
|
||||
guint ts_rtp_jitter_buffer_num_packets (RTPJitterBuffer *jbuf);
|
||||
guint32 ts_rtp_jitter_buffer_get_ts_diff (RTPJitterBuffer *jbuf);
|
||||
|
||||
void rtp_jitter_buffer_get_sync (RTPJitterBuffer *jbuf, guint64 *rtptime,
|
||||
guint64 *timestamp, guint32 *clock_rate,
|
||||
guint64 *last_rtptime);
|
||||
void ts_rtp_jitter_buffer_get_sync (TsRTPJitterBuffer *jbuf, guint64 *rtptime,
|
||||
guint64 *timestamp, guint32 *clock_rate,
|
||||
guint64 *last_rtptime);
|
||||
|
||||
GstClockTime rtp_jitter_buffer_calculate_pts (RTPJitterBuffer * jbuf, GstClockTime dts, gboolean estimated_dts,
|
||||
guint32 rtptime, GstClockTime base_time, gint gap,
|
||||
gboolean is_rtx);
|
||||
GstClockTime ts_rtp_jitter_buffer_calculate_pts (RTPJitterBuffer * jbuf, GstClockTime dts, gboolean estimated_dts,
|
||||
guint32 rtptime, GstClockTime base_time, gint gap,
|
||||
gboolean is_rtx);
|
||||
|
||||
gboolean rtp_jitter_buffer_can_fast_start (RTPJitterBuffer * jbuf, gint num_packet);
|
||||
gboolean ts_rtp_jitter_buffer_can_fast_start (RTPJitterBuffer * jbuf, gint num_packet);
|
||||
|
||||
gboolean rtp_jitter_buffer_is_full (RTPJitterBuffer * jbuf);
|
||||
void rtp_jitter_buffer_find_earliest (RTPJitterBuffer * jbuf, GstClockTime *pts, guint * seqnum);
|
||||
gboolean ts_rtp_jitter_buffer_is_full (RTPJitterBuffer * jbuf);
|
||||
void ts_rtp_jitter_buffer_find_earliest (TsRTPJitterBuffer * jbuf, GstClockTime *pts, guint * seqnum);
|
||||
|
||||
#endif /* __RTP_JITTER_BUFFER_H__ */
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "rtpstats.h"
|
||||
|
||||
void
|
||||
gst_rtp_packet_rate_ctx_reset (RTPPacketRateCtx * ctx, gint32 clock_rate)
|
||||
ts_gst_rtp_packet_rate_ctx_reset (RTPPacketRateCtx * ctx, gint32 clock_rate)
|
||||
{
|
||||
ctx->clock_rate = clock_rate;
|
||||
ctx->probed = FALSE;
|
||||
|
@ -31,7 +31,7 @@ gst_rtp_packet_rate_ctx_reset (RTPPacketRateCtx * ctx, gint32 clock_rate)
|
|||
}
|
||||
|
||||
guint32
|
||||
gst_rtp_packet_rate_ctx_update (RTPPacketRateCtx * ctx, guint16 seqnum,
|
||||
ts_gst_rtp_packet_rate_ctx_update (RTPPacketRateCtx * ctx, guint16 seqnum,
|
||||
guint32 ts)
|
||||
{
|
||||
guint64 new_ts, diff_ts;
|
||||
|
@ -80,13 +80,13 @@ done:
|
|||
}
|
||||
|
||||
guint32
|
||||
gst_rtp_packet_rate_ctx_get (RTPPacketRateCtx * ctx)
|
||||
ts_gst_rtp_packet_rate_ctx_get (RTPPacketRateCtx * ctx)
|
||||
{
|
||||
return ctx->avg_packet_rate;
|
||||
}
|
||||
|
||||
guint32
|
||||
gst_rtp_packet_rate_ctx_get_max_dropout (RTPPacketRateCtx * ctx, gint32 time_ms)
|
||||
ts_gst_rtp_packet_rate_ctx_get_max_dropout (RTPPacketRateCtx * ctx, gint32 time_ms)
|
||||
{
|
||||
if (time_ms <= 0 || !ctx->probed || ctx->avg_packet_rate == G_MAXUINT32) {
|
||||
return RTP_DEF_DROPOUT;
|
||||
|
@ -96,7 +96,7 @@ gst_rtp_packet_rate_ctx_get_max_dropout (RTPPacketRateCtx * ctx, gint32 time_ms)
|
|||
}
|
||||
|
||||
guint32
|
||||
gst_rtp_packet_rate_ctx_get_max_misorder (RTPPacketRateCtx * ctx,
|
||||
ts_gst_rtp_packet_rate_ctx_get_max_misorder (RTPPacketRateCtx * ctx,
|
||||
gint32 time_ms)
|
||||
{
|
||||
if (time_ms <= 0 || !ctx->probed || ctx->avg_packet_rate == G_MAXUINT32) {
|
||||
|
@ -113,9 +113,9 @@ gst_rtp_packet_rate_ctx_get_max_misorder (RTPPacketRateCtx * ctx,
|
|||
* Initialize @stats with its default values.
|
||||
*/
|
||||
void
|
||||
rtp_stats_init_defaults (RTPSessionStats * stats)
|
||||
ts_rtp_stats_init_defaults (RTPSessionStats * stats)
|
||||
{
|
||||
rtp_stats_set_bandwidths (stats, -1, -1, -1, -1);
|
||||
ts_rtp_stats_set_bandwidths (stats, -1, -1, -1, -1);
|
||||
stats->min_interval = RTP_STATS_MIN_INTERVAL;
|
||||
stats->bye_timeout = RTP_STATS_BYE_TIMEOUT;
|
||||
stats->nacks_dropped = 0;
|
||||
|
@ -136,7 +136,7 @@ rtp_stats_init_defaults (RTPSessionStats * stats)
|
|||
* defaults.
|
||||
*/
|
||||
void
|
||||
rtp_stats_set_bandwidths (RTPSessionStats * stats, guint rtp_bw,
|
||||
ts_rtp_stats_set_bandwidths (RTPSessionStats * stats, guint rtp_bw,
|
||||
gdouble rtcp_bw, guint rs, guint rr)
|
||||
{
|
||||
GST_DEBUG ("recalc bandwidths: RTP %u, RTCP %f, RS %u, RR %u", rtp_bw,
|
||||
|
@ -217,7 +217,7 @@ rtp_stats_set_bandwidths (RTPSessionStats * stats, guint rtp_bw,
|
|||
* Returns: the RTCP interval.
|
||||
*/
|
||||
GstClockTime
|
||||
rtp_stats_calculate_rtcp_interval (RTPSessionStats * stats, gboolean we_send,
|
||||
ts_rtp_stats_calculate_rtcp_interval (RTPSessionStats * stats, gboolean we_send,
|
||||
GstRTPProfile profile, gboolean ptp, gboolean first)
|
||||
{
|
||||
gdouble members, senders, n;
|
||||
|
@ -296,7 +296,7 @@ rtp_stats_calculate_rtcp_interval (RTPSessionStats * stats, gboolean we_send,
|
|||
* Returns: the new RTCP interval.
|
||||
*/
|
||||
GstClockTime
|
||||
rtp_stats_add_rtcp_jitter (RTPSessionStats * stats G_GNUC_UNUSED,
|
||||
ts_rtp_stats_add_rtcp_jitter (RTPSessionStats * stats G_GNUC_UNUSED,
|
||||
GstClockTime interval)
|
||||
{
|
||||
gdouble temp;
|
||||
|
@ -323,7 +323,7 @@ rtp_stats_add_rtcp_jitter (RTPSessionStats * stats G_GNUC_UNUSED,
|
|||
* Returns: the BYE interval.
|
||||
*/
|
||||
GstClockTime
|
||||
rtp_stats_calculate_bye_interval (RTPSessionStats * stats)
|
||||
ts_rtp_stats_calculate_bye_interval (RTPSessionStats * stats)
|
||||
{
|
||||
gdouble members;
|
||||
gdouble avg_rtcp_size, rtcp_bw;
|
||||
|
@ -377,7 +377,7 @@ rtp_stats_calculate_bye_interval (RTPSessionStats * stats)
|
|||
* Returns: total RTP packets lost.
|
||||
*/
|
||||
gint64
|
||||
rtp_stats_get_packets_lost (const RTPSourceStats * stats)
|
||||
ts_rtp_stats_get_packets_lost (const RTPSourceStats * stats)
|
||||
{
|
||||
gint64 lost;
|
||||
guint64 extended_max, expected;
|
||||
|
@ -390,41 +390,7 @@ rtp_stats_get_packets_lost (const RTPSourceStats * stats)
|
|||
}
|
||||
|
||||
void
|
||||
rtp_stats_set_min_interval (RTPSessionStats * stats, gdouble min_interval)
|
||||
ts_rtp_stats_set_min_interval (RTPSessionStats * stats, gdouble min_interval)
|
||||
{
|
||||
stats->min_interval = min_interval;
|
||||
}
|
||||
|
||||
gboolean
|
||||
__g_socket_address_equal (GSocketAddress * a, GSocketAddress * b)
|
||||
{
|
||||
GInetSocketAddress *ia, *ib;
|
||||
GInetAddress *iaa, *iab;
|
||||
|
||||
ia = G_INET_SOCKET_ADDRESS (a);
|
||||
ib = G_INET_SOCKET_ADDRESS (b);
|
||||
|
||||
if (g_inet_socket_address_get_port (ia) !=
|
||||
g_inet_socket_address_get_port (ib))
|
||||
return FALSE;
|
||||
|
||||
iaa = g_inet_socket_address_get_address (ia);
|
||||
iab = g_inet_socket_address_get_address (ib);
|
||||
|
||||
return g_inet_address_equal (iaa, iab);
|
||||
}
|
||||
|
||||
gchar *
|
||||
__g_socket_address_to_string (GSocketAddress * addr)
|
||||
{
|
||||
GInetSocketAddress *ia;
|
||||
gchar *ret, *tmp;
|
||||
|
||||
ia = G_INET_SOCKET_ADDRESS (addr);
|
||||
|
||||
tmp = g_inet_address_to_string (g_inet_socket_address_get_address (ia));
|
||||
ret = g_strdup_printf ("%s:%u", tmp, g_inet_socket_address_get_port (ia));
|
||||
g_free (tmp);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -216,11 +216,11 @@ typedef struct {
|
|||
guint32 avg_packet_rate;
|
||||
} RTPPacketRateCtx;
|
||||
|
||||
void gst_rtp_packet_rate_ctx_reset (RTPPacketRateCtx * ctx, gint32 clock_rate);
|
||||
guint32 gst_rtp_packet_rate_ctx_update (RTPPacketRateCtx *ctx, guint16 seqnum, guint32 ts);
|
||||
guint32 gst_rtp_packet_rate_ctx_get (RTPPacketRateCtx *ctx);
|
||||
guint32 gst_rtp_packet_rate_ctx_get_max_dropout (RTPPacketRateCtx *ctx, gint32 time_ms);
|
||||
guint32 gst_rtp_packet_rate_ctx_get_max_misorder (RTPPacketRateCtx *ctx, gint32 time_ms);
|
||||
void ts_gst_rtp_packet_rate_ctx_reset (RTPPacketRateCtx * ctx, gint32 clock_rate);
|
||||
guint32 ts_gst_rtp_packet_rate_ctx_update (RTPPacketRateCtx *ctx, guint16 seqnum, guint32 ts);
|
||||
guint32 ts_gst_rtp_packet_rate_ctx_get (RTPPacketRateCtx *ctx);
|
||||
guint32 ts_gst_rtp_packet_rate_ctx_get_max_dropout (RTPPacketRateCtx *ctx, gint32 time_ms);
|
||||
guint32 ts_gst_rtp_packet_rate_ctx_get_max_misorder (RTPPacketRateCtx *ctx, gint32 time_ms);
|
||||
|
||||
/**
|
||||
* RTPSessionStats:
|
||||
|
@ -245,23 +245,19 @@ typedef struct {
|
|||
guint nacks_received;
|
||||
} RTPSessionStats;
|
||||
|
||||
void rtp_stats_init_defaults (RTPSessionStats *stats);
|
||||
void ts_rtp_stats_init_defaults (RTPSessionStats *stats);
|
||||
|
||||
void rtp_stats_set_bandwidths (RTPSessionStats *stats,
|
||||
guint rtp_bw,
|
||||
gdouble rtcp_bw,
|
||||
guint rs, guint rr);
|
||||
void ts_rtp_stats_set_bandwidths (RTPSessionStats *stats,
|
||||
guint rtp_bw,
|
||||
gdouble rtcp_bw,
|
||||
guint rs, guint rr);
|
||||
|
||||
GstClockTime rtp_stats_calculate_rtcp_interval (RTPSessionStats *stats, gboolean sender, GstRTPProfile profile, gboolean ptp, gboolean first);
|
||||
GstClockTime rtp_stats_add_rtcp_jitter (RTPSessionStats *stats, GstClockTime interval);
|
||||
GstClockTime rtp_stats_calculate_bye_interval (RTPSessionStats *stats);
|
||||
gint64 rtp_stats_get_packets_lost (const RTPSourceStats *stats);
|
||||
GstClockTime ts_rtp_stats_calculate_rtcp_interval (RTPSessionStats *stats, gboolean sender, GstRTPProfile profile, gboolean ptp, gboolean first);
|
||||
GstClockTime ts_rtp_stats_add_rtcp_jitter (RTPSessionStats *stats, GstClockTime interval);
|
||||
GstClockTime ts_rtp_stats_calculate_bye_interval (RTPSessionStats *stats);
|
||||
gint64 ts_rtp_stats_get_packets_lost (const RTPSourceStats *stats);
|
||||
|
||||
void rtp_stats_set_min_interval (RTPSessionStats *stats,
|
||||
gdouble min_interval);
|
||||
|
||||
|
||||
gboolean __g_socket_address_equal (GSocketAddress *a, GSocketAddress *b);
|
||||
gchar * __g_socket_address_to_string (GSocketAddress * addr);
|
||||
void ts_rtp_stats_set_min_interval (RTPSessionStats *stats,
|
||||
gdouble min_interval);
|
||||
|
||||
#endif /* __RTP_STATS_H__ */
|
||||
|
|
|
@ -694,7 +694,7 @@ fn setup(
|
|||
|
||||
// Src
|
||||
let src_element = glib::Object::new::<ElementSrcTest>();
|
||||
src_element.set_property("context", &context_name);
|
||||
src_element.set_property("context", context_name);
|
||||
pipeline.add(&src_element).unwrap();
|
||||
|
||||
let mut last_element = src_element.clone().upcast::<gst::Element>();
|
||||
|
|
81
meson.build
81
meson.build
|
@ -1,7 +1,7 @@
|
|||
project('gst-plugins-rs',
|
||||
'rust',
|
||||
'c',
|
||||
version: '0.10.0-alpha.1',
|
||||
version: '0.10.6',
|
||||
meson_version : '>= 0.60')
|
||||
|
||||
# dependencies.py needs a toml parsing module
|
||||
|
@ -21,13 +21,14 @@ endif
|
|||
cargo = find_program('cargo', version:'>=1.40')
|
||||
cargo_wrapper = find_program('cargo_wrapper.py')
|
||||
cargo_c = find_program('cargo-cbuild', version:'>=0.9.3', required: false)
|
||||
rustc = find_program('rustc', version:'>=1.52')
|
||||
|
||||
rustc = meson.get_compiler('rust')
|
||||
|
||||
if not cargo_c.found()
|
||||
error('cargo-c missing, install it with: \'cargo install cargo-c\'')
|
||||
endif
|
||||
|
||||
system = build_machine.system()
|
||||
system = host_machine.system()
|
||||
exe_suffix = ''
|
||||
if system == 'windows'
|
||||
exe_suffix = '.exe'
|
||||
|
@ -251,17 +252,19 @@ if get_option('gtk4').allowed()
|
|||
gtk4_features = []
|
||||
gl_winsys = gst_gl_dep.get_variable('gl_winsys').split()
|
||||
gl_platforms = gst_gl_dep.get_variable('gl_platforms').split()
|
||||
if host_system == 'linux'
|
||||
if 'wayland' in gl_winsys
|
||||
gtk4_features += 'wayland'
|
||||
if 'wayland' in gl_winsys
|
||||
gtk4_features += 'wayland'
|
||||
endif
|
||||
if 'x11' in gl_winsys
|
||||
if 'egl' in gl_platforms
|
||||
gtk4_features += 'x11egl'
|
||||
endif
|
||||
if 'x11' in gl_winsys
|
||||
if 'egl' in gl_platforms
|
||||
gtk4_features += 'x11egl'
|
||||
endif
|
||||
if 'glx' in gl_platforms
|
||||
gtk4_features += 'x11glx'
|
||||
endif
|
||||
if 'glx' in gl_platforms
|
||||
gtk4_features += 'x11glx'
|
||||
endif
|
||||
elif host_system == 'windows'
|
||||
if 'egl' in gl_platforms
|
||||
gtk4_features += 'winegl'
|
||||
endif
|
||||
endif
|
||||
plugins += {'gtk4': {
|
||||
|
@ -315,28 +318,6 @@ if get_option('gtk4').allowed()
|
|||
endif
|
||||
endif
|
||||
|
||||
if gst_dep.version().version_compare('>=1.21')
|
||||
components = [
|
||||
'', '-app', '-audio', '-base', '-check',
|
||||
'-rtp', '-sdp', '-utils', '-video', '-webrtc',
|
||||
]
|
||||
if get_option('tracers').allowed()
|
||||
components += '-plugin-tracers'
|
||||
endif
|
||||
if get_option('threadshare').allowed()
|
||||
components += '-net'
|
||||
endif
|
||||
if get_option('mp4').allowed() or get_option('fmp4').allowed()
|
||||
components += '-pbutils'
|
||||
endif
|
||||
foreach c: components
|
||||
features += f'gst@c@/v1_22'
|
||||
endforeach
|
||||
if get_option('webrtc').allowed()
|
||||
features += 'gst-plugin-webrtc/gst1_22'
|
||||
endif
|
||||
endif
|
||||
|
||||
if get_option('rav1e').allowed() and find_program('nasm', required: false).found()
|
||||
features += 'gst-plugin-rav1e/asm'
|
||||
endif
|
||||
|
@ -359,6 +340,12 @@ foreach plugin_name, details: plugins
|
|||
if plugin_deps_found
|
||||
packages += f'gst-plugin-@plugin_name@'
|
||||
features += details.get('features', [])
|
||||
extra_features = run_command('dependencies.py', meson.current_source_dir(), plugin_name,
|
||||
'--feature', '--gst-version', gst_dep.version(), capture: true, check: true).stdout().strip()
|
||||
if extra_features != ''
|
||||
features += extra_features.split(',')
|
||||
endif
|
||||
|
||||
examples += details.get('examples', [])
|
||||
lib = details.get('library')
|
||||
if default_library in ['shared', 'both']
|
||||
|
@ -371,13 +358,17 @@ foreach plugin_name, details: plugins
|
|||
endif
|
||||
endforeach
|
||||
|
||||
feature_args = []
|
||||
if features.length() > 0
|
||||
feature_args += ['--features', features]
|
||||
endif
|
||||
|
||||
plugins_install_dir = get_option('libdir') / 'gstreamer-1.0'
|
||||
pkgconfig_install_dir = get_option('libdir') / 'pkgconfig'
|
||||
|
||||
extra_args = []
|
||||
if get_option('doc').disabled()
|
||||
extra_args = ['--disable-doc']
|
||||
extra_args += ['--disable-doc']
|
||||
endif
|
||||
|
||||
# 'pkgconfig' is the entry in the machine file, if specified
|
||||
|
@ -395,6 +386,18 @@ if pkg_config_path.length() > 0
|
|||
extra_env += {'PKG_CONFIG_PATH': pathsep.join(pkg_config_path)}
|
||||
endif
|
||||
|
||||
# get compiler and flags for rust (if any)
|
||||
rustc_cmd = ''
|
||||
rust_flags = []
|
||||
foreach rustc_arg : rustc.cmd_array()
|
||||
if rustc_cmd == ''
|
||||
rustc_cmd = rustc_arg
|
||||
else
|
||||
rust_flags += [rustc_arg]
|
||||
endif
|
||||
endforeach
|
||||
extra_env += {'RUSTC': rustc_cmd, 'RUSTFLAGS': ' '.join(rust_flags)}
|
||||
|
||||
rs_plugins = custom_target('gst-plugins-rs',
|
||||
build_by_default: true,
|
||||
output: output,
|
||||
|
@ -413,10 +416,9 @@ rs_plugins = custom_target('gst-plugins-rs',
|
|||
get_option('prefix'),
|
||||
get_option('libdir'),
|
||||
'--packages', packages,
|
||||
'--features', features,
|
||||
'--depfile', '@DEPFILE@',
|
||||
'--lib-suffixes', library_suffixes,
|
||||
] + extra_args)
|
||||
] + feature_args + extra_args)
|
||||
|
||||
plugins = rs_plugins.to_list()
|
||||
|
||||
|
@ -537,10 +539,9 @@ if get_option('examples').allowed() and examples.length() > 0
|
|||
get_option('libdir'),
|
||||
'--depfile', '@DEPFILE@',
|
||||
'--packages', packages,
|
||||
'--features', features,
|
||||
'--examples', examples,
|
||||
'--exe-suffix', exe_suffix,
|
||||
])
|
||||
] + feature_args)
|
||||
endif
|
||||
|
||||
test('tests',
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
[package]
|
||||
name = "gst-plugin-flavors"
|
||||
version = "0.10.0-alpha.1"
|
||||
version = "0.10.11"
|
||||
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
|
||||
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.63"
|
||||
rust-version = "1.64"
|
||||
description = "GStreamer Rust FLV Plugin"
|
||||
|
||||
[dependencies]
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
num-rational = { version = "0.4", default-features = false, features = [] }
|
||||
nom = "7"
|
||||
flavors = { git = "https://github.com/rust-av/flavors" }
|
||||
|
@ -26,7 +26,7 @@ crate-type = ["cdylib", "rlib"]
|
|||
path = "src/lib.rs"
|
||||
|
||||
[build-dependencies]
|
||||
gst-plugin-version-helper = { path="../../version-helper" }
|
||||
gst-plugin-version-helper = { path="../../version-helper", version = "0.7" }
|
||||
|
||||
[features]
|
||||
static = []
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-APACHE
|
201
mux/flavors/LICENSE-APACHE
Normal file
201
mux/flavors/LICENSE-APACHE
Normal file
|
@ -0,0 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-MIT
|
23
mux/flavors/LICENSE-MIT
Normal file
23
mux/flavors/LICENSE-MIT
Normal file
|
@ -0,0 +1,23 @@
|
|||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
|
@ -1,20 +1,20 @@
|
|||
[package]
|
||||
name = "gst-plugin-fmp4"
|
||||
version = "0.10.0-alpha.1"
|
||||
version = "0.10.11"
|
||||
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
|
||||
license = "MPL-2.0"
|
||||
description = "GStreamer Fragmented MP4 Plugin"
|
||||
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
|
||||
edition = "2021"
|
||||
rust-version = "1.63"
|
||||
rust-version = "1.64"
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1"
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] }
|
||||
gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] }
|
||||
gst-pbutils = { package = "gstreamer-pbutils", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] }
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_18"] }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_18"] }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_18"] }
|
||||
gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_18"] }
|
||||
gst-pbutils = { package = "gstreamer-pbutils", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_18"] }
|
||||
once_cell = "1.0"
|
||||
|
||||
[lib]
|
||||
|
@ -23,14 +23,14 @@ crate-type = ["cdylib", "rlib"]
|
|||
path = "src/lib.rs"
|
||||
|
||||
[dev-dependencies]
|
||||
gst-app = { package = "gstreamer-app", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] }
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] }
|
||||
gst-pbutils = { package = "gstreamer-pbutils", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_20"] }
|
||||
gst-app = { package = "gstreamer-app", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_18"] }
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_18"] }
|
||||
gst-pbutils = { package = "gstreamer-pbutils", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_20"] }
|
||||
m3u8-rs = "5.0"
|
||||
chrono = "0.4"
|
||||
|
||||
[build-dependencies]
|
||||
gst-plugin-version-helper = { path="../../version-helper" }
|
||||
gst-plugin-version-helper = { path="../../version-helper", version = "0.7" }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-MPL-2.0
|
373
mux/fmp4/LICENSE
Normal file
373
mux/fmp4/LICENSE
Normal file
|
@ -0,0 +1,373 @@
|
|||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
|
@ -463,12 +463,12 @@ impl AudioStream {
|
|||
let src = gst::ElementFactory::make("audiotestsrc")
|
||||
.property("is-live", true)
|
||||
.property_from_str("wave", &self.wave)
|
||||
.property("fragment-duration", 2500.mseconds())
|
||||
.build()?;
|
||||
let enc = gst::ElementFactory::make("avenc_aac").build()?;
|
||||
let mux = gst::ElementFactory::make("cmafmux")
|
||||
.property_from_str("header-update-mode", "update")
|
||||
.property("write-mehd", true)
|
||||
.property("fragment-duration", 2500.mseconds())
|
||||
.build()?;
|
||||
let appsink = gst_app::AppSink::builder().buffer_list(true).build();
|
||||
|
||||
|
|
|
@ -1502,9 +1502,9 @@ fn write_dops(v: &mut Vec<u8>, caps: &gst::Caps) -> Result<(), Error> {
|
|||
// Version number
|
||||
v.push(0);
|
||||
v.push(channels);
|
||||
v.extend(pre_skip.to_le_bytes());
|
||||
v.extend(rate.to_le_bytes());
|
||||
v.extend(output_gain.to_le_bytes());
|
||||
v.extend(pre_skip.to_be_bytes());
|
||||
v.extend(rate.to_be_bytes());
|
||||
v.extend(output_gain.to_be_bytes());
|
||||
v.push(channel_mapping_family);
|
||||
if channel_mapping_family > 0 {
|
||||
v.push(stream_count);
|
||||
|
|
|
@ -996,17 +996,56 @@ impl FMP4Mux {
|
|||
let chunk_end_pts = chunk_start_pts + chunk_duration;
|
||||
let fragment_end_pts = fragment_start_pts + settings.fragment_duration;
|
||||
|
||||
gst::trace!(
|
||||
CAT,
|
||||
obj: stream.sinkpad,
|
||||
"Current chunk end {}, current fragment end {}",
|
||||
chunk_end_pts,
|
||||
fragment_end_pts,
|
||||
);
|
||||
if fragment_end_pts < chunk_end_pts {
|
||||
gst::trace!(
|
||||
CAT,
|
||||
obj: stream.sinkpad,
|
||||
"Current chunk end {}, current fragment end {}. Fragment end before chunk end, extending fragment",
|
||||
chunk_end_pts,
|
||||
fragment_end_pts,
|
||||
);
|
||||
} else {
|
||||
gst::trace!(
|
||||
CAT,
|
||||
obj: stream.sinkpad,
|
||||
"Current chunk end {}, current fragment end {}",
|
||||
chunk_end_pts,
|
||||
fragment_end_pts,
|
||||
);
|
||||
}
|
||||
|
||||
// First check if the next split should be the end of a fragment or the end of a chunk.
|
||||
// If both are the same then a fragment split has preference.
|
||||
if fragment_end_pts <= chunk_end_pts {
|
||||
// If the first GOP already starts after the fragment end PTS then this stream is
|
||||
// filled in the sense that it will not have any buffers for this chunk.
|
||||
if let Some(gop) = stream.queued_gops.back() {
|
||||
gst::trace!(
|
||||
CAT,
|
||||
obj: stream.sinkpad,
|
||||
"GOP {} start PTS {}, GOP end PTS {}",
|
||||
stream.queued_gops.len() - 1,
|
||||
gop.start_pts,
|
||||
gop.end_pts,
|
||||
);
|
||||
// If this GOP starts after the end of the current fragment, i.e. is not
|
||||
// included at all, then consider this stream filled as it won't contribute to
|
||||
// this fragment.
|
||||
//
|
||||
// However if the first buffer of the GOP is not actually a keyframe then we
|
||||
// previously drained a partial GOP because the GOP is ending too far after the
|
||||
// planned fragment end.
|
||||
if gop.start_pts > fragment_end_pts
|
||||
&& !gop.buffers.first().map_or(false, |b| {
|
||||
b.buffer.flags().contains(gst::BufferFlags::DELTA_UNIT)
|
||||
})
|
||||
{
|
||||
gst::debug!(CAT, obj: stream.sinkpad, "Stream's first GOP starting after this fragment");
|
||||
stream.fragment_filled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// We can only finish a fragment if a full GOP with final end PTS is queued and it
|
||||
// ends at or after the fragment end PTS.
|
||||
if let Some((gop_idx, gop)) = stream
|
||||
|
@ -1031,6 +1070,26 @@ impl FMP4Mux {
|
|||
}
|
||||
|
||||
if !stream.fragment_filled {
|
||||
// If the first GOP already starts after the chunk end PTS then this stream is
|
||||
// filled in the sense that it will not have any buffers for this chunk.
|
||||
if let Some(gop) = stream.queued_gops.back() {
|
||||
gst::trace!(
|
||||
CAT,
|
||||
obj: stream.sinkpad,
|
||||
"GOP {} start PTS {}, GOP end PTS {}",
|
||||
stream.queued_gops.len() - 1,
|
||||
gop.start_pts,
|
||||
gop.end_pts,
|
||||
);
|
||||
if gop.start_pts > chunk_end_pts {
|
||||
gst::debug!(CAT, obj: stream.sinkpad, "Stream's first GOP starting after this chunk");
|
||||
stream.chunk_filled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// We can only finish a chunk if a full GOP with final end PTS is queued and it
|
||||
// ends at or after the fragment end PTS.
|
||||
let (gop_idx, gop) = match stream.queued_gops.iter().enumerate().find(
|
||||
|(_idx, gop)| gop.final_earliest_pts || all_eos || stream.sinkpad.is_eos(),
|
||||
) {
|
||||
|
@ -1065,10 +1124,39 @@ impl FMP4Mux {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
let gop = match stream
|
||||
// Check if the end of the latest finalized GOP is after the fragment end
|
||||
let fragment_end_pts = fragment_start_pts + settings.fragment_duration;
|
||||
gst::trace!(
|
||||
CAT,
|
||||
obj: stream.sinkpad,
|
||||
"Current fragment start {}, current fragment end {}",
|
||||
fragment_start_pts,
|
||||
fragment_start_pts + settings.fragment_duration,
|
||||
);
|
||||
|
||||
// If the first GOP already starts after the fragment end PTS then this stream is
|
||||
// filled in the sense that it will not have any buffers for this fragment.
|
||||
if let Some(gop) = stream.queued_gops.back() {
|
||||
gst::trace!(
|
||||
CAT,
|
||||
obj: stream.sinkpad,
|
||||
"GOP {} start PTS {}, GOP end PTS {}",
|
||||
stream.queued_gops.len() - 1,
|
||||
gop.start_pts,
|
||||
gop.end_pts,
|
||||
);
|
||||
if gop.start_pts > fragment_end_pts {
|
||||
gst::debug!(CAT, obj: stream.sinkpad, "Stream's first GOP starting after this fragment");
|
||||
stream.fragment_filled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let (gop_idx, gop) = match stream
|
||||
.queued_gops
|
||||
.iter()
|
||||
.find(|gop| gop.final_end_pts || all_eos || stream.sinkpad.is_eos())
|
||||
.enumerate()
|
||||
.find(|(_gop_idx, gop)| gop.final_end_pts || all_eos || stream.sinkpad.is_eos())
|
||||
{
|
||||
Some(gop) => gop,
|
||||
None => {
|
||||
|
@ -1080,21 +1168,11 @@ impl FMP4Mux {
|
|||
gst::trace!(
|
||||
CAT,
|
||||
obj: stream.sinkpad,
|
||||
"GOP start PTS {}, GOP end PTS {}",
|
||||
"GOP {gop_idx} start PTS {}, GOP end PTS {}",
|
||||
gop.start_pts,
|
||||
gop.end_pts,
|
||||
);
|
||||
|
||||
// Check if the end of the latest finalized GOP is after the fragment end
|
||||
let fragment_end_pts = fragment_start_pts + settings.fragment_duration;
|
||||
gst::trace!(
|
||||
CAT,
|
||||
obj: stream.sinkpad,
|
||||
"Current fragment start {}, current fragment end {}",
|
||||
fragment_start_pts,
|
||||
fragment_start_pts + settings.fragment_duration,
|
||||
);
|
||||
|
||||
if gop.end_pts >= fragment_end_pts {
|
||||
gst::debug!(CAT, obj: stream.sinkpad, "Stream queued enough data for this fragment");
|
||||
stream.fragment_filled = true;
|
||||
|
@ -1117,9 +1195,6 @@ impl FMP4Mux {
|
|||
return;
|
||||
}
|
||||
|
||||
let fragment_start_pts = state.fragment_start_pts;
|
||||
let chunk_start_pts = state.chunk_start_pts;
|
||||
|
||||
// Calculate the earliest PTS after queueing input if we can now.
|
||||
let mut earliest_pts = None;
|
||||
let mut start_dts = None;
|
||||
|
@ -1228,6 +1303,9 @@ impl FMP4Mux {
|
|||
upstream_events.push((stream.sinkpad.clone(), fku));
|
||||
}
|
||||
|
||||
let fragment_start_pts = state.fragment_start_pts;
|
||||
let chunk_start_pts = state.chunk_start_pts;
|
||||
|
||||
// Check if any of the streams are already filled enough for the first chunk/fragment.
|
||||
for stream in &mut state.streams {
|
||||
self.check_stream_filled(
|
||||
|
@ -1332,12 +1410,21 @@ impl FMP4Mux {
|
|||
break;
|
||||
}
|
||||
|
||||
// Otherwise if this is the first stream and no full GOP is queued then we need
|
||||
// to wait for more data.
|
||||
// Otherwise if this is the first stream, no full GOP is queued and the first
|
||||
// GOP is starting inside this fragment then we need to wait for more data.
|
||||
//
|
||||
// If this is not the first stream then take an incomplete GOP.
|
||||
if chunk_end_pts.is_none() {
|
||||
gst::info!(CAT, obj: stream.sinkpad, "Don't have a full GOP at the end of a fragment");
|
||||
if gop.start_pts >= dequeue_end_pts
|
||||
|| (!gop.final_earliest_pts && !all_eos && !stream.sinkpad.is_eos())
|
||||
{
|
||||
gst::trace!(
|
||||
CAT,
|
||||
obj: stream.sinkpad,
|
||||
"GOP starts after fragment end",
|
||||
);
|
||||
break;
|
||||
} else if chunk_end_pts.is_none() {
|
||||
gst::info!(CAT, obj: stream.sinkpad, "Don't have a full GOP at the end of a fragment for the first stream");
|
||||
return Err(gst_base::AGGREGATOR_FLOW_NEED_DATA);
|
||||
} else {
|
||||
gst::info!(CAT, obj: stream.sinkpad, "Including incomplete GOP");
|
||||
|
@ -1729,20 +1816,34 @@ impl FMP4Mux {
|
|||
let mut min_start_dts_position = None;
|
||||
let mut chunk_end_pts = None;
|
||||
|
||||
let fragment_start_pts = state.fragment_start_pts.unwrap();
|
||||
let chunk_start_pts = state.chunk_start_pts.unwrap();
|
||||
let fragment_start = fragment_start_pts == chunk_start_pts;
|
||||
|
||||
// In fragment mode, each chunk is a full fragment. Otherwise, in chunk mode,
|
||||
// this fragment is filled if it is filled for the first non-EOS stream
|
||||
// that has a GOP inside this chunk
|
||||
let fragment_filled = settings.chunk_duration.is_none()
|
||||
|| state
|
||||
.streams
|
||||
.iter()
|
||||
.find(|s| !s.sinkpad.is_eos())
|
||||
.find(|s| {
|
||||
!s.sinkpad.is_eos()
|
||||
&& s.queued_gops.back().map_or(false, |gop| {
|
||||
gop.start_pts <= fragment_start_pts + settings.fragment_duration
|
||||
// In chunk mode we might've drained a partial GOP as a chunk after
|
||||
// the fragment end if the keyframe came too late. The GOP now
|
||||
// starts with a non-keyframe after the fragment end but is part of
|
||||
// the fragment: the fragment is extended after the end. Allow this
|
||||
// situation here.
|
||||
|| gop.buffers.first().map_or(false, |b| {
|
||||
b.buffer.flags().contains(gst::BufferFlags::DELTA_UNIT)
|
||||
})
|
||||
})
|
||||
})
|
||||
.map(|s| s.fragment_filled)
|
||||
== Some(true);
|
||||
|
||||
let fragment_start_pts = state.fragment_start_pts.unwrap();
|
||||
let chunk_start_pts = state.chunk_start_pts.unwrap();
|
||||
let fragment_start = fragment_start_pts == chunk_start_pts;
|
||||
|
||||
// The first stream decides how much can be dequeued, if anything at all.
|
||||
//
|
||||
// In chunk mode:
|
||||
|
@ -1804,8 +1905,17 @@ impl FMP4Mux {
|
|||
);
|
||||
} else {
|
||||
// If nothing was dequeued for the first stream then this is OK if we're at
|
||||
// EOS: we just consider the next stream as first stream then.
|
||||
if all_eos || stream.sinkpad.is_eos() {
|
||||
// EOS or this stream simply has only buffers after this chunk: we just
|
||||
// consider the next stream as first stream then.
|
||||
let stream_after_chunk = stream.queued_gops.back().map_or(false, |gop| {
|
||||
gop.start_pts
|
||||
>= if fragment_filled {
|
||||
fragment_start_pts + settings.fragment_duration
|
||||
} else {
|
||||
chunk_start_pts + settings.chunk_duration.unwrap()
|
||||
}
|
||||
});
|
||||
if all_eos || stream.sinkpad.is_eos() || stream_after_chunk {
|
||||
// This is handled below generally if nothing was dequeued
|
||||
} else {
|
||||
if settings.chunk_duration.is_some() {
|
||||
|
@ -2942,10 +3052,15 @@ impl AggregatorImpl for FMP4Mux {
|
|||
|
||||
match query.view_mut() {
|
||||
QueryViewMut::Caps(q) => {
|
||||
let allowed_caps = aggregator_pad
|
||||
let mut allowed_caps = aggregator_pad
|
||||
.current_caps()
|
||||
.unwrap_or_else(|| aggregator_pad.pad_template_caps());
|
||||
|
||||
// Allow framerate change
|
||||
for s in allowed_caps.make_mut().iter_mut() {
|
||||
s.remove_field("framerate");
|
||||
}
|
||||
|
||||
if let Some(filter_caps) = q.filter() {
|
||||
let res = filter_caps
|
||||
.intersect_with_mode(&allowed_caps, gst::CapsIntersectMode::First);
|
||||
|
|
|
@ -1669,3 +1669,327 @@ fn test_chunking_multi_stream() {
|
|||
let ev = h1.pull_event().unwrap();
|
||||
assert_eq!(ev.type_(), gst::EventType::Eos);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_chunking_single_stream_gops_after_fragment_end_before_next_chunk_end() {
|
||||
init();
|
||||
|
||||
let caps = gst::Caps::builder("video/x-h264")
|
||||
.field("width", 1920i32)
|
||||
.field("height", 1080i32)
|
||||
.field("framerate", gst::Fraction::new(30, 1))
|
||||
.field("stream-format", "avc")
|
||||
.field("alignment", "au")
|
||||
.field("codec_data", gst::Buffer::with_size(1).unwrap())
|
||||
.build();
|
||||
|
||||
let mut h = gst_check::Harness::new("cmafmux");
|
||||
|
||||
// 5s fragment duration, 1s chunk duration
|
||||
h.element()
|
||||
.unwrap()
|
||||
.set_property("fragment-duration", 5.seconds());
|
||||
h.element()
|
||||
.unwrap()
|
||||
.set_property("chunk-duration", 1.seconds());
|
||||
|
||||
h.set_src_caps(caps);
|
||||
h.play();
|
||||
|
||||
// Push 15 buffers of 0.5s each, 1st and 12th buffer without DELTA_UNIT flag
|
||||
for i in 0..15 {
|
||||
let mut buffer = gst::Buffer::with_size(1).unwrap();
|
||||
{
|
||||
let buffer = buffer.get_mut().unwrap();
|
||||
buffer.set_pts(i * 500.mseconds());
|
||||
buffer.set_dts(i * 500.mseconds());
|
||||
buffer.set_duration(500.mseconds());
|
||||
if i != 0 && i != 11 {
|
||||
buffer.set_flags(gst::BufferFlags::DELTA_UNIT);
|
||||
}
|
||||
}
|
||||
assert_eq!(h.push(buffer), Ok(gst::FlowSuccess::Ok));
|
||||
|
||||
if i == 2 {
|
||||
let ev = loop {
|
||||
let ev = h.pull_upstream_event().unwrap();
|
||||
if ev.type_() != gst::EventType::Reconfigure
|
||||
&& ev.type_() != gst::EventType::Latency
|
||||
{
|
||||
break ev;
|
||||
}
|
||||
};
|
||||
|
||||
assert_eq!(ev.type_(), gst::EventType::CustomUpstream);
|
||||
assert_eq!(
|
||||
gst_video::UpstreamForceKeyUnitEvent::parse(&ev).unwrap(),
|
||||
gst_video::UpstreamForceKeyUnitEvent {
|
||||
running_time: Some(5.seconds()),
|
||||
all_headers: true,
|
||||
count: 0
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Crank the clock: this should bring us to the end of the first fragment
|
||||
h.crank_single_clock_wait().unwrap();
|
||||
|
||||
let mut expected_ts = gst::ClockTime::ZERO;
|
||||
let mut num_buffers = 0;
|
||||
|
||||
let header = h.pull().unwrap();
|
||||
assert_eq!(
|
||||
header.flags(),
|
||||
gst::BufferFlags::HEADER | gst::BufferFlags::DISCONT
|
||||
);
|
||||
assert_eq!(header.pts(), Some(expected_ts));
|
||||
assert_eq!(header.dts(), Some(expected_ts));
|
||||
|
||||
// There should be 7 chunks now, and the 1st and 7th are starting a fragment.
|
||||
// Each chunk should have two buffers except for the 6th.
|
||||
for chunk in 0..7 {
|
||||
let chunk_header = h.pull().unwrap();
|
||||
if chunk == 0 || chunk == 6 {
|
||||
assert_eq!(chunk_header.flags(), gst::BufferFlags::HEADER);
|
||||
} else {
|
||||
assert_eq!(
|
||||
chunk_header.flags(),
|
||||
gst::BufferFlags::HEADER | gst::BufferFlags::DELTA_UNIT
|
||||
);
|
||||
}
|
||||
assert_eq!(chunk_header.pts(), Some(expected_ts));
|
||||
assert_eq!(chunk_header.dts(), Some(expected_ts));
|
||||
if chunk == 5 {
|
||||
assert_eq!(chunk_header.duration(), Some(500.mseconds()));
|
||||
} else {
|
||||
assert_eq!(chunk_header.duration(), Some(1.seconds()));
|
||||
}
|
||||
|
||||
for buffer_idx in 0..2 {
|
||||
let buffer = h.pull().unwrap();
|
||||
num_buffers += 1;
|
||||
if buffer_idx == 1 || (chunk == 5 && buffer_idx == 0) {
|
||||
assert_eq!(
|
||||
buffer.flags(),
|
||||
gst::BufferFlags::DELTA_UNIT | gst::BufferFlags::MARKER
|
||||
);
|
||||
} else {
|
||||
assert_eq!(buffer.flags(), gst::BufferFlags::DELTA_UNIT);
|
||||
}
|
||||
assert_eq!(buffer.pts(), Some(expected_ts));
|
||||
assert_eq!(buffer.dts(), Some(expected_ts));
|
||||
assert_eq!(buffer.duration(), Some(500.mseconds()));
|
||||
|
||||
expected_ts += 500.mseconds();
|
||||
|
||||
// Only one buffer in this chunk
|
||||
if chunk == 5 && buffer_idx == 0 {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
h.push_event(gst::event::Eos::new());
|
||||
|
||||
// There should be one remaining chunk now, containing two 500ms buffer.
|
||||
for _chunk in 7..8 {
|
||||
let chunk_header = h.pull().unwrap();
|
||||
assert_eq!(
|
||||
chunk_header.flags(),
|
||||
gst::BufferFlags::HEADER | gst::BufferFlags::DELTA_UNIT
|
||||
);
|
||||
assert_eq!(chunk_header.pts(), Some(expected_ts));
|
||||
assert_eq!(chunk_header.dts(), Some(expected_ts));
|
||||
assert_eq!(chunk_header.duration(), Some(1.seconds()));
|
||||
|
||||
for buffer_idx in 0..2 {
|
||||
let buffer = h.pull().unwrap();
|
||||
num_buffers += 1;
|
||||
if buffer_idx == 1 {
|
||||
assert_eq!(
|
||||
buffer.flags(),
|
||||
gst::BufferFlags::DELTA_UNIT | gst::BufferFlags::MARKER
|
||||
);
|
||||
} else {
|
||||
assert_eq!(buffer.flags(), gst::BufferFlags::DELTA_UNIT);
|
||||
}
|
||||
assert_eq!(buffer.pts(), Some(expected_ts));
|
||||
assert_eq!(buffer.dts(), Some(expected_ts));
|
||||
assert_eq!(buffer.duration(), Some(500.mseconds()));
|
||||
expected_ts += 500.mseconds();
|
||||
}
|
||||
}
|
||||
|
||||
assert_eq!(num_buffers, 15);
|
||||
|
||||
let ev = h.pull_event().unwrap();
|
||||
assert_eq!(ev.type_(), gst::EventType::StreamStart);
|
||||
let ev = h.pull_event().unwrap();
|
||||
assert_eq!(ev.type_(), gst::EventType::Caps);
|
||||
let ev = h.pull_event().unwrap();
|
||||
assert_eq!(ev.type_(), gst::EventType::Segment);
|
||||
let ev = h.pull_event().unwrap();
|
||||
assert_eq!(ev.type_(), gst::EventType::Eos);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_chunking_single_stream_gops_after_fragment_end_after_next_chunk_end() {
|
||||
init();
|
||||
|
||||
let caps = gst::Caps::builder("video/x-h264")
|
||||
.field("width", 1920i32)
|
||||
.field("height", 1080i32)
|
||||
.field("framerate", gst::Fraction::new(30, 1))
|
||||
.field("stream-format", "avc")
|
||||
.field("alignment", "au")
|
||||
.field("codec_data", gst::Buffer::with_size(1).unwrap())
|
||||
.build();
|
||||
|
||||
let mut h = gst_check::Harness::new("cmafmux");
|
||||
|
||||
// 5s fragment duration, 1s chunk duration
|
||||
h.element()
|
||||
.unwrap()
|
||||
.set_property("fragment-duration", 5.seconds());
|
||||
h.element()
|
||||
.unwrap()
|
||||
.set_property("chunk-duration", 1.seconds());
|
||||
|
||||
h.set_src_caps(caps);
|
||||
h.play();
|
||||
|
||||
// Push 15 buffers of 0.5s each, 1st and 14th buffer without DELTA_UNIT flag
|
||||
for i in 0..15 {
|
||||
let mut buffer = gst::Buffer::with_size(1).unwrap();
|
||||
{
|
||||
let buffer = buffer.get_mut().unwrap();
|
||||
buffer.set_pts(i * 500.mseconds());
|
||||
buffer.set_dts(i * 500.mseconds());
|
||||
buffer.set_duration(500.mseconds());
|
||||
if i != 0 && i != 13 {
|
||||
buffer.set_flags(gst::BufferFlags::DELTA_UNIT);
|
||||
}
|
||||
}
|
||||
assert_eq!(h.push(buffer), Ok(gst::FlowSuccess::Ok));
|
||||
|
||||
if i == 2 {
|
||||
let ev = loop {
|
||||
let ev = h.pull_upstream_event().unwrap();
|
||||
if ev.type_() != gst::EventType::Reconfigure
|
||||
&& ev.type_() != gst::EventType::Latency
|
||||
{
|
||||
break ev;
|
||||
}
|
||||
};
|
||||
|
||||
assert_eq!(ev.type_(), gst::EventType::CustomUpstream);
|
||||
assert_eq!(
|
||||
gst_video::UpstreamForceKeyUnitEvent::parse(&ev).unwrap(),
|
||||
gst_video::UpstreamForceKeyUnitEvent {
|
||||
running_time: Some(5.seconds()),
|
||||
all_headers: true,
|
||||
count: 0
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Crank the clock: this should bring us to the end of the first fragment
|
||||
h.crank_single_clock_wait().unwrap();
|
||||
|
||||
let mut expected_ts = gst::ClockTime::ZERO;
|
||||
let mut num_buffers = 0;
|
||||
|
||||
let header = h.pull().unwrap();
|
||||
assert_eq!(
|
||||
header.flags(),
|
||||
gst::BufferFlags::HEADER | gst::BufferFlags::DISCONT
|
||||
);
|
||||
assert_eq!(header.pts(), Some(expected_ts));
|
||||
assert_eq!(header.dts(), Some(expected_ts));
|
||||
|
||||
// There should be 7 chunks now, and the 1st is starting a fragment.
|
||||
// Each chunk should have two buffers except for the 7th.
|
||||
for chunk in 0..7 {
|
||||
let chunk_header = h.pull().unwrap();
|
||||
if chunk == 0 {
|
||||
assert_eq!(chunk_header.flags(), gst::BufferFlags::HEADER);
|
||||
} else {
|
||||
assert_eq!(
|
||||
chunk_header.flags(),
|
||||
gst::BufferFlags::HEADER | gst::BufferFlags::DELTA_UNIT
|
||||
);
|
||||
}
|
||||
assert_eq!(chunk_header.pts(), Some(expected_ts));
|
||||
assert_eq!(chunk_header.dts(), Some(expected_ts));
|
||||
if chunk == 6 {
|
||||
assert_eq!(chunk_header.duration(), Some(500.mseconds()));
|
||||
} else {
|
||||
assert_eq!(chunk_header.duration(), Some(1.seconds()));
|
||||
}
|
||||
|
||||
for buffer_idx in 0..2 {
|
||||
let buffer = h.pull().unwrap();
|
||||
num_buffers += 1;
|
||||
if buffer_idx == 1 || (chunk == 6 && buffer_idx == 0) {
|
||||
assert_eq!(
|
||||
buffer.flags(),
|
||||
gst::BufferFlags::DELTA_UNIT | gst::BufferFlags::MARKER
|
||||
);
|
||||
} else {
|
||||
assert_eq!(buffer.flags(), gst::BufferFlags::DELTA_UNIT);
|
||||
}
|
||||
assert_eq!(buffer.pts(), Some(expected_ts));
|
||||
assert_eq!(buffer.dts(), Some(expected_ts));
|
||||
assert_eq!(buffer.duration(), Some(500.mseconds()));
|
||||
|
||||
expected_ts += 500.mseconds();
|
||||
|
||||
// Only one buffer in this chunk
|
||||
if chunk == 6 && buffer_idx == 0 {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
h.push_event(gst::event::Eos::new());
|
||||
|
||||
// There should be two remaining chunks now, containing two 500ms buffers.
|
||||
// This should start a new fragment.
|
||||
for _chunk in 7..8 {
|
||||
let chunk_header = h.pull().unwrap();
|
||||
assert_eq!(chunk_header.flags(), gst::BufferFlags::HEADER);
|
||||
assert_eq!(chunk_header.pts(), Some(expected_ts));
|
||||
assert_eq!(chunk_header.dts(), Some(expected_ts));
|
||||
assert_eq!(chunk_header.duration(), Some(1.seconds()));
|
||||
|
||||
for buffer_idx in 0..2 {
|
||||
let buffer = h.pull().unwrap();
|
||||
num_buffers += 1;
|
||||
if buffer_idx == 1 {
|
||||
assert_eq!(
|
||||
buffer.flags(),
|
||||
gst::BufferFlags::DELTA_UNIT | gst::BufferFlags::MARKER
|
||||
);
|
||||
} else {
|
||||
assert_eq!(buffer.flags(), gst::BufferFlags::DELTA_UNIT);
|
||||
}
|
||||
assert_eq!(buffer.pts(), Some(expected_ts));
|
||||
assert_eq!(buffer.dts(), Some(expected_ts));
|
||||
assert_eq!(buffer.duration(), Some(500.mseconds()));
|
||||
expected_ts += 500.mseconds();
|
||||
}
|
||||
}
|
||||
|
||||
assert_eq!(num_buffers, 15);
|
||||
|
||||
let ev = h.pull_event().unwrap();
|
||||
assert_eq!(ev.type_(), gst::EventType::StreamStart);
|
||||
let ev = h.pull_event().unwrap();
|
||||
assert_eq!(ev.type_(), gst::EventType::Caps);
|
||||
let ev = h.pull_event().unwrap();
|
||||
assert_eq!(ev.type_(), gst::EventType::Segment);
|
||||
let ev = h.pull_event().unwrap();
|
||||
assert_eq!(ev.type_(), gst::EventType::Eos);
|
||||
}
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
[package]
|
||||
name = "gst-plugin-mp4"
|
||||
version = "0.10.0-alpha.1"
|
||||
version = "0.10.11"
|
||||
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
|
||||
license = "MPL-2.0"
|
||||
description = "GStreamer Rust MP4 Plugin"
|
||||
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
|
||||
edition = "2021"
|
||||
rust-version = "1.63"
|
||||
rust-version = "1.64"
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1"
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] }
|
||||
gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] }
|
||||
gst-pbutils = { package = "gstreamer-pbutils", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] }
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_18"] }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_18"] }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_18"] }
|
||||
gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_18"] }
|
||||
gst-pbutils = { package = "gstreamer-pbutils", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_18"] }
|
||||
once_cell = "1.0"
|
||||
|
||||
[lib]
|
||||
|
@ -27,7 +27,7 @@ tempfile = "3"
|
|||
url = "2"
|
||||
|
||||
[build-dependencies]
|
||||
gst-plugin-version-helper = { path="../../version-helper" }
|
||||
gst-plugin-version-helper = { path="../../version-helper", version = "0.7" }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-MPL-2.0
|
373
mux/mp4/LICENSE
Normal file
373
mux/mp4/LICENSE
Normal file
|
@ -0,0 +1,373 @@
|
|||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
|
@ -1319,9 +1319,9 @@ fn write_dops(v: &mut Vec<u8>, caps: &gst::Caps) -> Result<(), Error> {
|
|||
// Version number
|
||||
v.push(0);
|
||||
v.push(channels);
|
||||
v.extend(pre_skip.to_le_bytes());
|
||||
v.extend(rate.to_le_bytes());
|
||||
v.extend(output_gain.to_le_bytes());
|
||||
v.extend(pre_skip.to_be_bytes());
|
||||
v.extend(rate.to_be_bytes());
|
||||
v.extend(output_gain.to_be_bytes());
|
||||
v.push(channel_mapping_family);
|
||||
if channel_mapping_family > 0 {
|
||||
v.push(stream_count);
|
||||
|
|
|
@ -1097,10 +1097,15 @@ impl AggregatorImpl for MP4Mux {
|
|||
|
||||
match query.view_mut() {
|
||||
QueryViewMut::Caps(q) => {
|
||||
let allowed_caps = aggregator_pad
|
||||
let mut allowed_caps = aggregator_pad
|
||||
.current_caps()
|
||||
.unwrap_or_else(|| aggregator_pad.pad_template_caps());
|
||||
|
||||
// Allow framerate change
|
||||
for s in allowed_caps.make_mut().iter_mut() {
|
||||
s.remove_field("framerate");
|
||||
}
|
||||
|
||||
if let Some(filter_caps) = q.filter() {
|
||||
let res = filter_caps
|
||||
.intersect_with_mode(&allowed_caps, gst::CapsIntersectMode::First);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "gst-plugin-aws"
|
||||
version = "0.10.0-alpha.1"
|
||||
version = "0.10.11"
|
||||
authors = ["Arun Raghavan <arun@arunraghavan.net>",
|
||||
"Jordan Petridis <jordan@centricular.com>",
|
||||
"Mathieu Duponchelle <mathieu@centricular.com>"]
|
||||
|
@ -8,28 +8,28 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
|
|||
license = "MPL-2.0"
|
||||
description = "GStreamer Amazon Web Services plugin"
|
||||
edition = "2021"
|
||||
rust-version = "1.63"
|
||||
rust-version = "1.64"
|
||||
|
||||
[dependencies]
|
||||
bytes = "1.0"
|
||||
futures = "0.3"
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_16"] }
|
||||
aws-config = "0.54.0"
|
||||
aws-sdk-s3 = "0.24.0"
|
||||
aws-sdk-transcribe = "0.24.0"
|
||||
aws-types = "0.54.0"
|
||||
aws-credential-types = "0.54.0"
|
||||
aws-sig-auth = "0.54.0"
|
||||
aws-smithy-http = { version = "0.54.0", features = [ "rt-tokio" ] }
|
||||
aws-smithy-types = "0.54.0"
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_16"] }
|
||||
aws-config = "0.55.0"
|
||||
aws-sdk-s3 = "0.28.0"
|
||||
aws-sdk-transcribe = "0.28.0"
|
||||
aws-types = "0.55.0"
|
||||
aws-credential-types = "0.55.0"
|
||||
aws-sig-auth = "0.55.0"
|
||||
aws-smithy-http = { version = "0.55.0", features = [ "rt-tokio" ] }
|
||||
aws-smithy-types = "0.55.0"
|
||||
http = "0.2.7"
|
||||
chrono = "0.4"
|
||||
url = "2"
|
||||
percent-encoding = "2"
|
||||
tokio = { version = "1.0", features = [ "full" ] }
|
||||
async-tungstenite = { version = "0.19", features = ["tokio", "tokio-runtime", "tokio-native-tls"] }
|
||||
async-tungstenite = { version = "0.22", features = ["tokio", "tokio-runtime", "tokio-native-tls"] }
|
||||
nom = "7"
|
||||
crc = "3"
|
||||
byteorder = "1.3.4"
|
||||
|
@ -40,12 +40,12 @@ serde_json = "1"
|
|||
atomic_refcell = "0.1"
|
||||
base32 = "0.4"
|
||||
backoff = { version = "0.4", features = [ "futures", "tokio" ] }
|
||||
gio = { git = "https://github.com/gtk-rs/gtk-rs-core.git", package = "gio" }
|
||||
gio = { git = "https://github.com/gtk-rs/gtk-rs-core.git", branch = "0.17", version = "0.17", package = "gio" }
|
||||
|
||||
[dev-dependencies]
|
||||
chrono = { version = "0.4", features = [ "alloc" ] }
|
||||
env_logger = "0.10"
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] }
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_18"] }
|
||||
rand = "0.8"
|
||||
test-with = { version = "0.9", default-features = false }
|
||||
|
||||
|
@ -55,7 +55,7 @@ crate-type = ["cdylib", "rlib"]
|
|||
path = "src/lib.rs"
|
||||
|
||||
[build-dependencies]
|
||||
gst-plugin-version-helper = { path="../../version-helper" }
|
||||
gst-plugin-version-helper = { path="../../version-helper", version = "0.7" }
|
||||
|
||||
[features]
|
||||
static = []
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-MPL-2.0
|
373
net/aws/LICENSE-MPL-2.0
Normal file
373
net/aws/LICENSE-MPL-2.0
Normal file
|
@ -0,0 +1,373 @@
|
|||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
|
@ -164,6 +164,8 @@ struct State {
|
|||
partial_index: usize,
|
||||
send_events: bool,
|
||||
start_time: Option<gst::ClockTime>,
|
||||
discont_offset: gst::ClockTime,
|
||||
last_chained_buffer_rtime: Option<gst::ClockTime>,
|
||||
}
|
||||
|
||||
impl Default for State {
|
||||
|
@ -182,6 +184,8 @@ impl Default for State {
|
|||
partial_index: 0,
|
||||
send_events: true,
|
||||
start_time: None,
|
||||
discont_offset: gst::ClockTime::ZERO,
|
||||
last_chained_buffer_rtime: gst::ClockTime::NONE,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -394,9 +398,12 @@ impl Transcriber {
|
|||
}
|
||||
|
||||
for item in &alternative.items[state.partial_index..] {
|
||||
let start_time =
|
||||
((item.start_time as f64 * 1_000_000_000.0) as u64).nseconds() + lateness;
|
||||
let end_time = ((item.end_time as f64 * 1_000_000_000.0) as u64).nseconds() + lateness;
|
||||
let start_time = ((item.start_time as f64 * 1_000_000_000.0) as u64).nseconds()
|
||||
+ lateness
|
||||
+ state.discont_offset;
|
||||
let end_time = ((item.end_time as f64 * 1_000_000_000.0) as u64).nseconds()
|
||||
+ lateness
|
||||
+ state.discont_offset;
|
||||
|
||||
if !item.stable {
|
||||
break;
|
||||
|
@ -733,12 +740,24 @@ impl Transcriber {
|
|||
let mut delay = None;
|
||||
|
||||
{
|
||||
let state = self.state.lock().unwrap();
|
||||
let mut state = self.state.lock().unwrap();
|
||||
|
||||
if let Some(buffer) = &buffer {
|
||||
let running_time = state.in_segment.to_running_time(buffer.pts());
|
||||
let now = self.obj().current_running_time();
|
||||
|
||||
if let Some(running_time) = running_time {
|
||||
if buffer.flags().contains(gst::BufferFlags::DISCONT) {
|
||||
state.discont = true;
|
||||
if let Some(last_chained_buffer_rtime) = state.last_chained_buffer_rtime {
|
||||
state.discont_offset +=
|
||||
running_time.saturating_sub(last_chained_buffer_rtime);
|
||||
}
|
||||
}
|
||||
|
||||
state.last_chained_buffer_rtime = Some(running_time);
|
||||
}
|
||||
|
||||
delay = running_time.opt_checked_sub(now).ok().flatten();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,10 +19,12 @@ use std::time::Duration;
|
|||
|
||||
use gst::{element_imp_error, glib, prelude::*, subclass::prelude::*};
|
||||
|
||||
use aws_sdk_s3::config;
|
||||
use aws_sdk_s3::model::ObjectCannedAcl;
|
||||
use aws_sdk_s3::types::ByteStream;
|
||||
use aws_sdk_s3::{config::retry::RetryConfig, Client, Credentials, Region};
|
||||
use aws_sdk_s3::{
|
||||
config::{self, retry::RetryConfig, Credentials, Region},
|
||||
primitives::ByteStream,
|
||||
types::ObjectCannedAcl,
|
||||
Client,
|
||||
};
|
||||
use aws_types::sdk_config::SdkConfig;
|
||||
|
||||
use crate::s3utils;
|
||||
|
|
|
@ -11,13 +11,18 @@ use gst::prelude::*;
|
|||
use gst::subclass::prelude::*;
|
||||
use gst_base::subclass::prelude::*;
|
||||
|
||||
use aws_sdk_s3::client::fluent_builders::{
|
||||
AbortMultipartUpload, CompleteMultipartUpload, CreateMultipartUpload, UploadPart,
|
||||
use aws_sdk_s3::{
|
||||
config::{self, retry::RetryConfig, Credentials, Region},
|
||||
operation::{
|
||||
abort_multipart_upload::builders::AbortMultipartUploadFluentBuilder,
|
||||
complete_multipart_upload::builders::CompleteMultipartUploadFluentBuilder,
|
||||
create_multipart_upload::builders::CreateMultipartUploadFluentBuilder,
|
||||
upload_part::builders::UploadPartFluentBuilder,
|
||||
},
|
||||
primitives::ByteStream,
|
||||
types::{CompletedMultipartUpload, CompletedPart},
|
||||
Client,
|
||||
};
|
||||
use aws_sdk_s3::config;
|
||||
use aws_sdk_s3::model::{CompletedMultipartUpload, CompletedPart};
|
||||
use aws_sdk_s3::types::ByteStream;
|
||||
use aws_sdk_s3::{config::retry::RetryConfig, Client, Credentials, Region};
|
||||
|
||||
use futures::future;
|
||||
use once_cell::sync::Lazy;
|
||||
|
@ -84,18 +89,14 @@ impl Started {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
enum State {
|
||||
#[default]
|
||||
Stopped,
|
||||
Completed,
|
||||
Started(Started),
|
||||
}
|
||||
|
||||
impl Default for State {
|
||||
fn default() -> State {
|
||||
State::Stopped
|
||||
}
|
||||
}
|
||||
|
||||
struct Settings {
|
||||
region: Region,
|
||||
bucket: Option<String>,
|
||||
|
@ -240,7 +241,7 @@ impl S3Sink {
|
|||
}
|
||||
|
||||
fn flush_current_buffer(&self) -> Result<(), Option<gst::ErrorMessage>> {
|
||||
let upload_part_req: UploadPart = self.create_upload_part_request()?;
|
||||
let upload_part_req = self.create_upload_part_request()?;
|
||||
|
||||
let mut state = self.state.lock().unwrap();
|
||||
let state = match *state {
|
||||
|
@ -279,7 +280,7 @@ impl S3Sink {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn create_upload_part_request(&self) -> Result<UploadPart, gst::ErrorMessage> {
|
||||
fn create_upload_part_request(&self) -> Result<UploadPartFluentBuilder, gst::ErrorMessage> {
|
||||
let url = self.url.lock().unwrap();
|
||||
let settings = self.settings.lock().unwrap();
|
||||
let mut state = self.state.lock().unwrap();
|
||||
|
@ -318,7 +319,7 @@ impl S3Sink {
|
|||
fn create_complete_multipart_upload_request(
|
||||
&self,
|
||||
started_state: &mut Started,
|
||||
) -> CompleteMultipartUpload {
|
||||
) -> CompleteMultipartUploadFluentBuilder {
|
||||
started_state
|
||||
.completed_parts
|
||||
.sort_by(|a, b| a.part_number.cmp(&b.part_number));
|
||||
|
@ -348,7 +349,7 @@ impl S3Sink {
|
|||
client: &Client,
|
||||
url: &GstS3Url,
|
||||
settings: &Settings,
|
||||
) -> CreateMultipartUpload {
|
||||
) -> CreateMultipartUploadFluentBuilder {
|
||||
let bucket = Some(url.bucket.clone());
|
||||
let key = Some(url.object.clone());
|
||||
let content_type = settings.content_type.clone();
|
||||
|
@ -369,7 +370,7 @@ impl S3Sink {
|
|||
client: &Client,
|
||||
url: &GstS3Url,
|
||||
started_state: &Started,
|
||||
) -> AbortMultipartUpload {
|
||||
) -> AbortMultipartUploadFluentBuilder {
|
||||
let bucket = Some(url.bucket.clone());
|
||||
let key = Some(url.object.clone());
|
||||
|
||||
|
|
|
@ -12,8 +12,10 @@ use once_cell::sync::Lazy;
|
|||
use std::sync::Mutex;
|
||||
use std::time::Duration;
|
||||
|
||||
use aws_sdk_s3::config;
|
||||
use aws_sdk_s3::{config::retry::RetryConfig, Client, Credentials};
|
||||
use aws_sdk_s3::{
|
||||
config::{self, retry::RetryConfig, Credentials},
|
||||
Client,
|
||||
};
|
||||
|
||||
use gst::glib;
|
||||
use gst::prelude::*;
|
||||
|
@ -30,8 +32,10 @@ const DEFAULT_RETRY_ATTEMPTS: u32 = 5;
|
|||
const DEFAULT_REQUEST_TIMEOUT_MSEC: u64 = 15000;
|
||||
const DEFAULT_RETRY_DURATION_MSEC: u64 = 60_000;
|
||||
|
||||
#[derive(Default)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
enum StreamingState {
|
||||
#[default]
|
||||
Stopped,
|
||||
Started {
|
||||
url: GstS3Url,
|
||||
|
@ -40,12 +44,6 @@ enum StreamingState {
|
|||
},
|
||||
}
|
||||
|
||||
impl Default for StreamingState {
|
||||
fn default() -> StreamingState {
|
||||
StreamingState::Stopped
|
||||
}
|
||||
}
|
||||
|
||||
struct Settings {
|
||||
url: Option<GstS3Url>,
|
||||
access_key: Option<String>,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use aws_sdk_s3::Region;
|
||||
use aws_sdk_s3::config::Region;
|
||||
use percent_encoding::{percent_decode, percent_encode, AsciiSet, CONTROLS};
|
||||
use url::Url;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use aws_config::meta::region::RegionProviderChain;
|
||||
use aws_sdk_s3::{config::timeout::TimeoutConfig, Credentials, Region};
|
||||
use aws_sdk_s3::config::{timeout::TimeoutConfig, Credentials, Region};
|
||||
use aws_types::sdk_config::SdkConfig;
|
||||
|
||||
use aws_smithy_http::byte_stream::{error::Error, ByteStream};
|
||||
|
|
|
@ -62,7 +62,7 @@ async fn test_s3() {
|
|||
);
|
||||
|
||||
let region_provider = aws_config::meta::region::RegionProviderChain::first_try(
|
||||
aws_sdk_s3::Region::new(region.clone()),
|
||||
aws_sdk_s3::config::Region::new(region.clone()),
|
||||
)
|
||||
.or_default_provider();
|
||||
|
||||
|
|
|
@ -2,27 +2,27 @@
|
|||
name = "gst-plugin-hlssink3"
|
||||
description = "GStreamer HLS (HTTP Live Streaming) Plugin"
|
||||
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
|
||||
version = "0.10.0-alpha.1"
|
||||
version = "0.10.11"
|
||||
authors = ["Rafael Caricio <rafael@caricio.com>"]
|
||||
edition = "2021"
|
||||
license = "MPL-2.0"
|
||||
rust-version = "1.63"
|
||||
rust-version = "1.64"
|
||||
|
||||
[dependencies]
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
glib = { git = "https://github.com/gtk-rs/gtk-rs-core" }
|
||||
gio = { git = "https://github.com/gtk-rs/gtk-rs-core" }
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
glib = { git = "https://github.com/gtk-rs/gtk-rs-core", branch = "0.17", version = "0.17" }
|
||||
gio = { git = "https://github.com/gtk-rs/gtk-rs-core", branch = "0.17", version = "0.17" }
|
||||
once_cell = "1.7.2"
|
||||
m3u8-rs = "5.0"
|
||||
regex = "1"
|
||||
|
||||
[dev-dependencies]
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
|
||||
[build-dependencies]
|
||||
gst-plugin-version-helper = { path = "../../version-helper" }
|
||||
gst-plugin-version-helper = { path = "../../version-helper", version = "0.7" }
|
||||
|
||||
[lib]
|
||||
name = "gsthlssink3"
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-MPL-2.0
|
373
net/hlssink3/LICENSE-MPL-2.0
Normal file
373
net/hlssink3/LICENSE-MPL-2.0
Normal file
|
@ -0,0 +1,373 @@
|
|||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
|
@ -417,7 +417,7 @@ impl BinImpl for HlsSink3 {
|
|||
"splitmuxsink-fragment-closed" => {
|
||||
let s = msg.structure().unwrap();
|
||||
if let Ok(fragment_closed_at) = s.get::<gst::ClockTime>("running-time") {
|
||||
self.write_playlist(Some(fragment_closed_at)).unwrap();
|
||||
let _ = self.write_playlist(Some(fragment_closed_at));
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
|
@ -512,10 +512,9 @@ impl ObjectImpl for HlsSink3 {
|
|||
}
|
||||
"target-duration" => {
|
||||
settings.target_duration = value.get().expect("type checked upstream");
|
||||
settings.splitmuxsink.set_property(
|
||||
"max-size-time",
|
||||
&((settings.target_duration as u64).seconds()),
|
||||
);
|
||||
settings
|
||||
.splitmuxsink
|
||||
.set_property("max-size-time", (settings.target_duration as u64).seconds());
|
||||
}
|
||||
"playlist-length" => {
|
||||
settings.playlist_length = value.get().expect("type checked upstream");
|
||||
|
@ -541,7 +540,7 @@ impl ObjectImpl for HlsSink3 {
|
|||
settings.send_keyframe_requests = value.get().expect("type checked upstream");
|
||||
settings
|
||||
.splitmuxsink
|
||||
.set_property("send-keyframe-requests", &settings.send_keyframe_requests);
|
||||
.set_property("send-keyframe-requests", settings.send_keyframe_requests);
|
||||
}
|
||||
_ => unimplemented!(),
|
||||
};
|
||||
|
@ -574,7 +573,7 @@ impl ObjectImpl for HlsSink3 {
|
|||
vec![
|
||||
glib::subclass::Signal::builder(SIGNAL_GET_PLAYLIST_STREAM)
|
||||
.param_types([String::static_type()])
|
||||
.return_type::<gio::OutputStream>()
|
||||
.return_type::<Option<gio::OutputStream>>()
|
||||
.class_handler(|_, args| {
|
||||
let element = args[0]
|
||||
.get::<super::HlsSink3>()
|
||||
|
@ -583,12 +582,7 @@ impl ObjectImpl for HlsSink3 {
|
|||
args[1].get::<String>().expect("playlist-stream signal arg");
|
||||
let hlssink3 = element.imp();
|
||||
|
||||
Some(
|
||||
hlssink3
|
||||
.new_file_stream(&playlist_location)
|
||||
.ok()?
|
||||
.to_value(),
|
||||
)
|
||||
Some(hlssink3.new_file_stream(&playlist_location).ok().to_value())
|
||||
})
|
||||
.accumulator(|_hint, ret, value| {
|
||||
// First signal handler wins
|
||||
|
@ -598,7 +592,7 @@ impl ObjectImpl for HlsSink3 {
|
|||
.build(),
|
||||
glib::subclass::Signal::builder(SIGNAL_GET_FRAGMENT_STREAM)
|
||||
.param_types([String::static_type()])
|
||||
.return_type::<gio::OutputStream>()
|
||||
.return_type::<Option<gio::OutputStream>>()
|
||||
.class_handler(|_, args| {
|
||||
let element = args[0]
|
||||
.get::<super::HlsSink3>()
|
||||
|
@ -607,12 +601,7 @@ impl ObjectImpl for HlsSink3 {
|
|||
args[1].get::<String>().expect("fragment-stream signal arg");
|
||||
let hlssink3 = element.imp();
|
||||
|
||||
Some(
|
||||
hlssink3
|
||||
.new_file_stream(&fragment_location)
|
||||
.ok()?
|
||||
.to_value(),
|
||||
)
|
||||
Some(hlssink3.new_file_stream(&fragment_location).ok().to_value())
|
||||
})
|
||||
.accumulator(|_hint, ret, value| {
|
||||
// First signal handler wins
|
||||
|
@ -767,7 +756,8 @@ impl ElementImpl for HlsSink3 {
|
|||
};
|
||||
|
||||
if write_final {
|
||||
self.write_final_playlist()?;
|
||||
// Don't fail transitioning to READY if this fails
|
||||
let _ = self.write_final_playlist();
|
||||
}
|
||||
}
|
||||
gst::StateChange::ReadyToNull => {
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
[package]
|
||||
name = "gst-plugin-ndi"
|
||||
version = "0.10.0-alpha.1"
|
||||
version = "0.10.11"
|
||||
authors = ["Ruben Gonzalez <rubenrua@teltek.es>", "Daniel Vilar <daniel.peiteado@teltek.es>", "Sebastian Dröge <sebastian@centricular.com>"]
|
||||
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
|
||||
license = "MPL-2.0"
|
||||
description = "GStreamer NewTek NDI Plugin"
|
||||
edition = "2021"
|
||||
rust-version = "1.63"
|
||||
rust-version = "1.64"
|
||||
|
||||
[dependencies]
|
||||
glib = { git = "https://github.com/gtk-rs/gtk-rs-core"}
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
glib = { git = "https://github.com/gtk-rs/gtk-rs-core", branch = "0.17", version = "0.17"}
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
byte-slice-cast = "1"
|
||||
once_cell = "1.0"
|
||||
byteorder = "1.0"
|
||||
atomic_refcell = "0.1"
|
||||
libloading = "0.7"
|
||||
libloading = "0.8"
|
||||
|
||||
[build-dependencies]
|
||||
gst-plugin-version-helper = { path = "../../version-helper" }
|
||||
gst-plugin-version-helper = { path = "../../version-helper", version = "0.7" }
|
||||
|
||||
[features]
|
||||
default = ["interlaced-fields", "sink"]
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-MPL-2.0
|
373
net/ndi/LICENSE-MPL-2.0
Normal file
373
net/ndi/LICENSE-MPL-2.0
Normal file
|
@ -0,0 +1,373 @@
|
|||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
|
@ -25,7 +25,16 @@ struct State {
|
|||
// to the current_video_buffer below!
|
||||
video_info: Option<gst_video::VideoInfo>,
|
||||
audio_info: Option<gst_audio::AudioInfo>,
|
||||
current_video_buffer: Option<(gst::Buffer, gst::ClockTime)>,
|
||||
// These are only ever set when a change is pending mid-stream. They apply to the currently
|
||||
// pending buffer on the pad and not to the current_video_buffer.
|
||||
pending_caps: Option<gst::Caps>,
|
||||
pending_segment: Option<gst::Segment>,
|
||||
current_video_buffer: Option<(
|
||||
gst::Buffer,
|
||||
gst::ClockTime,
|
||||
Option<gst::Caps>,
|
||||
Option<gst::Segment>,
|
||||
)>,
|
||||
current_audio_buffers: Vec<(gst::Buffer, gst_audio::AudioInfo, i64)>,
|
||||
}
|
||||
|
||||
|
@ -181,6 +190,8 @@ impl AggregatorImpl for NdiSinkCombiner {
|
|||
*state_storage = Some(State {
|
||||
audio_info: None,
|
||||
video_info: None,
|
||||
pending_caps: None,
|
||||
pending_segment: None,
|
||||
current_video_buffer: None,
|
||||
current_audio_buffers: Vec::new(),
|
||||
});
|
||||
|
@ -373,75 +384,87 @@ impl AggregatorImpl for NdiSinkCombiner {
|
|||
None => return Err(gst::FlowError::Flushing),
|
||||
};
|
||||
|
||||
let (mut current_video_buffer, current_video_running_time_end, next_video_buffer) =
|
||||
if let Some((video_buffer, video_segment)) = video_buffer_and_segment {
|
||||
let video_running_time = video_segment.to_running_time(video_buffer.pts()).unwrap();
|
||||
let (
|
||||
mut current_video_buffer,
|
||||
current_video_running_time_end,
|
||||
pending_caps,
|
||||
pending_segment,
|
||||
next_video_buffer,
|
||||
) = if let Some((video_buffer, video_segment)) = video_buffer_and_segment {
|
||||
let video_running_time = video_segment.to_running_time(video_buffer.pts()).unwrap();
|
||||
if let Some(pending_segment) = &state.pending_segment {
|
||||
assert_eq!(video_segment.upcast_ref(), pending_segment);
|
||||
}
|
||||
|
||||
match state.current_video_buffer {
|
||||
None => {
|
||||
gst::trace!(CAT, imp: self, "First video buffer, waiting for second");
|
||||
state.current_video_buffer = Some((video_buffer, video_running_time));
|
||||
drop(state_storage);
|
||||
self.video_pad.drop_buffer();
|
||||
return Err(gst_base::AGGREGATOR_FLOW_NEED_DATA);
|
||||
}
|
||||
Some((ref buffer, _)) => (
|
||||
buffer.clone(),
|
||||
Some(video_running_time),
|
||||
Some((video_buffer, video_running_time)),
|
||||
),
|
||||
match &state.current_video_buffer {
|
||||
None => {
|
||||
gst::trace!(CAT, imp: self, "First video buffer, waiting for second");
|
||||
state.current_video_buffer = Some((
|
||||
video_buffer,
|
||||
video_running_time,
|
||||
state.pending_caps.take(),
|
||||
state.pending_segment.take(),
|
||||
));
|
||||
drop(state_storage);
|
||||
self.video_pad.drop_buffer();
|
||||
return Err(gst_base::AGGREGATOR_FLOW_NEED_DATA);
|
||||
}
|
||||
} else {
|
||||
match (&state.current_video_buffer, &audio_buffer_segment_and_pad) {
|
||||
(None, None) => {
|
||||
gst::trace!(
|
||||
CAT,
|
||||
imp: self,
|
||||
"All pads are EOS and no buffers are queued, finishing"
|
||||
);
|
||||
return Err(gst::FlowError::Eos);
|
||||
}
|
||||
(None, Some((ref audio_buffer, ref audio_segment, _))) => {
|
||||
// Create an empty dummy buffer for attaching the audio. This is going to
|
||||
// be dropped by the sink later.
|
||||
let audio_running_time =
|
||||
audio_segment.to_running_time(audio_buffer.pts()).unwrap();
|
||||
Some((ref buffer, _, pending_caps, pending_segment)) => (
|
||||
buffer.clone(),
|
||||
Some(video_running_time),
|
||||
pending_caps.clone(),
|
||||
pending_segment.clone(),
|
||||
Some((video_buffer, video_running_time)),
|
||||
),
|
||||
}
|
||||
} else {
|
||||
match (&state.current_video_buffer, &audio_buffer_segment_and_pad) {
|
||||
(None, None) => {
|
||||
gst::trace!(
|
||||
CAT,
|
||||
imp: self,
|
||||
"All pads are EOS and no buffers are queued, finishing"
|
||||
);
|
||||
return Err(gst::FlowError::Eos);
|
||||
}
|
||||
(None, Some((ref audio_buffer, ref audio_segment, _))) => {
|
||||
// Create an empty dummy buffer for attaching the audio. This is going to
|
||||
// be dropped by the sink later.
|
||||
let audio_running_time =
|
||||
audio_segment.to_running_time(audio_buffer.pts()).unwrap();
|
||||
|
||||
let video_segment = self.video_pad.segment();
|
||||
let video_segment = match video_segment.downcast::<gst::ClockTime>() {
|
||||
Ok(video_segment) => video_segment,
|
||||
Err(video_segment) => {
|
||||
gst::error!(
|
||||
CAT,
|
||||
imp: self,
|
||||
"Video segment of wrong format {:?}",
|
||||
video_segment.format()
|
||||
);
|
||||
return Err(gst::FlowError::Error);
|
||||
}
|
||||
};
|
||||
let video_pts =
|
||||
video_segment.position_from_running_time(audio_running_time);
|
||||
if video_pts.is_none() {
|
||||
gst::warning!(
|
||||
let video_segment = self.video_pad.segment();
|
||||
let video_segment = match video_segment.downcast::<gst::ClockTime>() {
|
||||
Ok(video_segment) => video_segment,
|
||||
Err(video_segment) => {
|
||||
gst::error!(
|
||||
CAT,
|
||||
imp: self,
|
||||
"Can't output more audio after video EOS"
|
||||
"Video segment of wrong format {:?}",
|
||||
video_segment.format()
|
||||
);
|
||||
return Err(gst::FlowError::Eos);
|
||||
return Err(gst::FlowError::Error);
|
||||
}
|
||||
|
||||
let mut buffer = gst::Buffer::new();
|
||||
{
|
||||
let buffer = buffer.get_mut().unwrap();
|
||||
buffer.set_pts(video_pts);
|
||||
}
|
||||
|
||||
(buffer, gst::ClockTime::NONE, None)
|
||||
};
|
||||
let video_pts = video_segment.position_from_running_time(audio_running_time);
|
||||
if video_pts.is_none() {
|
||||
gst::warning!(CAT, imp: self, "Can't output more audio after video EOS");
|
||||
return Err(gst::FlowError::Eos);
|
||||
}
|
||||
(Some((ref buffer, _)), _) => (buffer.clone(), gst::ClockTime::NONE, None),
|
||||
|
||||
let mut buffer = gst::Buffer::new();
|
||||
{
|
||||
let buffer = buffer.get_mut().unwrap();
|
||||
buffer.set_pts(video_pts);
|
||||
}
|
||||
|
||||
(buffer, gst::ClockTime::NONE, None, None, None)
|
||||
}
|
||||
};
|
||||
(Some((ref buffer, _, _, _)), _) => {
|
||||
(buffer.clone(), gst::ClockTime::NONE, None, None, None)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if let Some((audio_buffer, audio_segment, audio_pad)) = audio_buffer_segment_and_pad {
|
||||
let audio_info = match state.audio_info {
|
||||
|
@ -508,7 +531,7 @@ impl AggregatorImpl for NdiSinkCombiner {
|
|||
}
|
||||
|
||||
if let Some((video_buffer, video_running_time)) = next_video_buffer {
|
||||
state.current_video_buffer = Some((video_buffer, video_running_time));
|
||||
state.current_video_buffer = Some((video_buffer, video_running_time, None, None));
|
||||
drop(state_storage);
|
||||
self.video_pad.drop_buffer();
|
||||
} else {
|
||||
|
@ -522,7 +545,14 @@ impl AggregatorImpl for NdiSinkCombiner {
|
|||
"Finishing video buffer {:?}",
|
||||
current_video_buffer
|
||||
);
|
||||
self.obj().finish_buffer(current_video_buffer)
|
||||
if let Some(caps) = pending_caps {
|
||||
self.obj().set_src_caps(&caps);
|
||||
}
|
||||
if let Some(segment) = pending_segment {
|
||||
self.obj().update_segment(&segment);
|
||||
}
|
||||
let ret = self.obj().finish_buffer(current_video_buffer);
|
||||
ret
|
||||
}
|
||||
|
||||
fn sink_event(&self, pad: &gst_base::AggregatorPad, event: gst::Event) -> bool {
|
||||
|
@ -539,6 +569,7 @@ impl AggregatorImpl for NdiSinkCombiner {
|
|||
};
|
||||
|
||||
if pad == &self.video_pad {
|
||||
let mut send_caps_immediately = true;
|
||||
let info = match gst_video::VideoInfo::from_caps(&caps) {
|
||||
Ok(info) => info,
|
||||
Err(_) => {
|
||||
|
@ -559,13 +590,21 @@ impl AggregatorImpl for NdiSinkCombiner {
|
|||
};
|
||||
|
||||
state.video_info = Some(info);
|
||||
if state.current_video_buffer.is_some() {
|
||||
state.pending_caps = Some(caps.clone());
|
||||
send_caps_immediately = false;
|
||||
} else {
|
||||
state.pending_caps = None;
|
||||
}
|
||||
|
||||
drop(state_storage);
|
||||
|
||||
self.obj().set_latency(latency, gst::ClockTime::NONE);
|
||||
|
||||
// The video caps are passed through as the audio is included only in a meta
|
||||
self.obj().set_src_caps(&caps);
|
||||
if send_caps_immediately {
|
||||
self.obj().set_src_caps(&caps);
|
||||
}
|
||||
} else {
|
||||
let info = match gst_audio::AudioInfo::from_caps(&caps) {
|
||||
Ok(info) => info,
|
||||
|
@ -582,7 +621,33 @@ impl AggregatorImpl for NdiSinkCombiner {
|
|||
EventView::Segment(segment) if pad == &self.video_pad => {
|
||||
let segment = segment.segment();
|
||||
gst::debug!(CAT, obj: pad, "Updating segment {:?}", segment);
|
||||
self.obj().update_segment(segment);
|
||||
let mut state_storage = self.state.lock().unwrap();
|
||||
let state = match &mut *state_storage {
|
||||
Some(ref mut state) => state,
|
||||
None => return false,
|
||||
};
|
||||
let mut send_segment_immediately = true;
|
||||
if state.current_video_buffer.is_some() {
|
||||
state.pending_segment = Some(segment.clone());
|
||||
send_segment_immediately = false;
|
||||
} else {
|
||||
state.pending_caps = None;
|
||||
}
|
||||
drop(state_storage);
|
||||
|
||||
if send_segment_immediately {
|
||||
self.obj().update_segment(segment);
|
||||
}
|
||||
}
|
||||
|
||||
EventView::FlushStop(_) if pad == &self.video_pad => {
|
||||
let mut state_storage = self.state.lock().unwrap();
|
||||
let state = match &mut *state_storage {
|
||||
Some(ref mut state) => state,
|
||||
None => return false,
|
||||
};
|
||||
state.pending_segment = None;
|
||||
state.pending_caps = None;
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
|
|
@ -1376,105 +1376,131 @@ impl Receiver {
|
|||
} else {
|
||||
4 * vframe.width() as usize
|
||||
};
|
||||
|
||||
let dest_stride = vframe.plane_stride()[0] as usize;
|
||||
let dest = vframe.plane_data_mut(0).unwrap();
|
||||
let src_stride = video_frame.line_stride_or_data_size_in_bytes() as usize;
|
||||
let plane_size = video_frame.yres() as usize * src_stride;
|
||||
|
||||
if src.len() < plane_size || src_stride < line_bytes {
|
||||
gst::error!(CAT, obj: element, "Video packet has wrong stride or size");
|
||||
gst::element_error!(
|
||||
element,
|
||||
gst::StreamError::Format,
|
||||
["Video packet has wrong stride or size"]
|
||||
);
|
||||
return Err(gst::FlowError::Error);
|
||||
}
|
||||
|
||||
for (dest, src) in dest
|
||||
.chunks_exact_mut(dest_stride)
|
||||
.zip(src.chunks_exact(src_stride))
|
||||
{
|
||||
dest.copy_from_slice(src);
|
||||
dest.copy_from_slice(&src[..line_bytes]);
|
||||
dest[..line_bytes].copy_from_slice(&src[..line_bytes]);
|
||||
}
|
||||
}
|
||||
gst_video::VideoFormat::Nv12 => {
|
||||
let line_bytes = vframe.width() as usize;
|
||||
let src_stride = video_frame.line_stride_or_data_size_in_bytes() as usize;
|
||||
let plane_size = video_frame.yres() as usize * src_stride;
|
||||
|
||||
if src.len() < 2 * plane_size || src_stride < line_bytes {
|
||||
gst::error!(CAT, obj: element, "Video packet has wrong stride or size");
|
||||
gst::element_error!(
|
||||
element,
|
||||
gst::StreamError::Format,
|
||||
["Video packet has wrong stride or size"]
|
||||
);
|
||||
return Err(gst::FlowError::Error);
|
||||
}
|
||||
|
||||
// First plane
|
||||
{
|
||||
let line_bytes = vframe.width() as usize;
|
||||
let dest_stride = vframe.plane_stride()[0] as usize;
|
||||
let dest = vframe.plane_data_mut(0).unwrap();
|
||||
let src_stride =
|
||||
video_frame.line_stride_or_data_size_in_bytes() as usize;
|
||||
let src = &src[..plane_size];
|
||||
|
||||
for (dest, src) in dest
|
||||
.chunks_exact_mut(dest_stride)
|
||||
.zip(src.chunks_exact(src_stride))
|
||||
{
|
||||
dest.copy_from_slice(&src[..line_bytes]);
|
||||
dest[..line_bytes].copy_from_slice(&src[..line_bytes]);
|
||||
}
|
||||
}
|
||||
|
||||
// Second plane
|
||||
{
|
||||
let line_bytes = vframe.width() as usize;
|
||||
let dest_stride = vframe.plane_stride()[1] as usize;
|
||||
let dest = vframe.plane_data_mut(1).unwrap();
|
||||
let src_stride =
|
||||
video_frame.line_stride_or_data_size_in_bytes() as usize;
|
||||
let src = &src[(video_frame.yres() as usize * src_stride)..];
|
||||
let src = &src[plane_size..];
|
||||
|
||||
for (dest, src) in dest
|
||||
.chunks_exact_mut(dest_stride)
|
||||
.zip(src.chunks_exact(src_stride))
|
||||
{
|
||||
dest.copy_from_slice(&src[..line_bytes]);
|
||||
dest[..line_bytes].copy_from_slice(&src[..line_bytes]);
|
||||
}
|
||||
}
|
||||
}
|
||||
gst_video::VideoFormat::Yv12 | gst_video::VideoFormat::I420 => {
|
||||
let line_bytes = vframe.width() as usize;
|
||||
let line_bytes1 = (line_bytes + 1) / 2;
|
||||
|
||||
let src_stride = video_frame.line_stride_or_data_size_in_bytes() as usize;
|
||||
let src_stride1 = (src_stride + 1) / 2;
|
||||
|
||||
let plane_size = video_frame.yres() as usize * src_stride;
|
||||
let plane_size1 = ((video_frame.yres() as usize + 1) / 2) * src_stride1;
|
||||
|
||||
if src.len() < plane_size + 2 * plane_size1 || src_stride < line_bytes {
|
||||
gst::error!(CAT, obj: element, "Video packet has wrong stride or size");
|
||||
gst::element_error!(
|
||||
element,
|
||||
gst::StreamError::Format,
|
||||
["Video packet has wrong stride or size"]
|
||||
);
|
||||
return Err(gst::FlowError::Error);
|
||||
}
|
||||
|
||||
// First plane
|
||||
{
|
||||
let line_bytes = vframe.width() as usize;
|
||||
let dest_stride = vframe.plane_stride()[0] as usize;
|
||||
let dest = vframe.plane_data_mut(0).unwrap();
|
||||
let src_stride =
|
||||
video_frame.line_stride_or_data_size_in_bytes() as usize;
|
||||
let src = &src[..plane_size];
|
||||
|
||||
for (dest, src) in dest
|
||||
.chunks_exact_mut(dest_stride)
|
||||
.zip(src.chunks_exact(src_stride))
|
||||
{
|
||||
dest.copy_from_slice(&src[..line_bytes]);
|
||||
dest[..line_bytes].copy_from_slice(&src[..line_bytes]);
|
||||
}
|
||||
}
|
||||
|
||||
// Second plane
|
||||
{
|
||||
let line_bytes = (vframe.width() as usize + 1) / 2;
|
||||
let dest_stride = vframe.plane_stride()[1] as usize;
|
||||
let dest = vframe.plane_data_mut(1).unwrap();
|
||||
let src_stride =
|
||||
video_frame.line_stride_or_data_size_in_bytes() as usize;
|
||||
let src_stride1 =
|
||||
video_frame.line_stride_or_data_size_in_bytes() as usize / 2;
|
||||
let src = &src[(video_frame.yres() as usize * src_stride)..];
|
||||
let src = &src[plane_size..][..plane_size1];
|
||||
|
||||
for (dest, src) in dest
|
||||
.chunks_exact_mut(dest_stride)
|
||||
.zip(src.chunks_exact(src_stride1))
|
||||
{
|
||||
dest.copy_from_slice(&src[..line_bytes]);
|
||||
dest[..line_bytes1].copy_from_slice(&src[..line_bytes1]);
|
||||
}
|
||||
}
|
||||
|
||||
// Third plane
|
||||
{
|
||||
let line_bytes = (vframe.width() as usize + 1) / 2;
|
||||
let dest_stride = vframe.plane_stride()[2] as usize;
|
||||
let dest = vframe.plane_data_mut(2).unwrap();
|
||||
let src_stride =
|
||||
video_frame.line_stride_or_data_size_in_bytes() as usize;
|
||||
let src_stride1 =
|
||||
video_frame.line_stride_or_data_size_in_bytes() as usize / 2;
|
||||
let src = &src[(video_frame.yres() as usize * src_stride
|
||||
+ (video_frame.yres() as usize + 1) / 2 * src_stride1)..];
|
||||
let src = &src[plane_size + plane_size1..][..plane_size1];
|
||||
|
||||
for (dest, src) in dest
|
||||
.chunks_exact_mut(dest_stride)
|
||||
.zip(src.chunks_exact(src_stride1))
|
||||
{
|
||||
dest.copy_from_slice(&src[..line_bytes]);
|
||||
dest[..line_bytes1].copy_from_slice(&src[..line_bytes1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
[package]
|
||||
name = "gst-plugin-onvif"
|
||||
version = "0.10.0-alpha.1"
|
||||
version = "0.10.11"
|
||||
authors = ["Mathieu Duponchelle <mathieu@centricular.com>"]
|
||||
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
|
||||
license = "MPL-2.0"
|
||||
description = "GStreamer Rust ONVIF Plugin"
|
||||
edition = "2021"
|
||||
rust-version = "1.63"
|
||||
rust-version = "1.64"
|
||||
|
||||
[dependencies]
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_20"] }
|
||||
gst-rtp = { package = "gstreamer-rtp", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_20"] }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_20"] }
|
||||
gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_20"] }
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_20"] }
|
||||
gst-rtp = { package = "gstreamer-rtp", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_20"] }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_20"] }
|
||||
gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_20"] }
|
||||
once_cell = "1.0"
|
||||
xmlparser = "0.13"
|
||||
chrono = { version = "0.4", default-features = false }
|
||||
cairo-rs = { git = "https://github.com/gtk-rs/gtk-rs-core", features=["use_glib"] }
|
||||
pango = { git = "https://github.com/gtk-rs/gtk-rs-core" }
|
||||
pangocairo = { git = "https://github.com/gtk-rs/gtk-rs-core" }
|
||||
cairo-rs = { git = "https://github.com/gtk-rs/gtk-rs-core", branch = "0.17", version = "0.17", features=["use_glib"] }
|
||||
pango = { git = "https://github.com/gtk-rs/gtk-rs-core", branch = "0.17", version = "0.17" }
|
||||
pangocairo = { git = "https://github.com/gtk-rs/gtk-rs-core", branch = "0.17", version = "0.17" }
|
||||
xmltree = "0.10"
|
||||
|
||||
[lib]
|
||||
|
@ -27,7 +27,7 @@ crate-type = ["cdylib", "rlib"]
|
|||
path = "src/lib.rs"
|
||||
|
||||
[build-dependencies]
|
||||
gst-plugin-version-helper = { path="../../version-helper" }
|
||||
gst-plugin-version-helper = { path="../../version-helper", version = "0.7" }
|
||||
|
||||
[features]
|
||||
static = []
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-MPL-2.0
|
373
net/onvif/LICENSE-MPL-2.0
Normal file
373
net/onvif/LICENSE-MPL-2.0
Normal file
|
@ -0,0 +1,373 @@
|
|||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
|
@ -130,7 +130,7 @@ gst::plugin_define!(
|
|||
env!("CARGO_PKG_DESCRIPTION"),
|
||||
plugin_init,
|
||||
concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")),
|
||||
"MPL",
|
||||
"MPL-2.0",
|
||||
env!("CARGO_PKG_NAME"),
|
||||
env!("CARGO_PKG_NAME"),
|
||||
env!("CARGO_PKG_REPOSITORY"),
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
[package]
|
||||
name = "gst-plugin-raptorq"
|
||||
version = "0.10.0-alpha.1"
|
||||
version = "0.10.11"
|
||||
authors = ["Tomasz Andrzejak <andreiltd@gmail.com>"]
|
||||
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
|
||||
description = "GStreamer RaptorQ FEC Plugin"
|
||||
license = "MPL-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.63"
|
||||
rust-version = "1.64"
|
||||
|
||||
[dependencies]
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-rtp = { package = "gstreamer-rtp", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-rtp = { package = "gstreamer-rtp", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
once_cell = "1.0"
|
||||
raptorq = "1.7"
|
||||
|
||||
[dev-dependencies]
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] }
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20", features = ["v1_18"] }
|
||||
rand = "0.8"
|
||||
|
||||
[lib]
|
||||
|
@ -25,7 +25,7 @@ crate-type = ["cdylib", "rlib"]
|
|||
path = "src/lib.rs"
|
||||
|
||||
[build-dependencies]
|
||||
gst-plugin-version-helper = { path="../../version-helper" }
|
||||
gst-plugin-version-helper = { path="../../version-helper", version = "0.7" }
|
||||
|
||||
[features]
|
||||
static = []
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../LICENSE-MPL-2.0
|
373
net/raptorq/LICENSE-MPL-2.0
Normal file
373
net/raptorq/LICENSE-MPL-2.0
Normal file
|
@ -0,0 +1,373 @@
|
|||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
|
@ -1,12 +1,12 @@
|
|||
[package]
|
||||
name = "gst-plugin-reqwest"
|
||||
version = "0.10.0-alpha.1"
|
||||
version = "0.10.11"
|
||||
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
|
||||
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "GStreamer reqwest HTTP Source Plugin"
|
||||
edition = "2021"
|
||||
rust-version = "1.63"
|
||||
rust-version = "1.64"
|
||||
|
||||
[dependencies]
|
||||
url = "2.1"
|
||||
|
@ -14,14 +14,14 @@ reqwest = { version = "0.11", features = ["cookies", "gzip"] }
|
|||
futures = "0.3"
|
||||
headers = "0.3"
|
||||
mime = "0.3"
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
tokio = { version = "1.0", default-features = false, features = ["time", "rt-multi-thread"] }
|
||||
once_cell = "1.0"
|
||||
|
||||
[dev-dependencies]
|
||||
hyper = { version = "0.14", features = ["server"] }
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.20", version = "0.20" }
|
||||
|
||||
[lib]
|
||||
name = "gstreqwest"
|
||||
|
@ -29,7 +29,7 @@ crate-type = ["cdylib", "rlib"]
|
|||
path = "src/lib.rs"
|
||||
|
||||
[build-dependencies]
|
||||
gst-plugin-version-helper = { path="../../version-helper" }
|
||||
gst-plugin-version-helper = { path="../../version-helper", version = "0.7" }
|
||||
|
||||
[features]
|
||||
static = []
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue