Skip to content

Commit

Permalink
feat(livetwo): merged whipinto and whepfrom to livetwo
Browse files Browse the repository at this point in the history
  • Loading branch information
a-wing committed Oct 2, 2024
1 parent 020e2c4 commit 1d45079
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 95 deletions.
65 changes: 23 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ members = [
"libs/libwish",
"libs/signal",
"libs/net4mqtt",
"tools/whepfrom",
"tools/whipinto",
"liveion",
"liveman",
"livetwo",
]

[workspace.package]
Expand All @@ -59,8 +58,7 @@ tracing = "0.1"
[dependencies]
liveion = { path = "liveion" }
liveman = { path = "liveman" }
whipinto = { path = "tools/whipinto" }
whepfrom = { path = "tools/whepfrom" }
livetwo = { path = "livetwo" }
signal = { path = "libs/signal" }
utils = { path = "libs/utils" }

Expand Down
12 changes: 6 additions & 6 deletions tools/whipinto/Cargo.toml → livetwo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "whipinto"
description = "RTP/RTSP to WHIP tool"
name = "livetwo"
description = "WHIP/WHEP convert RTP/RTSP tool"
version.workspace = true
edition.workspace = true
license.workspace = true
Expand All @@ -10,10 +10,10 @@ repository.workspace = true
crate-type = ["lib"]

[dependencies]
cli = { path = "../../libs/cli" }
rtsp = { path = "../../libs/rtsp" }
libwish = { path = "../../libs/libwish" }
signal = { path = "../../libs/signal" }
cli = { path = "../libs/cli" }
rtsp = { path = "../libs/rtsp" }
libwish = { path = "../libs/libwish" }
signal = { path = "../libs/signal" }

anyhow = { workspace = true }
tokio = { workspace = true, features = ["full"] }
Expand Down
13 changes: 13 additions & 0 deletions livetwo/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pub mod whep;
pub mod whip;

mod payload;
mod rtspclient;

#[cfg(test)]
mod test;

const PREFIX_LIB: &str = "WEBRTC";
const SCHEME_RTSP_SERVER: &str = "rtsp-listen";
const SCHEME_RTSP_CLIENT: &str = "rtsp";
const SCHEME_RTP_SDP: &str = "sdp";
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 2 additions & 5 deletions tools/whepfrom/src/lib.rs → livetwo/src/whep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,9 @@ use webrtc::{

use libwish::Client;

const PREFIX_LIB: &str = "WEBRTC";
const SCHEME_RTSP_SERVER: &str = "rtsp-listen";
const _SCHEME_RTSP_CLIENT: &str = "rtsp";
const SCHEME_RTP_SDP: &str = "sdp";
use crate::{PREFIX_LIB, SCHEME_RTP_SDP, SCHEME_RTSP_SERVER};

pub async fn whepfrom(
pub async fn from(
target_url: String,
set_host: Option<String>,
whep_url: String,
Expand Down
15 changes: 4 additions & 11 deletions tools/whipinto/src/lib.rs → livetwo/src/whip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,12 @@ use webrtc::{
use cli::{codec_from_str, create_child};
use libwish::Client;

use rtspclient::setup_rtsp_session;
use crate::payload;
use crate::rtspclient::setup_rtsp_session;

mod payload;
mod rtspclient;
#[cfg(test)]
mod test;
use crate::{PREFIX_LIB, SCHEME_RTP_SDP, SCHEME_RTSP_CLIENT, SCHEME_RTSP_SERVER};

const PREFIX_LIB: &str = "WEBRTC";
const SCHEME_RTSP_SERVER: &str = "rtsp-listen";
const SCHEME_RTSP_CLIENT: &str = "rtsp";
const SCHEME_RTP_SDP: &str = "sdp";

pub async fn whipinto(
pub async fn into(
target_url: String,
set_host: Option<String>,
whip_url: String,
Expand Down
2 changes: 1 addition & 1 deletion src/whepfrom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async fn main() {
}
));

whepfrom::whepfrom(
livetwo::whep::from(
args.output.clone(),
args.host.clone(),
args.whep.clone(),
Expand Down
2 changes: 1 addition & 1 deletion src/whipinto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async fn main() {
}
));

whipinto::whipinto(
livetwo::whip::into(
args.input.clone(),
args.host.clone(),
args.whip.clone(),
Expand Down
25 changes: 0 additions & 25 deletions tools/whepfrom/Cargo.toml

This file was deleted.

0 comments on commit 1d45079

Please sign in to comment.