Sigil documentation
ReferenceRust referencesigil-nova

sigil-nova · streaming

Source declarations, signatures and documentation for streaming.

Source: sigil/node/sigil-nova/src/streaming.rs. SHA-256: d6a7f867f5121d410bd6e05c86c0f62bbdb3b3f87ff42333915ed71848a73aa1.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

streaming::SurfaceId

In-world screen surface identifier.

#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct SurfaceId(pub String);

Source line: 15.

streaming::StreamStatus

Status of a streaming session.

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum StreamStatus {
    Connecting,
    Active,
    Paused,
    Disconnected,
}

Source line: 19.

streaming::VideoCodec

Video codec for stream encoding.

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum VideoCodec {
    H264,
    Vp9,
    Av1,
}

Source line: 39.

streaming::Resolution

Stream resolution and frame rate.

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct Resolution {
pub width: u32,
pub height: u32,
pub fps: u8
}

Source line: 47.

streaming::StreamSession

An active streaming session.

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct StreamSession {
pub id: String,
pub agent_did: String,
pub desktop_session_id: String,
pub channel_id: String,
pub target_surface: SurfaceId,
pub status: StreamStatus,
pub codec: VideoCodec,
pub resolution: Resolution,
pub started_at: u64
}

Source line: 55.

streaming::StreamRegistry

On-chain registry of streaming sessions.

#[derive(Debug, Clone, Default)]
pub struct StreamRegistry {

}

Source line: 69.

streaming::StreamRegistry::new

Create an empty stream registry.

pub fn new() -> Self;

Source line: 75.

streaming::StreamRegistry::start_stream

Start a new streaming session.

pub fn start_stream(
        &mut self,
        agent_did: &str,
        desktop_session_id: &str,
        surface: SurfaceId,
        codec: VideoCodec,
        resolution: Resolution,
        timestamp: u64,
    ) -> Result<StreamSession, NovaError>;

Source line: 80.

streaming::StreamRegistry::pause_stream

Pause an active stream.

pub fn pause_stream(&mut self, session_id: &str) -> Result<(), NovaError>;

Source line: 127.

streaming::StreamRegistry::resume_stream

Resume a paused stream.

pub fn resume_stream(&mut self, session_id: &str) -> Result<(), NovaError>;

Source line: 145.

streaming::StreamRegistry::stop_stream

Stop a stream and remove it from the registry.

pub fn stop_stream(&mut self, session_id: &str) -> Result<StreamSession, NovaError>;

Source line: 163.

streaming::StreamRegistry::get_active_streams

Get all active (non-disconnected) streams.

pub fn get_active_streams(&self) -> Vec<&StreamSession>;

Source line: 173.

streaming::StreamRegistry::get_streams_by_agent

Get all streams belonging to a specific agent.

pub fn get_streams_by_agent(&self, agent_did: &str) -> Vec<&StreamSession>;

Source line: 181.

streaming::StreamRegistry::get_stream

Get a stream session by ID.

pub fn get_stream(&self, session_id: &str) -> Option<&StreamSession>;

Source line: 189.

streaming::StreamRegistry::session_count

Total number of sessions in the registry.

pub fn session_count(&self) -> usize;

Source line: 194.

On this page