building gstreamer signallable project
This commit is contained in:
parent
5bb5ff98bb
commit
cbd7d950da
8 changed files with 3797 additions and 14 deletions
3636
Cargo.lock
generated
3636
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
23
Cargo.toml
23
Cargo.toml
|
@ -1,3 +1,20 @@
|
||||||
[workspace]
|
[package]
|
||||||
members = ["helloworld"]
|
name = "vcs-camera-satellite"
|
||||||
resolver = "2"
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
config = "0.14.0"
|
||||||
|
gst-plugin-webrtc = "0.13.0"
|
||||||
|
gstreamer = { version = "0.23.0", features = ["v1_22"] }
|
||||||
|
gstreamer-sdp = { version = "0.23.0", features = ["v1_22"] }
|
||||||
|
gstreamer-webrtc = { version = "0.23.0", features = ["v1_22"] }
|
||||||
|
log = "0.4.22"
|
||||||
|
serde = { version = "1.0.204", features = ["derive"] }
|
||||||
|
serde_json = "1.0.122"
|
||||||
|
tokio = "1.39.2"
|
||||||
|
tokio-tungstenite = "0.23.1"
|
||||||
|
tracing = "0.1.40"
|
||||||
|
tracing-subscriber = "0.3.18"
|
||||||
|
|
62
flake.lock
Normal file
62
flake.lock
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1722421184,
|
||||||
|
"narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1718428119,
|
||||||
|
"narHash": "sha256-WdWDpNaq6u1IPtxtYHHWpl5BmabtpmLnMAx0RdJ/vo8=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "e6cea36f83499eb4e9cd184c8a8e823296b50ad5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"rust-overlay": "rust-overlay"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rust-overlay": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1722651535,
|
||||||
|
"narHash": "sha256-2uRmNwxe3CO5h7PfvqXrRe8OplXaEdwhqOUtaF13rpU=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "56d83ca6f3c557647476f3720426a7615c22b860",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
11
flake.nix
11
flake.nix
|
@ -34,8 +34,15 @@ Some utility commands:
|
||||||
};
|
};
|
||||||
rustSettings = with pkgs; {
|
rustSettings = with pkgs; {
|
||||||
src = ./.;
|
src = ./.;
|
||||||
#nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
#buildInputs = [ openssl ];
|
buildInputs = [
|
||||||
|
openssl
|
||||||
|
gst_all_1.gstreamer
|
||||||
|
gst_all_1.gst-plugins-base
|
||||||
|
gst_all_1.gst-plugins-good
|
||||||
|
gst_all_1.gst-plugins-bad # contains gstreamer-webrtc-1.0
|
||||||
|
gst_all_1.gst-plugins-rs
|
||||||
|
];
|
||||||
cargoHash = nixpkgs.lib.fakeHash;
|
cargoHash = nixpkgs.lib.fakeHash;
|
||||||
};
|
};
|
||||||
meta = with nixpkgs.lib; {
|
meta = with nixpkgs.lib; {
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
[package]
|
|
||||||
name = "helloworld"
|
|
||||||
version = "0.1.0"
|
|
||||||
edition = "2021"
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[dependencies]
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
|
||||||
|
mod signaller;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Hello, world!");
|
println!("Hello, world!");
|
||||||
}
|
}
|
48
src/signaller/imp.rs
Normal file
48
src/signaller/imp.rs
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
use gstreamer::glib;
|
||||||
|
use gstreamer::subclass::prelude::*;
|
||||||
|
use gstreamer_webrtc::WebRTCSessionDescription;
|
||||||
|
|
||||||
|
use gstrswebrtc::signaller::{Signallable, SignallableImpl};
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
|
pub struct Signaller {}
|
||||||
|
|
||||||
|
impl Signaller {}
|
||||||
|
|
||||||
|
impl SignallableImpl for Signaller {
|
||||||
|
fn start(&self) {
|
||||||
|
unimplemented!()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn stop(&self) {
|
||||||
|
unimplemented!()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn send_sdp(&self, _session_id: &str, _sdp: &WebRTCSessionDescription) {
|
||||||
|
unimplemented!()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn add_ice(
|
||||||
|
&self,
|
||||||
|
_session_id: &str,
|
||||||
|
_candidate: &str,
|
||||||
|
_sdp_m_line_index: u32,
|
||||||
|
_sdp_mid: Option<String>,
|
||||||
|
) {
|
||||||
|
unimplemented!()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn end_session(&self, _session_id: &str) {
|
||||||
|
unimplemented!()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[glib::object_subclass]
|
||||||
|
impl ObjectSubclass for Signaller {
|
||||||
|
const NAME: &'static str = "MyCustomWebRTCSinkSignaller";
|
||||||
|
type Type = super::MyCustomSignaller;
|
||||||
|
type ParentType = glib::Object;
|
||||||
|
type Interfaces = (Signallable,);
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ObjectImpl for Signaller {}
|
20
src/signaller/mod.rs
Normal file
20
src/signaller/mod.rs
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
use gstreamer::glib;
|
||||||
|
use gstrswebrtc::signaller::Signallable;
|
||||||
|
|
||||||
|
mod imp;
|
||||||
|
|
||||||
|
glib::wrapper! {
|
||||||
|
pub struct MyCustomSignaller(ObjectSubclass<imp::Signaller>) @implements Signallable;
|
||||||
|
}
|
||||||
|
|
||||||
|
impl MyCustomSignaller {
|
||||||
|
pub fn new() -> Self {
|
||||||
|
glib::Object::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Default for MyCustomSignaller {
|
||||||
|
fn default() -> Self {
|
||||||
|
MyCustomSignaller::new()
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue