mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 17:41:05 +00:00
Remove unneeded sys subdirectory
This commit is contained in:
parent
109eac2b9a
commit
1b20aa407b
10 changed files with 6 additions and 318 deletions
|
@ -1,7 +1,11 @@
|
||||||
# How to update the bindings
|
# How to update the bindings
|
||||||
|
|
||||||
* Make sure gstreamer-rs-sys is up to date
|
* Take the updated .gir files (e.g. from your gst-build checkout) and put
|
||||||
* Take the updated .gir files from gstreamer-rs-sys and copy them over
|
them in the gir-files directory
|
||||||
|
* In the gir-files directory, run ./fix.sh
|
||||||
|
* In the GstVideo-1.0.gir file, the `GST_VIDEO_BUFFER_FLAG_ONEFIELD` and
|
||||||
|
`GST_VIDEO_FRAME_FLAG_ONEFIELD` flags are twice. This is a gir bug. Delete
|
||||||
|
the second one.
|
||||||
* If there is a new GStreamer version: Manually update `gst*/Cargo.toml`
|
* If there is a new GStreamer version: Manually update `gst*/Cargo.toml`
|
||||||
* Run generator.py
|
* Run generator.py
|
||||||
* Investigate the diff, fix any mess-ups, look at commented functions and
|
* Investigate the diff, fix any mess-ups, look at commented functions and
|
||||||
|
|
3
sys/.gitignore
vendored
3
sys/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
||||||
/target/
|
|
||||||
**/*.rs.bk
|
|
||||||
Cargo.lock
|
|
|
@ -1,118 +0,0 @@
|
||||||
include:
|
|
||||||
- remote: "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/raw/master/ci/images_template.yml"
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- "lint"
|
|
||||||
- "test"
|
|
||||||
- "extras"
|
|
||||||
|
|
||||||
.base:
|
|
||||||
image: "registry.freedesktop.org/gstreamer/gstreamer-rs/debian/10:$RUST_VERSION-$GST_RS_IMG_TAG"
|
|
||||||
variables:
|
|
||||||
G_DEBUG: "fatal_warnings"
|
|
||||||
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
|
|
||||||
|
|
||||||
.img-stable:
|
|
||||||
extends: .base
|
|
||||||
variables:
|
|
||||||
RUST_VERSION: "stable"
|
|
||||||
|
|
||||||
.img-1-41:
|
|
||||||
extends: .base
|
|
||||||
variables:
|
|
||||||
RUST_VERSION: "1.41.0"
|
|
||||||
|
|
||||||
.img-nightly:
|
|
||||||
extends: .base
|
|
||||||
variables:
|
|
||||||
RUST_VERSION: "nightly"
|
|
||||||
|
|
||||||
.cargo test:
|
|
||||||
stage: "test"
|
|
||||||
script:
|
|
||||||
- rustc --version
|
|
||||||
- cargo --version
|
|
||||||
- cargo build --locked --all --color=always
|
|
||||||
# FIXME: tests are broken
|
|
||||||
# https://github.com/sdroege/gstreamer-sys/issues/16
|
|
||||||
# - cargo test --locked --all --color=always
|
|
||||||
- cargo build --locked --all --all-features --color=always
|
|
||||||
# FIXME: tests are broken
|
|
||||||
# https://github.com/sdroege/gstreamer-sys/issues/16
|
|
||||||
# - cargo test --locked --all --all-features --color=always
|
|
||||||
|
|
||||||
# Run tests for crates we can currently run. The others
|
|
||||||
# need a new release of the C library first
|
|
||||||
- |
|
|
||||||
for crate in gstreamer-app-sys \
|
|
||||||
gstreamer-audio-sys \
|
|
||||||
gstreamer-base-sys \
|
|
||||||
gstreamer-check-sys \
|
|
||||||
gstreamer-gl-sys \
|
|
||||||
gstreamer-mpegts-sys \
|
|
||||||
gstreamer-net-sys \
|
|
||||||
gstreamer-pbutils-sys \
|
|
||||||
gstreamer-player-sys \
|
|
||||||
gstreamer-rtsp-sys \
|
|
||||||
gstreamer-sdp-sys \
|
|
||||||
gstreamer-sys \
|
|
||||||
gstreamer-tag-sys \
|
|
||||||
gstreamer-video-sys \
|
|
||||||
gstreamer-webrtc-sys \
|
|
||||||
gstreamer-controller-sys; \
|
|
||||||
do \
|
|
||||||
cargo test --locked -p $crate; \
|
|
||||||
done
|
|
||||||
|
|
||||||
test stable:
|
|
||||||
extends:
|
|
||||||
- '.cargo test'
|
|
||||||
- .img-stable
|
|
||||||
|
|
||||||
test 1.41:
|
|
||||||
extends:
|
|
||||||
- '.cargo test'
|
|
||||||
- .img-1-41
|
|
||||||
|
|
||||||
test nightly:
|
|
||||||
extends:
|
|
||||||
- '.cargo test'
|
|
||||||
- .img-nightly
|
|
||||||
|
|
||||||
rustfmt:
|
|
||||||
extends: .img-stable
|
|
||||||
stage: "lint"
|
|
||||||
script:
|
|
||||||
- cargo fmt --version
|
|
||||||
- cargo fmt -- --color=always --check
|
|
||||||
|
|
||||||
check commits:
|
|
||||||
extends: .img-stable
|
|
||||||
stage: "lint"
|
|
||||||
script:
|
|
||||||
- ci-fairy check-commits --textwidth 0 --no-signed-off-by
|
|
||||||
|
|
||||||
outdated:
|
|
||||||
extends: .img-stable
|
|
||||||
allow_failure: true
|
|
||||||
stage: 'extras'
|
|
||||||
only:
|
|
||||||
- schedules
|
|
||||||
script:
|
|
||||||
- cargo outdated --root-deps-only --exit-code 1 -v
|
|
||||||
|
|
||||||
deny:
|
|
||||||
extends: .img-stable
|
|
||||||
stage: 'extras'
|
|
||||||
only:
|
|
||||||
- schedules
|
|
||||||
script:
|
|
||||||
- cargo deny check
|
|
|
@ -1,23 +0,0 @@
|
||||||
[workspace]
|
|
||||||
|
|
||||||
members = [
|
|
||||||
"gstreamer-sys",
|
|
||||||
"gstreamer-base-sys",
|
|
||||||
"gstreamer-tag-sys",
|
|
||||||
"gstreamer-audio-sys",
|
|
||||||
"gstreamer-video-sys",
|
|
||||||
"gstreamer-pbutils-sys",
|
|
||||||
"gstreamer-app-sys",
|
|
||||||
"gstreamer-player-sys",
|
|
||||||
"gstreamer-mpegts-sys",
|
|
||||||
"gstreamer-net-sys",
|
|
||||||
"gstreamer-sdp-sys",
|
|
||||||
"gstreamer-rtsp-sys",
|
|
||||||
"gstreamer-rtsp-server-sys",
|
|
||||||
"gstreamer-webrtc-sys",
|
|
||||||
"gstreamer-gl-sys",
|
|
||||||
"gstreamer-editing-services-sys",
|
|
||||||
"gstreamer-check-sys",
|
|
||||||
"gstreamer-rtp-sys",
|
|
||||||
"gstreamer-controller-sys",
|
|
||||||
]
|
|
|
@ -1,13 +0,0 @@
|
||||||
# How to update the bindings
|
|
||||||
|
|
||||||
* Take the updated .gir files (e.g. from your gst-build checkout) and put
|
|
||||||
them in the gir-files directory
|
|
||||||
* In the gir-files directory, run ./fix.sh
|
|
||||||
* In the GstVideo-1.0.gir file, the `GST_VIDEO_BUFFER_FLAG_ONEFIELD` and
|
|
||||||
`GST_VIDEO_FRAME_FLAG_ONEFIELD` flags are twice. This is a gir bug. Delete
|
|
||||||
the second one.
|
|
||||||
* If there is a new GStreamer version: Manually update `gst*/Cargo.toml` and
|
|
||||||
`gst*/build.rs` files. generator.py will mess these up.
|
|
||||||
* Run generator.py
|
|
||||||
* `git checkout gst*/Cargo.toml gst*/build.rs`
|
|
||||||
* Investigate the diff and fix any mess-ups
|
|
23
sys/LICENSE
23
sys/LICENSE
|
@ -1,23 +0,0 @@
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2017 Sebastian Dröge <sebastian@centricular.com>.
|
|
||||||
|
|
||||||
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,33 +0,0 @@
|
||||||
# NOTE: The canonical repository for gstreamer-sys has moved to [freedesktop.org GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys)!
|
|
||||||
|
|
||||||
# gstreamer-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-sys.svg)](https://crates.io/crates/gstreamer-sys) [![pipeline status](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/badges/master/pipeline.svg)](https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/commits/master)
|
|
||||||
|
|
||||||
[GStreamer](https://gstreamer.freedesktop.org/) FFI bindings for Rust.
|
|
||||||
|
|
||||||
These bindings are providing unsafe FFI API that can be used to interface with
|
|
||||||
GStreamer. Generally they are meant to be used as the building block for
|
|
||||||
higher-level abstractions like:
|
|
||||||
|
|
||||||
* Bindings for GStreamer applications and plugins: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs
|
|
||||||
* Various GStreamer plugins written in Rust: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs
|
|
||||||
|
|
||||||
The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/)
|
|
||||||
based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/)
|
|
||||||
API metadata provided by the GStreamer project.
|
|
||||||
|
|
||||||
## LICENSE
|
|
||||||
|
|
||||||
gstreamer-sys and all crates contained here are licensed under the MIT
|
|
||||||
license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT).
|
|
||||||
|
|
||||||
GStreamer itself is licensed under the Lesser General Public License version
|
|
||||||
2.1 or (at your option) any later version:
|
|
||||||
https://www.gnu.org/licenses/lgpl-2.1.html
|
|
||||||
|
|
||||||
## Contribution
|
|
||||||
|
|
||||||
Any kinds of contributions are welcome as a pull request.
|
|
||||||
|
|
||||||
Unless you explicitly state otherwise, any contribution intentionally submitted
|
|
||||||
for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above,
|
|
||||||
without any additional terms or conditions.
|
|
|
@ -1,8 +0,0 @@
|
||||||
export RUSTUP_HOME='/usr/local/rustup'
|
|
||||||
export PATH=$PATH:/usr/local/cargo/bin
|
|
||||||
|
|
||||||
export PKG_CONFIG_PATH=/usr/local/lib/x86_64-linux-gnu/pkgconfig
|
|
||||||
export GST_PLUGIN_SYSTEM_PATH=/usr/local/lib/x86_64-linux-gnu/gstreamer-1.0
|
|
||||||
export GST_PLUGIN_SCANNER=/usr/local/libexec/gstreamer-1.0/gst-plugin-scanner
|
|
||||||
export PATH=$PATH:/usr/local/bin
|
|
||||||
export LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
|
|
|
@ -1,34 +0,0 @@
|
||||||
[advisories]
|
|
||||||
db-path = "~/.cargo/advisory-db"
|
|
||||||
db-url = "https://github.com/rustsec/advisory-db"
|
|
||||||
vulnerability = "deny"
|
|
||||||
unmaintained = "warn"
|
|
||||||
notice = "warn"
|
|
||||||
ignore = []
|
|
||||||
|
|
||||||
[licenses]
|
|
||||||
unlicensed = "deny"
|
|
||||||
allow = [
|
|
||||||
"Apache-2.0",
|
|
||||||
]
|
|
||||||
deny = [
|
|
||||||
"GPL-1.0",
|
|
||||||
"GPL-2.0",
|
|
||||||
"GPL-3.0",
|
|
||||||
"AGPL-1.0",
|
|
||||||
"AGPL-3.0",
|
|
||||||
]
|
|
||||||
copyleft = "deny"
|
|
||||||
allow-osi-fsf-free = "either"
|
|
||||||
confidence-threshold = 0.8
|
|
||||||
|
|
||||||
[bans]
|
|
||||||
multiple-versions = "deny"
|
|
||||||
highlight = "all"
|
|
||||||
|
|
||||||
[sources]
|
|
||||||
unknown-registry = "deny"
|
|
||||||
unknown-git = "deny"
|
|
||||||
allow-git = [
|
|
||||||
"https://github.com/gtk-rs/sys",
|
|
||||||
]
|
|
|
@ -1,61 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
from os import listdir
|
|
||||||
from os.path import isfile, join
|
|
||||||
from subprocess import call
|
|
||||||
import sys
|
|
||||||
|
|
||||||
need_rebuild = False
|
|
||||||
|
|
||||||
def update_workspace():
|
|
||||||
with open('Cargo.toml', 'r') as f:
|
|
||||||
old_lines = f.readlines()
|
|
||||||
lines = old_lines[:]
|
|
||||||
with open('Cargo.toml', 'w') as f:
|
|
||||||
lines.insert(len(lines) - 2, '"gir",')
|
|
||||||
f.write(''.join(lines))
|
|
||||||
success = True
|
|
||||||
try:
|
|
||||||
call(['bash', '-c', 'cd gir && cargo build --release'])
|
|
||||||
except:
|
|
||||||
success = False
|
|
||||||
with open('Cargo.toml', 'w') as f:
|
|
||||||
f.write(''.join(old_lines))
|
|
||||||
return success
|
|
||||||
|
|
||||||
|
|
||||||
if not isfile('./gir/src'):
|
|
||||||
need_rebuild = True
|
|
||||||
print('=> Initializing gir submodule...')
|
|
||||||
call(['bash', '-c', 'git submodule update --init'])
|
|
||||||
print('<= Done!')
|
|
||||||
|
|
||||||
question = 'Do you want to update gir submodule? [y/N]'
|
|
||||||
if sys.version_info[0] < 3:
|
|
||||||
line = raw_input(question)
|
|
||||||
else:
|
|
||||||
line = input(question)
|
|
||||||
line = line.strip()
|
|
||||||
if line.lower() == 'y':
|
|
||||||
need_rebuild = True
|
|
||||||
print('=> Updating gir submodule...')
|
|
||||||
call(['bash', '-c', 'cd gir && git reset --hard HEAD && git pull -f origin master'])
|
|
||||||
print('<= Done!')
|
|
||||||
|
|
||||||
if need_rebuild is True or not os.path.isfile('./gir/target/release/gir'):
|
|
||||||
print('=> Building gir...')
|
|
||||||
if update_workspace() is True:
|
|
||||||
print('<= Done!')
|
|
||||||
else:
|
|
||||||
print('<= Failed...')
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
print('=> Regenerating crates...')
|
|
||||||
for entry in [f for f in listdir('.') if isfile(join('.', f))]:
|
|
||||||
if entry.startswith('Gir_Gst') and entry.endswith('.toml'):
|
|
||||||
print('==> Regenerating "{}"...'.format(entry))
|
|
||||||
call(['./target/release/gir', '-c', entry])
|
|
||||||
print('<== Done!')
|
|
||||||
call(['cargo', 'fmt'])
|
|
||||||
print('<= Done!')
|
|
||||||
print("Don't forget to check if everything has been correctly generated!")
|
|
Loading…
Reference in a new issue