Home
last modified time | relevance | path

Searched refs:reader (Results 1 – 25 of 123) sorted by relevance

12345

/webrtc/media/src/io/ivf_reader/
H A Dmod.rs41 reader: R, field
50 reader, in new()
63 self.reader = reset(self.bytes_read); in reset_reader()
71 let timestamp = self.reader.read_u64::<LittleEndian>()?; in parse_next_frame()
79 self.reader.read_exact(&mut payload)?; in parse_next_frame()
92 self.reader.read_exact(&mut signature)?; in parse_file_header()
93 let version = self.reader.read_u16::<LittleEndian>()?; in parse_file_header()
95 self.reader.read_exact(&mut four_cc)?; in parse_file_header()
96 let width = self.reader.read_u16::<LittleEndian>()?; in parse_file_header()
97 let height = self.reader.read_u16::<LittleEndian>()?; in parse_file_header()
[all …]
H A Divf_reader_test.rs77 let (mut reader, _) = IVFReader::new(r)?; in test_ivf_reader_parse_valid_frames()
80 let (payload, header) = reader.parse_next_frame()?; in test_ivf_reader_parse_valid_frames()
90 reader.bytes_read, in test_ivf_reader_parse_valid_frames()
93 let previous_bytes_read = reader.bytes_read; in test_ivf_reader_parse_valid_frames()
108 reader.bytes_read, in test_ivf_reader_parse_valid_frames()
124 let (mut reader, _) = IVFReader::new(r)?; in test_ivf_reader_parse_incomplete_frame_header()
127 let result = reader.parse_next_frame(); in test_ivf_reader_parse_incomplete_frame_header()
143 let (mut reader, _) = IVFReader::new(r)?; in test_ivf_reader_parse_incomplete_frame_payload()
146 let result = reader.parse_next_frame(); in test_ivf_reader_parse_incomplete_frame_payload()
156 let (mut reader, _) = IVFReader::new(r)?; in test_ivf_reader_eof_when_no_frames_left()
[all …]
/webrtc/rtp/src/codecs/vp9/
H A Dmod.rs211 let b = reader.get_u8(); in depacketize()
268 reader: &mut dyn Buf, in parse_picture_id()
271 if reader.remaining() == 0 { in parse_picture_id()
274 let b = reader.get_u8(); in parse_picture_id()
293 reader: &mut dyn Buf, in parse_layer_info()
313 reader: &mut dyn Buf, in parse_layer_info_common()
319 let b = reader.get_u8(); in parse_layer_info_common()
344 reader: &mut dyn Buf, in parse_layer_info_non_flexible_mode()
364 reader: &mut dyn Buf, in parse_ref_indices()
372 b = reader.get_u8(); in parse_ref_indices()
[all …]
/webrtc/media/src/io/h264_reader/
H A Dh264_reader_test.rs7 let mut reader = H264Reader::new(Cursor::new(input), 1_048_576); in test_data_does_not_start_with_h264header() localVariable
8 if let Err(err) = reader.next_nal() { in test_data_does_not_start_with_h264header()
27 let mut reader = H264Reader::new(Cursor::new(h264bytes), 1_048_576); in test_parse_header() localVariable
29 let nal = reader.next_nal()?; in test_parse_header()
43 let mut reader = H264Reader::new(Cursor::new(input), 1_048_576); in test_eof() localVariable
44 if let Err(err) = reader.next_nal() { in test_eof()
65 let mut reader = H264Reader::new(Cursor::new(h264bytes), 1_048_576); in test_skip_sei() localVariable
67 let nal = reader.next_nal()?; in test_skip_sei()
70 let nal = reader.next_nal()?; in test_skip_sei()
84 let mut reader = H264Reader::new(Cursor::new(test), 1_048_576); in test_issue1734_next_nal() localVariable
[all …]
/webrtc/media/src/io/ogg_reader/
H A Dmod.rs23 reader: R, field
60 reader, in new()
91 let mut reader = Cursor::new(&payload[8..]); in read_headers() localVariable
92 let version = reader.read_u8()?; //8 in read_headers()
93 let channels = reader.read_u8()?; //9 in read_headers()
94 let pre_skip = reader.read_u16::<LittleEndian>()?; //10-11 in read_headers()
97 let channel_map = reader.read_u8()?; //18 in read_headers()
113 self.reader.read_exact(&mut h)?; in parse_next_page()
127 self.reader.read_exact(&mut size_buffer)?; in parse_next_page()
136 self.reader.read_exact(&mut payload)?; in parse_next_page()
[all …]
/webrtc/interceptor/src/
H A Dchain.rs30 mut reader: Arc<dyn RTCPReader + Send + Sync>, in bind_rtcp_reader()
33 reader = icpr.bind_rtcp_reader(reader).await; in bind_rtcp_reader()
35 reader in bind_rtcp_reader()
75 mut reader: Arc<dyn RTPReader + Send + Sync>, in bind_remote_stream()
78 reader = icpr.bind_remote_stream(info, reader).await; in bind_remote_stream()
80 reader in bind_remote_stream()
/webrtc/dtls/src/handshake/
H A Dhandshake_header.rs34 pub fn unmarshal<R: Read>(reader: &mut R) -> Result<Self> { in unmarshal()
35 let handshake_type = reader.read_u8()?.into(); in unmarshal()
36 let length = reader.read_u24::<BigEndian>()?; in unmarshal()
37 let message_sequence = reader.read_u16::<BigEndian>()?; in unmarshal()
38 let fragment_offset = reader.read_u24::<BigEndian>()?; in unmarshal()
39 let fragment_length = reader.read_u24::<BigEndian>()?; in unmarshal()
H A Dhandshake_message_server_hello.rs103 pub fn unmarshal<R: Read>(reader: &mut R) -> Result<Self> { in unmarshal()
104 let major = reader.read_u8()?; in unmarshal()
105 let minor = reader.read_u8()?; in unmarshal()
106 let random = HandshakeRandom::unmarshal(reader)?; in unmarshal()
109 let session_id_len = reader.read_u8()? as usize; in unmarshal()
111 reader.read_exact(&mut session_id_buffer)?; in unmarshal()
113 let cipher_suite: CipherSuiteId = reader.read_u16::<BigEndian>()?.into(); in unmarshal()
115 let compression_method = reader.read_u8()?.into(); in unmarshal()
118 let extension_buffer_len = reader.read_u16::<BigEndian>()? as usize; in unmarshal()
120 reader.read_exact(&mut extension_buffer)?; in unmarshal()
H A Dhandshake_message_client_hello.rs139 pub fn unmarshal<R: Read>(reader: &mut R) -> Result<Self> { in unmarshal()
140 let major = reader.read_u8()?; in unmarshal()
141 let minor = reader.read_u8()?; in unmarshal()
142 let random = HandshakeRandom::unmarshal(reader)?; in unmarshal()
145 reader.read_u8()?; in unmarshal()
147 let cookie_len = reader.read_u8()? as usize; in unmarshal()
149 reader.read_exact(&mut cookie)?; in unmarshal()
154 let id: CipherSuiteId = reader.read_u16::<BigEndian>()?.into(); in unmarshal()
159 let compression_methods = CompressionMethods::unmarshal(reader)?; in unmarshal()
162 let extension_buffer_len = reader.read_u16::<BigEndian>()? as usize; in unmarshal()
[all …]
H A Dhandshake_message_certificate_request.rs52 pub fn unmarshal<R: Read>(reader: &mut R) -> Result<Self> { in unmarshal()
53 let certificate_types_length = reader.read_u8()?; in unmarshal()
57 let cert_type = reader.read_u8()?.into(); in unmarshal()
61 let signature_hash_algorithms_length = reader.read_u16::<BigEndian>()?; in unmarshal()
65 let hash = reader.read_u8()?.into(); in unmarshal()
66 let signature = reader.read_u8()?.into(); in unmarshal()
H A Dhandshake_message_certificate_verify.rs36 pub fn unmarshal<R: Read>(reader: &mut R) -> Result<Self> { in unmarshal()
37 let hash_algorithm = reader.read_u8()?.into(); in unmarshal()
38 let signature_algorithm = reader.read_u8()?.into(); in unmarshal()
39 let signature_length = reader.read_u16::<BigEndian>()? as usize; in unmarshal()
41 reader.read_exact(&mut signature)?; in unmarshal()
H A Dhandshake_message_hello_verify_request.rs55 pub fn unmarshal<R: Read>(reader: &mut R) -> Result<Self> { in unmarshal()
56 let major = reader.read_u8()?; in unmarshal()
57 let minor = reader.read_u8()?; in unmarshal()
58 let cookie_length = reader.read_u8()?; in unmarshal()
60 reader.read_to_end(&mut cookie)?; in unmarshal()
/webrtc/dtls/src/extension/
H A Dextension_server_name.rs37 pub fn unmarshal<R: Read>(reader: &mut R) -> Result<Self> { in unmarshal()
39 let _ = reader.read_u16::<BigEndian>()? as usize; in unmarshal()
40 let _ = reader.read_u16::<BigEndian>()? as usize; in unmarshal()
42 let name_type = reader.read_u8()?; in unmarshal()
47 let buf_len = reader.read_u16::<BigEndian>()? as usize; in unmarshal()
49 reader.read_exact(&mut buf)?; in unmarshal()
H A Dextension_supported_signature_algorithms.rs35 pub fn unmarshal<R: Read>(reader: &mut R) -> Result<Self> { in unmarshal()
36 let _ = reader.read_u16::<BigEndian>()?; in unmarshal()
38 let algorithm_count = reader.read_u16::<BigEndian>()? as usize / 2; in unmarshal()
41 let hash = reader.read_u8()?.into(); in unmarshal()
42 let signature = reader.read_u8()?.into(); in unmarshal()
H A Dmod.rs103 pub fn unmarshal<R: Read>(reader: &mut R) -> Result<Self> { in unmarshal()
104 let extension_value: ExtensionValue = reader.read_u16::<BigEndian>()?.into(); in unmarshal()
107 ExtensionServerName::unmarshal(reader)?, in unmarshal()
110 ExtensionSupportedEllipticCurves::unmarshal(reader)?, in unmarshal()
113 ExtensionSupportedPointFormats::unmarshal(reader)?, in unmarshal()
117 ExtensionSupportedSignatureAlgorithms::unmarshal(reader)?, in unmarshal()
120 ExtensionValue::UseSrtp => Ok(Extension::UseSrtp(ExtensionUseSrtp::unmarshal(reader)?)), in unmarshal()
122 ExtensionUseExtendedMasterSecret::unmarshal(reader)?, in unmarshal()
125 ExtensionRenegotiationInfo::unmarshal(reader)?, in unmarshal()
H A Dextension_use_srtp.rs63 pub fn unmarshal<R: Read>(reader: &mut R) -> Result<Self> { in unmarshal()
64 let _ = reader.read_u16::<BigEndian>()?; in unmarshal()
66 let profile_count = reader.read_u16::<BigEndian>()? as usize / 2; in unmarshal()
69 let protection_profile = reader.read_u16::<BigEndian>()?.into(); in unmarshal()
74 let _ = reader.read_u8()?; in unmarshal()
H A Dextension_supported_point_formats.rs37 pub fn unmarshal<R: Read>(reader: &mut R) -> Result<Self> { in unmarshal()
38 let _ = reader.read_u16::<BigEndian>()?; in unmarshal()
40 let point_format_count = reader.read_u8()? as usize; in unmarshal()
43 let point_format = reader.read_u8()?; in unmarshal()
H A Dextension_supported_elliptic_curves.rs34 pub fn unmarshal<R: Read>(reader: &mut R) -> Result<Self> { in unmarshal()
35 let _ = reader.read_u16::<BigEndian>()?; in unmarshal()
37 let group_count = reader.read_u16::<BigEndian>()? as usize / 2; in unmarshal()
40 let elliptic_curve = reader.read_u16::<BigEndian>()?.into(); in unmarshal()
/webrtc/sdp/src/lexer/
H A Dmod.rs11 pub reader: &'a mut R, field
20 pub fn read_type<R: io::BufRead + io::Seek>(reader: &mut R) -> Result<(Vec<u8>, usize)> { in read_type()
24 if reader.read_exact(&mut b).is_err() { in read_type()
31 reader.seek(SeekFrom::Current(-1))?; in read_type()
34 let num_bytes = reader.read_until(b'=', &mut buf)?; in read_type()
45 pub fn read_value<R: io::BufRead + io::Seek>(reader: &mut R) -> Result<(String, usize)> { in read_value()
47 let num_bytes = reader.read_line(&mut value)?; in read_value()
/webrtc/dtls/src/record_layer/
H A Drecord_layer_header.rs65 pub fn unmarshal<R: Read>(reader: &mut R) -> Result<Self> { in unmarshal()
66 let content_type = reader.read_u8()?.into(); in unmarshal()
67 let major = reader.read_u8()?; in unmarshal()
68 let minor = reader.read_u8()?; in unmarshal()
69 let epoch = reader.read_u16::<BigEndian>()?; in unmarshal()
73 reader.read_exact(&mut be[2..])?; in unmarshal()
80 let content_len = reader.read_u16::<BigEndian>()?; in unmarshal()
H A Dmod.rs58 pub fn unmarshal<R: Read>(reader: &mut R) -> Result<Self> { in unmarshal()
59 let record_layer_header = RecordLayerHeader::unmarshal(reader)?; in unmarshal()
61 ContentType::Alert => Content::Alert(Alert::unmarshal(reader)?), in unmarshal()
63 Content::ApplicationData(ApplicationData::unmarshal(reader)?) in unmarshal()
66 Content::ChangeCipherSpec(ChangeCipherSpec::unmarshal(reader)?) in unmarshal()
68 ContentType::Handshake => Content::Handshake(Handshake::unmarshal(reader)?), in unmarshal()
/webrtc/sctp/src/chunk/
H A Dchunk_selective_ack.rs98 let reader = &mut raw.slice(CHUNK_HEADER_SIZE..CHUNK_HEADER_SIZE + header.value_length()); in unmarshal() localVariable
100 let cumulative_tsn_ack = reader.get_u32(); in unmarshal()
101 let advertised_receiver_window_credit = reader.get_u32(); in unmarshal()
102 let gap_ack_blocks_len = reader.get_u16() as usize; in unmarshal()
103 let duplicate_tsn_len = reader.get_u16() as usize; in unmarshal()
119 let start = reader.get_u16(); in unmarshal()
120 let end = reader.get_u16(); in unmarshal()
124 duplicate_tsn.push(reader.get_u32()); in unmarshal()
/webrtc/sdp/benches/
H A Dbench.rs32 let mut reader = Cursor::new(CANONICAL_UNMARSHAL_SDP.as_bytes()); in benchmark_sdp() localVariable
33 let sdp = SessionDescription::unmarshal(&mut reader).unwrap(); in benchmark_sdp()
44 let mut reader = Cursor::new(CANONICAL_UNMARSHAL_SDP.as_bytes()); in benchmark_sdp() localVariable
45 let _ = SessionDescription::unmarshal(&mut reader).unwrap(); in benchmark_sdp()
/webrtc/dtls/src/handshake/handshake_message_certificate/
H A Dhandshake_message_certificate_test.rs37 let mut reader = BufReader::new(raw_certificate.as_slice()); in test_handshake_message_certificate() localVariable
38 let c = HandshakeMessageCertificate::unmarshal(&mut reader)?; in test_handshake_message_certificate()
70 let mut reader = BufReader::new(raw_certificate.as_slice()); in test_empty_handshake_message_certificate() localVariable
71 let c = HandshakeMessageCertificate::unmarshal(&mut reader)?; in test_empty_handshake_message_certificate()
/webrtc/dtls/src/change_cipher_spec/
H A Dchange_cipher_spec_test.rs14 let mut reader = BufReader::new(raw.as_slice()); in test_change_cipher_spec_round_trip() localVariable
15 let cnew = ChangeCipherSpec::unmarshal(&mut reader)?; in test_change_cipher_spec_round_trip()
28 let mut reader = BufReader::new(data.as_slice()); in test_change_cipher_spec_invalid() localVariable
29 let result = ChangeCipherSpec::unmarshal(&mut reader); in test_change_cipher_spec_invalid()

12345