Skip to main content

srs_client/http_api/
stream.rs

1use super::common::{Kbps, Publish};
2use derive_more::{Display, Error};
3use serde::{Deserialize, Serialize};
4
5#[derive(Serialize, Deserialize, Debug)]
6pub struct Video {
7    pub codec: String,
8    pub profile: String,
9    pub level: String,
10    pub width: i64,
11    pub height: i64,
12}
13
14#[derive(Serialize, Deserialize, Debug)]
15pub struct Audio {
16    pub codec: String,
17    pub sample_rate: i64,
18    pub channel: i64,
19    pub profile: String,
20}
21
22#[derive(Serialize, Deserialize, Debug)]
23pub struct Stream {
24    pub id: String,
25    pub name: String,
26    pub vhost: String,
27    pub app: String,
28    #[serde(rename = "tcUrl")]
29    pub tc_url: String,
30    pub url: String,
31    pub live_ms: i64,
32    pub clients: i64,
33    pub frames: i64,
34    pub send_bytes: i64,
35    pub recv_bytes: i64,
36    pub kbps: Kbps,
37    pub publish: Publish,
38    pub video: Option<Video>,
39    pub audio: Option<Audio>,
40}