gstreamer_pbutils/
discoverer_subtitle_info.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use std::fmt;
4
5use glib::prelude::*;
6
7use crate::{DiscovererStreamInfo, DiscovererSubtitleInfo};
8
9pub struct Debug<'a>(&'a DiscovererSubtitleInfo);
10
11impl fmt::Debug for Debug<'_> {
12    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
13        let info = self.0.upcast_ref::<DiscovererStreamInfo>();
14
15        f.debug_struct("DiscovererSubtitleInfo")
16            .field("language", &self.0.language())
17            .field("stream", &info.debug())
18            .finish()
19    }
20}
21
22impl DiscovererSubtitleInfo {
23    pub fn debug(&self) -> Debug {
24        Debug(self)
25    }
26}