use crate::JanusId;
use serde::Serialize;
make_dto!(
StreamingCreateParams,
required {
#[serde(rename = "type")]
mountpoint_type: StreamingMountpointType
},
optional {
admin_key: String,
id: JanusId,
name: String,
description: String,
metadata: String,
is_private: bool,
secret: String,
pin: String,
permanent: bool,
media: Vec<StreamingRtpMedia>
}
);
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Serialize)]
#[serde(rename_all = "lowercase")]
pub enum StreamingMountpointType {
RTP,
LIVE,
ONDEMAND,
RTSP,
}
make_dto!(
StreamingRtpMedia,
required {
#[serde(rename = "type")]
media_type: StreamingRtpMediaType,
mid: String,
port: u16
},
optional {
label: String,
msid: String,
mcast: String,
iface: String,
rtcpport: u16,
pt: u8, codec: String,
fmtp: String,
skew: bool }
);
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Serialize)]
#[serde(rename_all = "lowercase")]
pub enum StreamingRtpMediaType {
AUDIO,
VIDEO,
DATA,
}
make_dto!(
StreamingDestroyParams,
required { id: JanusId },
optional {
secret: String,
permanent: bool
}
);