mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-09 10:45:27 +00:00
uriplaylistbin: implement Debug on State
Help debugging.
This commit is contained in:
parent
98174b6cf2
commit
cde2e75bcc
1 changed files with 10 additions and 0 deletions
|
@ -101,6 +101,7 @@ impl Default for Settings {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
enum Status {
|
enum Status {
|
||||||
/// all good element is working
|
/// all good element is working
|
||||||
Running,
|
Running,
|
||||||
|
@ -120,6 +121,7 @@ impl Status {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
struct State {
|
struct State {
|
||||||
streamsynchronizer: gst::Element,
|
streamsynchronizer: gst::Element,
|
||||||
concat_audio: Vec<gst::Element>,
|
concat_audio: Vec<gst::Element>,
|
||||||
|
@ -705,6 +707,14 @@ impl Playlist {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl std::fmt::Debug for Playlist {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
f.debug_struct("Playlist")
|
||||||
|
.field("uris", &self.uris)
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn stream_type_from_pad_name(name: &str) -> anyhow::Result<(gst::StreamType, usize)> {
|
fn stream_type_from_pad_name(name: &str) -> anyhow::Result<(gst::StreamType, usize)> {
|
||||||
if let Some(index) = name.strip_prefix("audio_") {
|
if let Some(index) = name.strip_prefix("audio_") {
|
||||||
Ok((gst::StreamType::AUDIO, index.parse().unwrap()))
|
Ok((gst::StreamType::AUDIO, index.parse().unwrap()))
|
||||||
|
|
Loading…
Reference in a new issue