Home
last modified time | relevance | path

Searched refs:b (Results 1 – 25 of 118) sorted by relevance

12345

/webrtc/util/src/buffer/
H A Dmod.rs137 if (b.limit_count > 0 && b.count >= b.limit_count) in write()
138 || (b.limit_size > 0 && b.size() + 2 + packet.len() > b.limit_size) in write()
152 if b.tail >= b.data.len() { in write()
159 if b.tail >= b.data.len() { in write()
169 if b.tail >= b.data.len() { in write()
196 if b.head != b.tail { in read()
198 let n1 = b.data[b.head]; in read()
200 if b.head >= b.data.len() { in read()
203 let n2 = b.data[b.head]; in read()
205 if b.head >= b.data.len() { in read()
[all …]
/webrtc/stun/benches/
H A Dbench.rs38 b.iter(|| { in benchmark_addr()
49 b.iter(|| { in benchmark_addr()
67 b.iter(|| { in benchmark_agent()
84 b.iter(|| { in benchmark_agent()
97 b.iter(|| { in benchmark_attributes()
107 b.iter(|| { in benchmark_attributes()
120 b.iter(|| { in benchmark_error_code()
134 b.iter(|| { in benchmark_error_code()
149 b.iter(|| { in benchmark_error_code()
167 b.iter(|| { in benchmark_fingerprint()
[all …]
/webrtc/turn/benches/
H A Dbench.rs13 c.bench_function("BenchmarkIsChannelData", |b| { in benchmark_chan_data()
14 b.iter(|| { in benchmark_chan_data()
27 b.iter(|| { in benchmark_chan_data()
44 b.iter(|| { in benchmark_chan_data()
57 b.iter(|| { in benchmark_chan()
71 b.iter(|| { in benchmark_chan()
83 c.bench_function("BenchmarkData/AddTo", |b| { in benchmark_data()
84 b.iter(|| { in benchmark_data()
95 b.iter(|| { in benchmark_data()
108 b.iter(|| { in benchmark_lifetime()
[all …]
/webrtc/rtp/src/codecs/vp9/
H A Dmod.rs156 pub b: bool, field
211 let b = reader.get_u8(); in depacketize() localVariable
217 self.b = (b & 0x08) != 0; in depacketize()
277 if (b & 0x80) != 0 { in parse_picture_id()
322 self.tid = b >> 5; in parse_layer_info_common()
323 self.u = b & 0x10 != 0; in parse_layer_info_common()
325 self.d = b & 0x01 != 0; in parse_layer_info_common()
367 let mut b = 1u8; in parse_ref_indices() localVariable
368 while (b & 0x1) != 0 { in parse_ref_indices()
412 self.ns = b >> 5; in parse_ssdata()
[all …]
/webrtc/stun/src/
H A Dfingerprint.rs33 pub fn fingerprint_value(b: &[u8]) -> u32 { in fingerprint_value()
34 let checksum = Crc::<u32>::new(&CRC_32_ISO_HDLC).checksum(b); in fingerprint_value()
46 let b = val.to_be_bytes(); in add_to() localVariable
48 m.add(ATTR_FINGERPRINT, &b); in add_to()
57 let b = m.get(ATTR_FINGERPRINT)?; in check() localVariable
58 check_size(ATTR_FINGERPRINT, b.len(), FINGERPRINT_SIZE)?; in check()
59 let val = u32::from_be_bytes([b[0], b[1], b[2], b[3]]); in check()
H A Dmessage.rs48 b.len() >= MESSAGE_HEADER_SIZE && u32::from_be_bytes([b[4], b[5], b[6], b[7]]) == MAGIC_COOKIE in is_message()
210 for b in buf { in add()
211 *b = 0; in add()
313 b.len(), in decode()
319 typ: compat_attr_type(u16::from_be_bytes([b[0], b[1]])), // first 2 bytes in decode()
326 b = &b[ATTRIBUTE_HEADER_SIZE..]; // slicing again to simplify value read in decode()
332 b.len(), in decode()
339 b = &b[a_buff_l..]; in decode()
379 b.raw.clear(); in clone_to()
381 b.decode() in clone_to()
[all …]
/webrtc/rtp/src/codecs/vp8/
H A Dmod.rs174 let mut b = reader.get_u8(); in depacketize() localVariable
177 self.x = (b & 0x80) >> 7; in depacketize()
178 self.n = (b & 0x20) >> 5; in depacketize()
179 self.s = (b & 0x10) >> 4; in depacketize()
180 self.pid = b & 0x07; in depacketize()
183 b = reader.get_u8(); in depacketize()
185 self.i = (b & 0x80) >> 7; in depacketize()
192 b = reader.get_u8(); in depacketize()
195 if b & 0x80 > 0 { in depacketize()
218 let b = reader.get_u8(); in depacketize() localVariable
[all …]
/webrtc/webrtc/src/mux/
H A Dmux_func.rs15 let b = buf[0]; in match_range() localVariable
16 b >= lower && b <= upper in match_range()
35 pub fn match_dtls(b: &[u8]) -> bool { in match_dtls()
36 match_range(20, 63)(b) in match_dtls()
41 pub fn match_srtp_or_srtcp(b: &[u8]) -> bool { in match_srtp_or_srtcp()
42 match_range(128, 191)(b) in match_srtp_or_srtcp()
/webrtc/sctp/src/queue/
H A Dpayload_queue.rs43 if sna32lt(a, b) { in push_no_check()
107 let mut b = GapAckBlock::default(); in get_gap_ack_blocks() localVariable
117 b.start = diff; in get_gap_ack_blocks()
118 b.end = b.start; in get_gap_ack_blocks()
119 } else if b.end + 1 == diff { in get_gap_ack_blocks()
120 b.end += 1; in get_gap_ack_blocks()
122 gap_ack_blocks.push(b); in get_gap_ack_blocks()
124 b.start = diff; in get_gap_ack_blocks()
125 b.end = diff; in get_gap_ack_blocks()
129 gap_ack_blocks.push(b); in get_gap_ack_blocks()
[all …]
/webrtc/util/benches/
H A Dbench.rs17 c.bench_function("Benchmark Buffer WriteThenRead 1", |b| { in benchmark_buffer()
18 b.to_async(FuturesExecutor) in benchmark_buffer()
22 c.bench_function("Benchmark Buffer WriteThenRead 10", |b| { in benchmark_buffer()
23 b.to_async(FuturesExecutor) in benchmark_buffer()
27 c.bench_function("Benchmark Buffer WriteThenRead 100", |b| { in benchmark_buffer()
28 b.to_async(FuturesExecutor) in benchmark_buffer()
/webrtc/webrtc/src/rtp_transceiver/fmtp/generic/
H A Dgeneric_test.rs115 for (name, a, b, consist) in tests { in test_generic_fmtp_compare()
116 let check = |a, b| { in test_generic_fmtp_compare()
118 let bb = parse("", b); in test_generic_fmtp_compare()
128 b, in test_generic_fmtp_compare()
141 b, in test_generic_fmtp_compare()
147 check(a, b); in test_generic_fmtp_compare()
154 let b = parse("video/VP8", ""); in test_generic_fmtp_compare_mime_type_case_mismatch() localVariable
157 b.match_fmtp(&*a), in test_generic_fmtp_compare_mime_type_case_mismatch()
/webrtc/turn/src/proto/chandata/
H A Dchandata_test.rs12 let mut b = ChannelData::default(); in test_channel_data_encode() localVariable
13 b.raw.extend_from_slice(&d.raw); in test_channel_data_encode()
14 b.decode()?; in test_channel_data_encode()
16 assert_eq!(b, d, "not equal"); in test_channel_data_encode()
19 ChannelData::is_channel_data(&b.raw) && ChannelData::is_channel_data(&d.raw), in test_channel_data_encode()
87 for (name, a, b, r) in tests { in test_channel_data_equal()
88 let v = a == b; in test_channel_data_equal()
175 let b = match hex::decode(h) { in test_chrome_channel_data() localVariable
176 Ok(b) => b, in test_chrome_channel_data()
179 data.push(b); in test_chrome_channel_data()
/webrtc/webrtc/src/track/track_local/
H A Dtrack_local_static_rtp.rs40 .any(|b| b.sender_paused.load(Ordering::SeqCst)) in any_binding_paused()
47 .all(|b| b.sender_paused.load(Ordering::SeqCst)) in all_binding_paused()
94 for b in bindings.into_iter() { in write_rtp_with_extensions()
95 if b.is_sender_paused() { in write_rtp_with_extensions()
99 pkt.header.ssrc = b.ssrc; in write_rtp_with_extensions()
100 pkt.header.payload_type = b.payload_type; in write_rtp_with_extensions()
103 if let Some(id) = b in write_rtp_with_extensions()
117 if let Some(write_stream) = &b.write_stream { in write_rtp_with_extensions()
233 async fn write(&self, mut b: &[u8]) -> Result<usize> { in write()
234 let pkt = rtp::packet::Packet::unmarshal(&mut b)?; in write()
[all …]
/webrtc/rtp/benches/
H A Dpacket_bench.rs40 c.bench_function("Benchmark MarshalTo", |b| { in benchmark_packet()
41 b.iter(|| { in benchmark_packet()
46 c.bench_function("Benchmark Marshal", |b| { in benchmark_packet()
47 b.iter(|| { in benchmark_packet()
52 c.bench_function("Benchmark Unmarshal ", |b| { in benchmark_packet()
53 b.iter(|| { in benchmark_packet()
/webrtc/turn/src/proto/
H A Dproto_test.rs18 let b = match hex::decode(h) { in test_chrome_alloc_request() localVariable
19 Ok(b) => b, in test_chrome_alloc_request()
22 data.push(b); in test_chrome_alloc_request()
/webrtc/webrtc/src/rtp_transceiver/fmtp/h264/
H A Dh264_test.rs129 for (name, a, b, consist) in tests { in test_h264_fmtp_compare()
130 let check = |a, b| { in test_h264_fmtp_compare()
132 let bb = parse("video/h264", b); in test_h264_fmtp_compare()
142 b, in test_h264_fmtp_compare()
155 b, in test_h264_fmtp_compare()
161 check(a, b); in test_h264_fmtp_compare()
/webrtc/mdns/src/message/
H A Dmessage_test.rs475 got.unpack(&b, 0, 0)?; in test_srv_pack_unpack()
501 got.unpack(&b)?; in test_dns_pack_unpack()
527 b = want.append_pack(b)?; in test_dns_append_pack_unpack()
816 Box::new(|b: &mut Builder| -> Result<()> { b.start_questions() }), in test_start_error()
820 Box::new(|b: &mut Builder| -> Result<()> { b.start_answers() }), in test_start_error()
824 Box::new(|b: &mut Builder| -> Result<()> { b.start_authorities() }), in test_start_error()
828 Box::new(|b: &mut Builder| -> Result<()> { b.start_additionals() }), in test_start_error()
1046 b.enable_compression(); in test_builder()
1048 b.start_questions()?; in test_builder()
1053 b.start_answers()?; in test_builder()
[all …]
/webrtc/sdp/benches/
H A Dbench.rs36 c.bench_function("Benchmark Marshal", |b| { in benchmark_sdp()
37 b.iter(|| { in benchmark_sdp()
42 c.bench_function("Benchmark Unmarshal ", |b| { in benchmark_sdp()
43 b.iter(|| { in benchmark_sdp()
/webrtc/sctp/src/param/
H A Dparam_test.rs43 let b = actual.marshal()?; in test_param_header_success() localVariable
44 assert_eq!(b, binary); in test_param_header_success()
87 let b = actual.marshal()?; in test_param_forward_tsn_supported_success() localVariable
88 assert_eq!(b, binary); in test_param_forward_tsn_supported_success()
145 let b = actual.marshal()?; in test_param_outgoing_reset_request_success() localVariable
146 assert_eq!(b, binary); in test_param_outgoing_reset_request_success()
189 let b = actual.marshal()?; in test_param_reconfig_response_success() localVariable
190 assert_eq!(b, binary); in test_param_reconfig_response_success()
250 let b = p.marshal()?; in test_build_param_success() localVariable
251 assert_eq!(b, binary); in test_build_param_success()
/webrtc/rtcp/src/
H A Dutil.rs48 pub(crate) fn get_nbits_from_byte(b: u8, begin: u16, n: u16) -> u16 { in get_nbits_from_byte()
51 (b & mask) as u16 >> end_shift in get_nbits_from_byte()
55 pub(crate) fn get_24bits_from_bytes(b: &[u8]) -> u32 { in get_24bits_from_bytes()
56 ((b[0] as u32) << 16) + ((b[1] as u32) << 8) + (b[2] as u32) in get_24bits_from_bytes()
/webrtc/dtls/src/
H A Dlib.rs34 b: &[SrtpProtectionProfile], in find_matching_srtp_profile()
37 for b_profile in b { in find_matching_srtp_profile()
48 b: &[CipherSuiteId], in find_matching_cipher_suite()
51 for b_suite in b { in find_matching_cipher_suite()
/webrtc/turn/src/client/binding/
H A Dbinding_test.rs35 let b = m.create(addr); in test_binding_manager_method() localVariable
36 *b.unwrap() in test_binding_manager_method()
73 let b = m.find_by_addr(&addr); in test_binding_manager_failure() localVariable
74 assert!(b.is_none(), "should fail"); in test_binding_manager_failure()
75 let b = m.find_by_number(5555); in test_binding_manager_failure() localVariable
76 assert!(b.is_none(), "should fail"); in test_binding_manager_failure()
/webrtc/turn/src/client/
H A Dbinding.rs79 let b = Binding { in create() localVariable
86 self.chan_map.insert(b.number, b.addr.to_string()); in create()
87 self.addr_map.insert(b.addr.to_string(), b); in create()
116 if let Some(b) = self.addr_map.remove(&addr.to_string()) { in delete_by_addr()
117 self.chan_map.remove(&b.number); in delete_by_addr()
/webrtc/webrtc/src/track/track_remote/
H A Dmod.rs224 let n = std::cmp::min(b.len(), data.len()); in read()
225 b[..n].copy_from_slice(&data[..n]); in read()
226 self.check_and_update_track(&b[..n]).await?; in read()
238 self.check_and_update_track(&b[..n]).await?; in read()
246 if b.len() < 2 { in check_and_update_track()
250 let payload_type = b[1] & RTP_PAYLOAD_TYPE_BITMASK; in check_and_update_track()
282 let mut b = vec![0u8; self.receive_mtu]; in read_rtp() localVariable
283 let (n, attributes) = self.read(&mut b).await?; in read_rtp()
285 let mut buf = &b[..n]; in read_rtp()
292 let (n, a) = self.read(b).await?; in peek()
[all …]
/webrtc/media/benches/
H A Daudio_buffer.rs21 c.bench_function("Buffer<T, Interleaved> => Buffer<T, Deinterleaved>", |b| { in benchmark_from()
22 b.iter(|| { in benchmark_from()
29 c.bench_function("Buffer<T, Deinterleaved> => Buffer<T, Interleaved>", |b| { in benchmark_from()
30 b.iter(|| { in benchmark_from()

12345