Home
last modified time | relevance | path

Searched refs:d (Results 1 – 25 of 74) sorted by relevance

123

/webrtc/util/src/vnet/chunk_queue/
H A Dchunk_queue_test.rs19 let d = q.peek().await; in test_chunk_queue() localVariable
20 assert!(d.is_none(), "should return none"); in test_chunk_queue()
25 let d = q.pop().await; in test_chunk_queue() localVariable
26 assert!(d.is_some(), "should succeed"); in test_chunk_queue()
27 if let Some(d) = d { in test_chunk_queue()
28 assert_eq!(c.to_string(), d.to_string(), "should be the same"); in test_chunk_queue()
31 let d = q.pop().await; in test_chunk_queue() localVariable
32 assert!(d.is_none(), "should fail"); in test_chunk_queue()
41 let d = q.peek().await; in test_chunk_queue() localVariable
42 assert!(d.is_some(), "should succeed"); in test_chunk_queue()
[all …]
/webrtc/turn/benches/
H A Dbench.rs21 let mut d = ChannelData { in benchmark_chan_data() localVariable
28 d.encode(); in benchmark_chan_data()
29 d.reset(); in benchmark_chan_data()
35 let mut d = ChannelData { in benchmark_chan_data() localVariable
40 d.encode(); in benchmark_chan_data()
42 buf.copy_from_slice(&d.raw); in benchmark_chan_data()
45 d.reset(); in benchmark_chan_data()
46 d.raw = buf.clone(); in benchmark_chan_data()
47 d.decode().unwrap(); in benchmark_chan_data()
82 let d = Data(vec![0u8; 10]); in benchmark_data() localVariable
[all …]
/webrtc/turn/src/proto/chandata/
H A Dchandata_test.rs5 let mut d = ChannelData { in test_channel_data_encode() localVariable
10 d.encode(); in test_channel_data_encode()
13 b.raw.extend_from_slice(&d.raw); in test_channel_data_encode()
16 assert_eq!(b, d, "not equal"); in test_channel_data_encode()
133 let mut d = ChannelData { in test_channel_data_reset() localVariable
138 d.encode(); in test_channel_data_reset()
139 let mut buf = vec![0; d.raw.len()]; in test_channel_data_reset()
140 buf.copy_from_slice(&d.raw); in test_channel_data_reset()
141 d.reset(); in test_channel_data_reset()
142 d.raw = buf; in test_channel_data_reset()
[all …]
/webrtc/examples/examples/ortc/
H A Dortc.rs103 sctp.on_data_channel(Box::new(move |d: Arc<RTCDataChannel>| { in main()
104 let d_label = d.label().to_owned(); in main()
105 let d_id = d.id(); in main()
112 let d2 = Arc::clone(&d); in main()
114 d.on_open(Box::new(move || { in main()
128 d.on_message(Box::new(move |msg: DataChannelMessage| { in main()
210 let d2 = Arc::clone(&d); in main()
222 let d_label = d.label().to_owned(); in main()
223 d.on_message(Box::new(move |msg: DataChannelMessage| { in main()
259 async fn handle_on_open(d: Arc<RTCDataChannel>) -> Result<()> { in handle_on_open()
[all …]
/webrtc/turn/src/proto/data/
H A Ddata_test.rs6 let d = Data(vec![1, 2, 33, 44, 0x13, 0xaf]); in test_data_add_to() localVariable
7 d.add_to(&mut m)?; in test_data_add_to()
17 assert_eq!(data_decoded, d); in test_data_add_to()
/webrtc/examples/examples/data-channels-detach/
H A Ddata-channels-detach.rs129 peer_connection.on_data_channel(Box::new(move |d: Arc<RTCDataChannel>| { in main()
130 let d_label = d.label().to_owned(); in main()
131 let d_id = d.id(); in main()
136 let d2 = Arc::clone(&d); in main()
139 d.on_open(Box::new(move || { in main()
213 async fn read_loop(d: Arc<webrtc::data::data_channel::DataChannel>) -> Result<()> { in read_loop()
216 let n = match d.read(&mut buffer).await { in read_loop()
232 async fn write_loop(d: Arc<webrtc::data::data_channel::DataChannel>) -> Result<()> { in write_loop()
242 result = d.write(&Bytes::from(message)).await.map_err(Into::into); in write_loop()
/webrtc/examples/examples/data-channels-detach-create/
H A Ddata-channels-detach-create.rs131 let d = Arc::clone(&data_channel); in main() localVariable
133 println!("Data channel '{}'-'{}' open.", d.label(), d.id()); in main()
135 let d2 = Arc::clone(&d); in main()
205 async fn read_loop(d: Arc<webrtc::data::data_channel::DataChannel>) -> Result<()> { in read_loop()
208 let n = match d.read(&mut buffer).await { in read_loop()
224 async fn write_loop(d: Arc<webrtc::data::data_channel::DataChannel>) -> Result<()> { in write_loop()
234 result = d.write(&Bytes::from(message)).await.map_err(Into::into); in write_loop()
/webrtc/webrtc/src/rtp_transceiver/
H A Drtp_transceiver_direction.rs138 for (d, expected_string) in tests { in test_rtp_transceiver_direction_string()
139 assert_eq!(d.to_string(), expected_string); in test_rtp_transceiver_direction_string()
153 for (d, expected_value) in tests { in test_rtp_transceiver_has_send()
154 assert_eq!(d.has_send(), expected_value); in test_rtp_transceiver_has_send()
168 for (d, expected_value) in tests { in test_rtp_transceiver_has_recv()
169 assert_eq!(d.has_recv(), expected_value); in test_rtp_transceiver_has_recv()
H A Dmod.rs318 pub async fn set_direction(&self, d: RTCRtpTransceiverDirection) { in set_direction()
319 let changed = self.set_direction_internal(d); in set_direction()
329 pub(crate) fn set_direction_internal(&self, d: RTCRtpTransceiverDirection) -> bool { in set_direction_internal()
331 self.direction.swap(d as u8, Ordering::SeqCst).into(); in set_direction_internal()
333 let changed = d != previous; in set_direction_internal()
339 d in set_direction_internal()
357 pub(crate) fn set_current_direction(&self, d: RTCRtpTransceiverDirection) { in set_current_direction()
360 .swap(d as u8, Ordering::SeqCst) in set_current_direction()
363 if d != previous { in set_current_direction()
367 d, in set_current_direction()
/webrtc/examples/examples/data-channels/
H A Ddata-channels.rs118 .on_data_channel(Box::new(move |d: Arc<RTCDataChannel>| { in main()
119 let d_label = d.label().to_owned(); in main()
120 let d_id = d.id(); in main()
125 let d2 = Arc::clone(&d); in main()
128 d.on_open(Box::new(move || { in main()
149 d.on_message(Box::new(move |msg: DataChannelMessage| { in main()
/webrtc/webrtc/src/peer_connection/sdp/
H A Dmod.rs302 d: SessionDescription, in add_data_media_section()
352 Ok(d.with_media(media)) in add_data_media_section()
405 mut d: SessionDescription, in add_transceiver_sdp()
469 d = d.with_media(MediaDescription { in add_transceiver_sdp()
502 return Ok((d, false)); in add_transceiver_sdp()
647 mut d: SessionDescription, in populate_sdp()
696 d, in populate_sdp()
705 d = d1; in populate_sdp()
716 d = d.with_fingerprint( in populate_sdp()
725 d = d.with_value_attribute(ATTR_KEY_ICELITE.to_owned(), ATTR_KEY_ICELITE.to_owned()); in populate_sdp()
[all …]
/webrtc/webrtc/src/data_channel/
H A Ddata_channel_test.rs202 if d.label() != EXPECTED_LABEL { in test_data_channel_send_before_signaling()
206 let d2 = Arc::clone(&d); in test_data_channel_send_before_signaling()
258 if d.label() != EXPECTED_LABEL { in test_data_channel_send_after_connected()
262 let d2 = Arc::clone(&d); in test_data_channel_send_after_connected()
387 if d.label() != EXPECTED_LABEL { in test_data_channel_parameters_max_packet_life_time_exchange()
392 d.ordered(), in test_data_channel_parameters_max_packet_life_time_exchange()
397 d.max_packet_lifetime(), in test_data_channel_parameters_max_packet_life_time_exchange()
438 if d.label() != EXPECTED_LABEL { in test_data_channel_parameters_max_retransmits_exchange()
483 if d.label() != EXPECTED_LABEL { in test_data_channel_parameters_protocol_exchange()
489 d.protocol(), in test_data_channel_parameters_protocol_exchange()
[all …]
/webrtc/interceptor/src/mock/
H A Dmock_time.rs32 pub fn advance(&mut self, d: Duration) { in advance()
34 *cur_now = cur_now.checked_add(d).unwrap_or(*cur_now); in advance()
/webrtc/util/src/conn/
H A Dconn_bridge.rs126 let d = Bytes::from(b.to_vec()); in push() localVariable
131 stack.push_back(d); in push()
140 if filter_cb(&d) { in push()
142 queue.push_back(d); in push()
147 queue.push_back(d); in push()
194 if let Some(d) = queue.pop_front() { in tick()
197 let _ = wr_tx.send(d).await; in tick()
/webrtc/dtls/src/crypto/
H A Dcrypto_cbc.rs124 let mut d = Vec::with_capacity(RECORD_LAYER_HEADER_SIZE + decrypted.len()); in decrypt() localVariable
125 d.extend_from_slice(&r[..RECORD_LAYER_HEADER_SIZE]); in decrypt()
126 d.extend_from_slice(decrypted); in decrypt()
128 Ok(d) in decrypt()
H A Dcrypto_gcm.rs114 let mut d = Vec::with_capacity(RECORD_LAYER_HEADER_SIZE + buffer.len()); in decrypt() localVariable
115 d.extend_from_slice(&r[..RECORD_LAYER_HEADER_SIZE]); in decrypt()
116 d.extend_from_slice(&buffer); in decrypt()
118 Ok(d) in decrypt()
H A Dcrypto_ccm.rs183 let mut d = Vec::with_capacity(RECORD_LAYER_HEADER_SIZE + buffer.len()); in decrypt() localVariable
184 d.extend_from_slice(&r[..RECORD_LAYER_HEADER_SIZE]); in decrypt()
185 d.extend_from_slice(&buffer); in decrypt()
187 Ok(d) in decrypt()
/webrtc/examples/examples/data-channels-close/
H A Ddata-channels-close.rs134 .on_data_channel(Box::new(move |d: Arc<RTCDataChannel>| { in main()
135 let d_label = d.label().to_owned(); in main()
136 let d_id = d.id(); in main()
143 let d2 = Arc::clone(&d); in main()
146 d.on_open(Box::new(move || { in main()
187 d.on_message(Box::new(move |msg: DataChannelMessage| { in main()
/webrtc/stun/examples/
H A Dstun_decode.rs32 Ok(d) => d, in main()
/webrtc/sctp/src/association/
H A Dassociation_internal.rs898 d.tsn, in handle_data()
899 d.immediate_sack, in handle_data()
900 d.user_data.len() in handle_data()
924 d.tsn, in handle_data()
937 let immediate_sack = d.immediate_sack; in handle_data()
1081 d: &ChunkSelectiveAck, in process_selective_ack()
1151 let mut htna = d.cumulative_tsn_ack; in process_selective_ack()
1154 for g in &d.gap_ack_blocks { in process_selective_ack()
1360 d.cumulative_tsn_ack, in handle_sack()
1385 d.cumulative_tsn_ack, in handle_sack()
[all …]
/webrtc/dtls/src/handshake/
H A Dhandshake_random.rs33 Ok(d) => d.as_secs() as u32, in marshal()
/webrtc/ice/src/candidate/
H A Dcandidate_base.rs262 let d = SystemTime::now() in seen() localVariable
267 self.set_last_sent(d); in seen()
269 self.set_last_received(d); in seen()
316 pub fn set_last_received(&self, d: Duration) { in set_last_received()
319 .store(d.as_nanos() as u64, Ordering::SeqCst); in set_last_received()
322 pub fn set_last_sent(&self, d: Duration) { in set_last_sent()
324 self.last_sent.store(d.as_nanos() as u64, Ordering::SeqCst); in set_last_sent()
/webrtc/interceptor/src/report/receiver/
H A Dreceiver_stream.rs71 let d = now in process_rtp() localVariable
77 self.jitter += (d.abs() - self.jitter) / 16.0; in process_rtp()
132 Ok(d) => (d.as_secs_f64() * 65536.0) as u32, in generate_report()
/webrtc/turn/src/allocation/
H A Dpermission.rs53 if let Some(d) = result { in start()
54 timer.as_mut().reset(Instant::now() + d); in start()
/webrtc/webrtc/src/peer_connection/
H A Dmod.rs511 Some(d) => d, in check_negotiation_needed()
830 let sdp = d.marshal(); in create_offer()
835 parsed: Some(d), in create_offer()
932 let mut d = self in create_answer() localVariable
946 let sdp = d.marshal(); in create_answer()
951 parsed: Some(d), in create_answer()
1842 if d.max_packet_lifetime != 0 && d.max_retransmits != 0 { in create_data_channel()
1862 Ok(d) in create_data_channel()
1921 for d in &*data_channels { in close()
2064 d.take(); in gathering_complete_promise()
[all …]

123