feat(input): Support HLS streams (#242)
This patch adds support for yt-dl streams with the protocol m3u8_native which includes sites like Soundcloud. Closes: #241
This commit is contained in:
@@ -101,8 +101,9 @@ impl fmt::Display for Error {
|
||||
Self::CryptoModeInvalid => write!(f, "server changed negotiated encryption mode"),
|
||||
Self::CryptoModeUnavailable => write!(f, "server did not offer chosen encryption mode"),
|
||||
Self::EndpointUrl => write!(f, "endpoint URL received from gateway was invalid"),
|
||||
Self::IllegalDiscoveryResponse =>
|
||||
write!(f, "IP discovery/NAT punching response was invalid"),
|
||||
Self::IllegalDiscoveryResponse => {
|
||||
write!(f, "IP discovery/NAT punching response was invalid")
|
||||
},
|
||||
Self::IllegalIp => write!(f, "IP discovery/NAT punching response had bad IP value"),
|
||||
Self::Io(e) => e.fmt(f),
|
||||
Self::Json(e) => e.fmt(f),
|
||||
|
||||
@@ -242,7 +242,7 @@ impl<'a> InternalTrack {
|
||||
},
|
||||
Ok(MixerInputResultMessage::Seek(parsed, rec, seek_res)) => {
|
||||
match seek_res {
|
||||
Ok(pos) =>
|
||||
Ok(pos) => {
|
||||
if let Some(time_base) = parsed.decoder.codec_params().time_base {
|
||||
// Update track's position to match the actual timestamp the
|
||||
// seek landed at.
|
||||
@@ -282,7 +282,8 @@ impl<'a> InternalTrack {
|
||||
SymphError::Unsupported("Track had no recorded time base.")
|
||||
.into(),
|
||||
))
|
||||
},
|
||||
}
|
||||
},
|
||||
Err(e) => Err(InputReadyingError::Seeking(e)),
|
||||
}
|
||||
},
|
||||
|
||||
@@ -177,10 +177,12 @@ impl DriverTestHandle {
|
||||
OutputPacket::Empty => eprintln!("pkt: Nothing"),
|
||||
OutputPacket::Rtp(p) => eprintln!("pkt: RTP[{}B]", p.len()),
|
||||
OutputPacket::Raw(OutputMessage::Silent) => eprintln!("pkt: Raw-Silent"),
|
||||
OutputPacket::Raw(OutputMessage::Passthrough(p)) =>
|
||||
eprintln!("pkt: Raw-Passthrough[{}B]", p.len()),
|
||||
OutputPacket::Raw(OutputMessage::Mixed(p)) =>
|
||||
eprintln!("pkt: Raw-Mixed[{}B]", p.len()),
|
||||
OutputPacket::Raw(OutputMessage::Passthrough(p)) => {
|
||||
eprintln!("pkt: Raw-Passthrough[{}B]", p.len())
|
||||
},
|
||||
OutputPacket::Raw(OutputMessage::Mixed(p)) => {
|
||||
eprintln!("pkt: Raw-Mixed[{}B]", p.len())
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user