pub fn track_info(&self) -> AudioTrackInfo {
        let mut ai = AudioTrackInfo {
            codec_id:   "ac-3".to_string(),
            codec_name: Some("AC-3 Dolby Digital".to_string()),
            channel_count:  self.channel_count,
            bit_depth: if self.sample_size > 0 { Some(self.sample_size) } else { None },
            sample_rate: if self.sample_rate_hi > 0 { Some(self.sample_rate_hi as u32) } else { None },
            ..AudioTrackInfo::default()
        };

        if let Some(dac3) = first_box!(&self.boxes, AC3SpecificBox) {
            ai.channel_count = dac3.num_channels() as u16;
            ai.lfe_channel = dac3.lfe_channel();
            if dac3.sampling_rate() > 0 {
                ai.sample_rate = Some(dac3.sampling_rate());
            }
            ai.channel_configuration = Some(dac3.channel_configuration().to_string());
            ai.avg_bitrate = if dac3.bitrate() > 0 { Some(dac3.bitrate()) } else { None };
            ai.max_bitrate = if dac3.bitrate() > 0 { Some(dac3.bitrate()) } else { None };
        }

        ai
    }
/// Return audio specific track info.
Return audio specific track info.
Return audio specific track info .
pub fn track_info(&self) -> AudioTrackInfo {
        let mut ai = AudioTrackInfo {
            codec_id:   "ac-3".to_string(),
            codec_name: Some("AC-3 Dolby Digital".to_string()),
            channel_count:  self.channel_count,
            bit_depth: if self.sample_size > 0 { Some(self.sample_size) } else { None },
            sample_rate: if self.sample_rate_hi > 0 { Some(self.sample_rate_hi as u32) } else { None },
            ..AudioTrackInfo::default()
        };
        if let Some(dac3) = first_box!(&self.boxes, AC3SpecificBox) {
            ai.channel_count = dac3.num_channels() as u16;
            ai.lfe_channel = dac3.lfe_channel();
            if dac3.sampling_rate() > 0 {
                ai.sample_rate = Some(dac3.sampling_rate());
            }
            ai.channel_configuration = Some(dac3.channel_configuration().to_string());
            ai.avg_bitrate = if dac3.bitrate() > 0 { Some(dac3.bitrate()) } else { None };
            ai.max_bitrate = if dac3.bitrate() > 0 { Some(dac3.bitrate()) } else { None };
        }
        ai
    }
pub fn track_info ( & self ) -> AudioTrackInfo { let mut ai = AudioTrackInfo { codec_id : " " . to_string ( ) , codec_name : Some ( " " . to_string ( ) ) , channel_count : self . channel_count , bit_depth : if self . sample_size > 0 { Some ( self . sample_size ) } else { None } , sample_rate : if self . sample_rate_hi > 0 { Some ( self . sample_rate_hi as u32 ) } else { None } , .. AudioTrackInfo :: default ( ) } ; if let Some ( dac3 ) = first_box ! ( self boxes AC3SpecificBox ) { ai . channel_count = dac3 . num_channels ( ) as u16 ; ai . lfe_channel = dac3 . lfe_channel ( ) ; if dac3 . sampling_rate ( ) > 0 { ai . sample_rate = Some ( dac3 . sampling_rate ( ) ) ; } ai . channel_configuration = Some ( dac3 . channel_configuration ( ) . to_string ( ) ) ; ai . avg_bitrate = if dac3 . bitrate ( ) > 0 { Some ( dac3 . bitrate ( ) ) } else { None } ; ai . max_bitrate = if dac3 . bitrate ( ) > 0 { Some ( dac3 . bitrate ( ) ) } else { None } ; } ai }
Return audio specific track info.
Return audio specific track info .
&self
&self