Skip to content

Commit 3ed2e73

Browse files
committed
Add in some upstream gst stuff.
1 parent 7e011a0 commit 3ed2e73

11 files changed

Lines changed: 1266 additions & 744 deletions

File tree

CHANGELOG.md

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,46 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
## [0.1.7](https://github.com/kixelated/moq-rs/compare/moq-gst-v0.1.6...moq-gst-v0.1.7) - 2025-01-30
10+
## [0.2.2] - 2025-08-12
1111

1212
### Other
1313

14-
- update Cargo.lock dependencies
14+
- Support an array of authorized paths
15+
- Revamp the Producer/Consumer API for moq_lite
1516

16-
## [0.1.6](https://github.com/kixelated/moq-rs/compare/moq-gst-v0.1.5...moq-gst-v0.1.6) - 2025-01-16
17+
## [0.2.1] - 2025-07-22
1718

1819
### Other
1920

20-
- update Cargo.lock dependencies
21+
- Create a type-safe Path wrapper for Javascript
22+
- Add an ANNOUNCE_INIT message
2123

22-
## [0.1.5](https://github.com/kixelated/moq-rs/compare/moq-gst-v0.1.4...moq-gst-v0.1.5) - 2025-01-16
24+
## [0.1.2] - 2025-06-20
2325

2426
### Other
2527

26-
- Support fetching fingerprint via native clients. ([#286](https://github.com/kixelated/moq-rs/pull/286))
27-
- Initial WASM contribute ([#283](https://github.com/kixelated/moq-rs/pull/283))
28+
- updated the following local packages: hang
2829

29-
## [0.1.4](https://github.com/kixelated/moq-rs/compare/moq-gst-v0.1.3...moq-gst-v0.1.4) - 2025-01-13
30+
## [0.1.1] - 2025-06-03
3031

3132
### Other
3233

33-
- update Cargo.lock dependencies
34+
- Add support for authentication tokens ([#399](https://github.com/kixelated/moq/pull/399))
35+
- Add location tracks, fix some bugs, switch to nix ([#401](https://github.com/kixelated/moq/pull/401))
36+
- Move config to a separate field to match the specification. ([#387](https://github.com/kixelated/moq/pull/387))
3437

35-
## [0.1.3](https://github.com/kixelated/moq-rs/compare/moq-gst-v0.1.2...moq-gst-v0.1.3) - 2025-01-13
38+
## [0.1.0](https://github.com/kixelated/moq/releases/tag/hang-gst-v0.1.0) - 2025-05-21
3639

3740
### Other
3841

39-
- updated the following local packages: moq-native
40-
41-
## [0.1.2](https://github.com/kixelated/moq-rs/compare/moq-gst-v0.1.1...moq-gst-v0.1.2) - 2024-12-04
42-
43-
### Other
44-
45-
- updated the following local packages: moq-karp
46-
47-
## [0.1.1](https://github.com/kixelated/moq-gst/compare/v0.1.0...v0.1.1) - 2024-11-09
48-
49-
### Other
50-
51-
- Initial audio support ([#10](https://github.com/kixelated/moq-gst/pull/10))
52-
- Fix the plugin. ([#9](https://github.com/kixelated/moq-gst/pull/9))
42+
- Split into Rust/Javascript halves and rebrand as moq-lite/hang ([#376](https://github.com/kixelated/moq/pull/376))

CLAUDE.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
This is a GStreamer plugin for Media over QUIC (MoQ), written in Rust. It provides `hangsink` and `hangsrc` elements that enable publishing and subscribing to media streams using the MoQ protocol over QUIC transport. The project has been renamed from moq-gst to hang-gst and uses the updated hang/moq-lite dependencies.
8+
9+
## Development Setup
10+
11+
### Prerequisites
12+
- Rust toolchain (via `rustup`)
13+
- Just command runner
14+
- A running moq-relay server from [moq](https://github.com/kixelated/moq)
15+
16+
### Initial Setup
17+
```bash
18+
# Install dependencies and tools
19+
just setup
20+
21+
# To see all available commands
22+
just
23+
```
24+
25+
## Common Commands
26+
27+
### Building
28+
```bash
29+
# Build the plugin
30+
just build
31+
# or
32+
cargo build
33+
```
34+
35+
### Testing and Quality Checks
36+
```bash
37+
# Run all CI checks (clippy, fmt, cargo check)
38+
just check
39+
40+
# Run tests
41+
just test
42+
43+
# Auto-fix issues
44+
just fix
45+
```
46+
47+
### Development Workflow
48+
```bash
49+
# Start a relay server (in moq repo)
50+
just relay
51+
52+
# Publish video stream with broadcast name
53+
just pub-gst bbb
54+
55+
# Subscribe to video stream with broadcast name
56+
just sub bbb
57+
```
58+
59+
## Architecture
60+
61+
### Plugin Structure
62+
- **lib.rs**: Main plugin entry point, registers both sink and source elements as "hang" plugin
63+
- **sink/**: Hang sink element (`hangsink`) for publishing streams
64+
- `mod.rs`: GStreamer element wrapper for HangSink
65+
- `imp.rs`: Core implementation with async Tokio runtime
66+
- **source/**: Hang source element (`hangsrc`) for consuming streams
67+
- `mod.rs`: GStreamer element wrapper for HangSrc
68+
- `imp.rs`: Core implementation with async Tokio runtime
69+
70+
### Key Dependencies
71+
- **hang**: Higher-level hang protocol utilities and CMAF handling (local path dependency)
72+
- **moq-native**: Core MoQ protocol implementation with QUIC/TLS (local path dependency)
73+
- **gstreamer**: GStreamer bindings for Rust
74+
- **tokio**: Async runtime (single-threaded worker pool)
75+
76+
### Plugin Elements
77+
- `hangsink`: BaseSink element that accepts media data and publishes via MoQ with broadcast name
78+
- `hangsrc`: Bin element that receives MoQ streams and outputs GStreamer buffers
79+
80+
Both elements use a shared Tokio runtime and support TLS configuration options. They require broadcast names for operation.
81+
82+
## Environment Variables
83+
- `RUST_LOG=info`: Controls logging level
84+
- `URL=http://localhost:4443`: Default relay server URL
85+
- `GST_PLUGIN_PATH`: Must include the built plugin directory
86+
87+
## Notable Changes from moq-gst
88+
- Renamed from moq-gst to hang-gst
89+
- Element names changed from moqsink/moqsrc to hangsink/hangsrc
90+
- Added broadcast parameter requirement for both elements
91+
- Updated dependencies to use local hang and moq-native packages
92+
- Updated justfile commands to include broadcast parameters

0 commit comments

Comments
 (0)