Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xnorpx committed Sep 2, 2024
1 parent 797679a commit 5a300e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/media/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,6 @@ pub struct MediaData {
/// For audio this flag most likely doesn't matter.
pub contiguous: bool,

/// First packet of a talkspurt, that is the first packet after a silence period during
/// which packets have not been transmitted contiguously.
///
/// For audio only when dtx or silence suppression is enabled.
pub audio_start_of_talk_spurt: bool,

/// The actual packet data a.k.a Sample.
///
/// Bigger samples don't fit in one UDP packet, thus WebRTC RTP is chopping up codec
Expand All @@ -137,6 +131,12 @@ pub struct MediaData {
///
/// If no Sender Report(SR) has been received this is [`None`].
pub last_sender_info: Option<SenderInfo>,

/// First packet of a talkspurt, that is the first packet after a silence period during
/// which packets have not been transmitted contiguously.
///
/// For audio only when dtx or silence suppression is enabled.
pub audio_start_of_talk_spurt: bool,
}

/// Details for an incoming a keyframe request (PLI or FIR).
Expand Down
6 changes: 5 additions & 1 deletion src/media/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,14 @@ impl Media {
network_time: dep.first_network_time(),
seq_range: dep.seq_range(),
contiguous: dep.contiguous,
audio_start_of_talk_spurt: dep.start_of_talkspurt(),
ext_vals: dep.ext_vals().clone(),
codec_extra: dep.codec_extra,
last_sender_info: dep.first_sender_info(),
audio_start_of_talk_spurt: if codec.spec().codec.is_audio() {
dep.start_of_talkspurt()
} else {
false
},
data: dep.data,
}));
}
Expand Down

0 comments on commit 5a300e2

Please sign in to comment.