Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ jobs:
cargo test --locked --lib
-Zbuild-std
--target x86_64-unknown-linux-gnu
rtc::vpx
rtc::codecs::vpx
env:
RUSTFLAGS: -Zsanitizer=${{ matrix.sanitizer }}
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ tokio-tungstenite = { version = "0.30.0", default-features = false, features = [
tracing = "0.1.44"
url = "2.5.8"
uuid = { version = "1.24.0", features = ["v4"] }
# VP8/VP9 encoder FFI for the video publish path (`rtc::vpx`). The `generate`
# VP8/VP9 encoder FFI for the video publish path (`rtc::codecs::vpx`). The `generate`
# feature runs bindgen at build time so any installed libvpx version works (no
# version-locked pre-generated bindings). This links a **system** libvpx
# (`brew install libvpx` / `apt install libvpx-dev`) discovered via pkg-config —
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ Rust crate, published as [`getstream`](https://crates.io/crates/getstream).
| [`ClientConfig`](https://docs.rs/getstream/latest/getstream/struct.ClientConfig.html) | HTTP timeouts, retries, and payload limits |
| [`webhook`](https://docs.rs/getstream/latest/getstream/webhook/index.html) | Signature verification and typed events |

The wire-level `rtc` transport modules (`proto`, `peer`, `sfu_ws`, `signal`,
`publisher`, `tracer`, `coordinator_ws`) are public because they track Stream's
SFU protocol, but they are exempt from compatibility guarantees.
The wire-level `rtc` transport modules (`proto`, `peer`, `sfu`, `tracer`,
`coordinator::ws`) are public because they track Stream's SFU protocol, but they
are exempt from compatibility guarantees.

## Requirements

Expand Down Expand Up @@ -100,9 +100,9 @@ The API reference is published at [docs.rs/getstream](https://docs.rs/getstream)
from a checkout, generate it locally with `cargo doc --open`.

This is a `0.x` preview, so minor releases may contain breaking changes. The
wire-level `rtc` transport modules (`proto`, `peer`, `sfu_ws`, `signal`,
`publisher`, `tracer`, `coordinator_ws`) track Stream's SFU protocol directly and
are exempt from compatibility guarantees at any version bump.
wire-level `rtc` transport modules (`proto`, `peer`, `sfu`, `tracer`,
`coordinator::ws`) track Stream's SFU protocol directly and are exempt from
compatibility guarantees at any version bump.

## Getting started

Expand Down
7 changes: 3 additions & 4 deletions benches/media_baseline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ use getstream::rtc::{PcmFrame, StreamResampler};
#[path = "support/rtc_sources.rs"]
mod rtc;

use rtc::rtp_vpx::VpxRtpPacketizer;
use rtc::vpx::{VpxCodec, VpxEncoder};
use rtc::vpx_decode::VpxDecoder;
use rtc::{
use rtc::codecs::rtp_vpx::VpxRtpPacketizer;
use rtc::codecs::vpx::{VpxCodec, VpxDecoder, VpxEncoder};
use rtc::codecs::{
h264::{H264Decoder, H264Encoder},
rtp_h264::H264RtpPacketizer,
};
Expand Down
12 changes: 2 additions & 10 deletions benches/support/rtc_sources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@ pub(crate) mod error {
pub(crate) use getstream::rtc::{RtcError, RtcResult as Result};
}

#[path = "../../src/rtc/h264.rs"]
pub(crate) mod h264;
#[path = "../../src/rtc/rtp_h264.rs"]
pub(crate) mod rtp_h264;
#[path = "../../src/rtc/rtp_vpx.rs"]
pub(crate) mod rtp_vpx;
#[path = "../../src/rtc/codecs/mod.rs"]
pub(crate) mod codecs;
#[path = "../../src/rtc/video_frame.rs"]
pub(crate) mod video_frame;
#[path = "../../src/rtc/vpx.rs"]
pub(crate) mod vpx;
#[path = "../../src/rtc/vpx_decode.rs"]
pub(crate) mod vpx_decode;
3 changes: 1 addition & 2 deletions src/rtc/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ use crate::token::{self, TokenOptions};

use super::error::{Result, RtcError};
use super::join::{CallEvent, CallStateSnapshot, CallingState, JoinCallData, RtcCore};
use super::local_track::{LocalAudioTrack, LocalTrack, LocalVideoTrack};
use super::proto::models::TrackType;
use super::remote_track::{RemoteParticipant, RemoteTrack};
use super::subscriptions::{SubscriptionConfig, SubscriptionTarget};
use super::tracks::{LocalAudioTrack, LocalTrack, LocalVideoTrack, RemoteParticipant, RemoteTrack};

/// Boxed future returned by an RTC [`TokenProvider`].
pub type TokenFuture = Pin<Box<dyn Future<Output = CrateResult<String>> + Send + 'static>>;
Expand Down
4 changes: 2 additions & 2 deletions src/rtc/h264.rs → src/rtc/codecs/h264.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use openh264::encoder::{
};
use openh264::formats::YUVSource;

use super::error::{Result, RtcError};
use super::video_frame::{VideoFrame, i420_len};
use crate::rtc::error::{Result, RtcError};
use crate::rtc::video_frame::{VideoFrame, i420_len};

const MAX_H264_DECODE_DIMENSION: usize = 3_840;
const MAX_H264_DECODE_PIXELS: usize = 3_840 * 2_160;
Expand Down
6 changes: 6 additions & 0 deletions src/rtc/codecs/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//! Video codecs and their RTP payload formats.

pub(crate) mod h264;
pub(crate) mod rtp_h264;
pub(crate) mod rtp_vpx;
pub(crate) mod vpx;
2 changes: 1 addition & 1 deletion src/rtc/rtp_h264.rs → src/rtc/codecs/rtp_h264.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use webrtc::rtp::Error as RtpError;
use webrtc::rtp::codecs::h264::H264Payloader;
use webrtc::rtp::packetizer::{Depacketizer, Payloader};

use super::error::{Result, RtcError};
use crate::rtc::error::{Result, RtcError};

const ANNEX_B_START_CODE: &[u8] = &[0, 0, 0, 1];
const NAL_TYPE_MASK: u8 = 0x1f;
Expand Down
File renamed without changes.
Loading
Loading