Skip to content

Commit 2e2a01c

Browse files
authored
Rename from hang -> moq (#28)
* pub instead of pub-gst * Rename from hang -> moq
1 parent aff0614 commit 2e2a01c

9 files changed

Lines changed: 50 additions & 50 deletions

File tree

Cargo.lock

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
2-
name = "hang-gst"
2+
name = "moq-gst"
33
description = "Media over QUIC - Gstreamer plugin"
44
authors = ["Luke Curley"]
5-
repository = "https://github.com/kixelated/hang-gst"
5+
repository = "https://github.com/moq-dev/gstreamer"
66
license = "MIT OR Apache-2.0"
77

88
version = "0.2.2"
@@ -12,7 +12,7 @@ keywords = ["quic", "http3", "webtransport", "media", "live"]
1212
categories = ["multimedia", "network-programming", "web-programming"]
1313

1414
[lib]
15-
name = "gsthang"
15+
name = "gstmoq"
1616
crate-type = ["cdylib", "rlib"]
1717
path = "src/lib.rs"
1818

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ just relay
2929
Now you can publish and subscribe to a video:
3030
```sh
3131
# Publish to a localhost moq-relay server
32-
just pub-gst bbb
32+
just pub bbb
3333

3434
# Subscribe from a localhost moq-relay server
3535
just sub bbb

justfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ download name url:
3939
fi
4040

4141
# Publish a video using gstreamer to the localhost relay server
42-
pub-gst broadcast: (download "bbb" "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4")
42+
pub broadcast: (download "bbb" "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4")
4343
# Build the plugins
4444
cargo build
4545

4646
# Run gstreamer and pipe the output to our plugin
4747
GST_PLUGIN_PATH="${PWD}/target/debug${GST_PLUGIN_PATH:+:$GST_PLUGIN_PATH}" \
4848
gst-launch-1.0 -v -e multifilesrc location="dev/bbb.fmp4" loop=true ! qtdemux name=demux \
49-
demux.video_0 ! h264parse ! queue ! identity sync=true ! isofmp4mux name=mux chunk-duration=1 fragment-duration=1 ! hangsink url="$URL" broadcast="{{broadcast}}" tls-disable-verify=true \
49+
demux.video_0 ! h264parse ! queue ! identity sync=true ! isofmp4mux name=mux chunk-duration=1 fragment-duration=1 ! moqsink url="$URL" broadcast="{{broadcast}}" tls-disable-verify=true \
5050
demux.audio_0 ! aacparse ! queue ! mux.
5151

5252
# Subscribe to a video using gstreamer
@@ -57,7 +57,7 @@ sub broadcast:
5757
# Run gstreamer and pipe the output to our plugin
5858
# This will render the video to the screen
5959
GST_PLUGIN_PATH="${PWD}/target/debug${GST_PLUGIN_PATH:+:$GST_PLUGIN_PATH}" \
60-
gst-launch-1.0 -v -e hangsrc url="$URL" broadcast="{{broadcast}}" tls-disable-verify=true ! decodebin ! videoconvert ! autovideosink
60+
gst-launch-1.0 -v -e moqsrc url="$URL" broadcast="{{broadcast}}" tls-disable-verify=true ! decodebin ! videoconvert ! autovideosink
6161

6262
# Run the CI checks
6363
check $RUSTFLAGS="-D warnings":

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
2828
}
2929

3030
gst::plugin_define!(
31-
hang,
31+
moq,
3232
env!("CARGO_PKG_DESCRIPTION"),
3333
plugin_init,
3434
concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")),

src/sink/imp.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,23 @@ struct State {
3434
}
3535

3636
#[derive(Default)]
37-
pub struct HangSink {
37+
pub struct MoqSink {
3838
settings: Mutex<Settings>,
3939
state: Arc<Mutex<State>>,
4040
}
4141

4242
#[glib::object_subclass]
43-
impl ObjectSubclass for HangSink {
44-
const NAME: &'static str = "HangSink";
45-
type Type = super::HangSink;
43+
impl ObjectSubclass for MoqSink {
44+
const NAME: &'static str = "MoqSink";
45+
type Type = super::MoqSink;
4646
type ParentType = gst_base::BaseSink;
4747

4848
fn new() -> Self {
4949
Self::default()
5050
}
5151
}
5252

53-
impl ObjectImpl for HangSink {
53+
impl ObjectImpl for MoqSink {
5454
fn properties() -> &'static [glib::ParamSpec] {
5555
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
5656
vec![
@@ -95,9 +95,9 @@ impl ObjectImpl for HangSink {
9595
}
9696
}
9797

98-
impl GstObjectImpl for HangSink {}
98+
impl GstObjectImpl for MoqSink {}
9999

100-
impl ElementImpl for HangSink {
100+
impl ElementImpl for MoqSink {
101101
fn metadata() -> Option<&'static gst::subclass::ElementMetadata> {
102102
static ELEMENT_METADATA: Lazy<gst::subclass::ElementMetadata> = Lazy::new(|| {
103103
gst::subclass::ElementMetadata::new(
@@ -126,7 +126,7 @@ impl ElementImpl for HangSink {
126126
}
127127
}
128128

129-
impl BaseSinkImpl for HangSink {
129+
impl BaseSinkImpl for MoqSink {
130130
fn start(&self) -> Result<(), gst::ErrorMessage> {
131131
let _guard = RUNTIME.enter();
132132
self.setup()
@@ -164,7 +164,7 @@ impl BaseSinkImpl for HangSink {
164164
}
165165
}
166166

167-
impl HangSink {
167+
impl MoqSink {
168168
fn setup(&self) -> anyhow::Result<()> {
169169
let settings = self.settings.lock().unwrap();
170170

src/sink/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ use gst::prelude::*;
44
mod imp;
55

66
glib::wrapper! {
7-
pub struct HangSink(ObjectSubclass<imp::HangSink>) @extends gst_base::BaseSink, gst::Element, gst::Object;
7+
pub struct MoqSink(ObjectSubclass<imp::MoqSink>) @extends gst_base::BaseSink, gst::Element, gst::Object;
88
}
99

1010
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
11-
gst::Element::register(Some(plugin), "hangsink", gst::Rank::NONE, HangSink::static_type())
11+
gst::Element::register(Some(plugin), "moqsink", gst::Rank::NONE, MoqSink::static_type())
1212
}

src/source/imp.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use std::sync::LazyLock;
1010
use std::sync::Mutex;
1111

1212
static CAT: Lazy<gst::DebugCategory> =
13-
Lazy::new(|| gst::DebugCategory::new("hang-src", gst::DebugColorFlags::empty(), Some("Hang Source Element")));
13+
Lazy::new(|| gst::DebugCategory::new("moq-src", gst::DebugColorFlags::empty(), Some("MoQ Source Element")));
1414

1515
pub static RUNTIME: Lazy<tokio::runtime::Runtime> = Lazy::new(|| {
1616
tokio::runtime::Builder::new_multi_thread()
@@ -28,25 +28,25 @@ struct Settings {
2828
}
2929

3030
#[derive(Default)]
31-
pub struct HangSrc {
31+
pub struct MoqSrc {
3232
settings: Mutex<Settings>,
3333
}
3434

3535
#[glib::object_subclass]
36-
impl ObjectSubclass for HangSrc {
37-
const NAME: &'static str = "HangSrc";
38-
type Type = super::HangSrc;
36+
impl ObjectSubclass for MoqSrc {
37+
const NAME: &'static str = "MoqSrc";
38+
type Type = super::MoqSrc;
3939
type ParentType = gst::Bin;
4040

4141
fn new() -> Self {
4242
Self::default()
4343
}
4444
}
4545

46-
impl GstObjectImpl for HangSrc {}
47-
impl BinImpl for HangSrc {}
46+
impl GstObjectImpl for MoqSrc {}
47+
impl BinImpl for MoqSrc {}
4848

49-
impl ObjectImpl for HangSrc {
49+
impl ObjectImpl for MoqSrc {
5050
fn properties() -> &'static [glib::ParamSpec] {
5151
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
5252
vec![
@@ -91,7 +91,7 @@ impl ObjectImpl for HangSrc {
9191
}
9292
}
9393

94-
impl ElementImpl for HangSrc {
94+
impl ElementImpl for MoqSrc {
9595
fn metadata() -> Option<&'static gst::subclass::ElementMetadata> {
9696
static ELEMENT_METADATA: Lazy<gst::subclass::ElementMetadata> = Lazy::new(|| {
9797
gst::subclass::ElementMetadata::new(
@@ -156,7 +156,7 @@ impl ElementImpl for HangSrc {
156156
}
157157
}
158158

159-
impl HangSrc {
159+
impl MoqSrc {
160160
async fn setup(&self) -> anyhow::Result<()> {
161161
let (client, url, name) = {
162162
let settings = self.settings.lock().unwrap();

src/source/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ use gst::prelude::*;
44
mod imp;
55

66
glib::wrapper! {
7-
pub struct HangSrc(ObjectSubclass<imp::HangSrc>) @extends gst::Bin, gst::Element, gst::Object;
7+
pub struct MoqSrc(ObjectSubclass<imp::MoqSrc>) @extends gst::Bin, gst::Element, gst::Object;
88
}
99

1010
pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
11-
gst::Element::register(Some(plugin), "hangsrc", gst::Rank::NONE, HangSrc::static_type())
11+
gst::Element::register(Some(plugin), "moqsrc", gst::Rank::NONE, MoqSrc::static_type())
1212
}

0 commit comments

Comments
 (0)