pub struct DacCaptureStream { /* private fields */ }Expand description
Standalone PCM capture running through the direct USB session. A caller may read from any thread; reads copy complete interleaved wire frames without conversion. Slow readers drop old queued frames and expose that in stats.
Implementations§
Source§impl DacCaptureStream
impl DacCaptureStream
Sourcepub fn format(&self) -> &CaptureFormat
pub fn format(&self) -> &CaptureFormat
Examples found in repository?
examples/loopback_capture.rs (line 79)
4fn main() -> Result<(), Box<dyn std::error::Error>> {
5 use std::{
6 fs::OpenOptions,
7 io::{Seek, SeekFrom, Write},
8 os::fd::AsRawFd,
9 time::{Duration, Instant},
10 };
11 use usbdac_core::{CaptureRequest, Dac, DacConfig, DeviceInfo};
12 let args: Vec<String> = std::env::args().collect();
13 if args.len() != 5 {
14 return Err(
15 "usage: loopback_capture /dev/bus/usb/BBB/DDD output.wav sample_rate seconds (1..120)"
16 .into(),
17 );
18 }
19 let rate: u32 = args[3].parse()?;
20 let seconds: u64 = args[4].parse()?;
21 if rate == 0 || !(1..=120).contains(&seconds) {
22 return Err("invalid capture duration/rate".into());
23 }
24 let file = OpenOptions::new().read(true).write(true).open(&args[1])?;
25 let fd = file.as_raw_fd();
26 // GET_DESCRIPTOR device: identity comes from the actual USB device.
27 #[repr(C)]
28 struct Control {
29 kind: u8,
30 request: u8,
31 value: u16,
32 index: u16,
33 length: u16,
34 timeout: u32,
35 data: *mut u8,
36 }
37 let mut descriptor = [0u8; 18];
38 let mut control = Control {
39 kind: 0x80,
40 request: 6,
41 value: 0x0100,
42 index: 0,
43 length: 18,
44 timeout: 1000,
45 data: descriptor.as_mut_ptr(),
46 };
47 if unsafe { libc::ioctl(fd, 0xc0185500u32 as _, &mut control) } != 18 {
48 return Err(std::io::Error::last_os_error().into());
49 }
50 let mut info = DeviceInfo::new(
51 u16::from_le_bytes([descriptor[8], descriptor[9]]),
52 u16::from_le_bytes([descriptor[10], descriptor[11]]),
53 "Independent loopback input",
54 )
55 .with_device_name(&args[1]);
56 let (configuration, control_interfaces, input_interfaces) = Dac::capture_preflight(fd, &info)?;
57 let mut claims = control_interfaces;
58 claims.extend(input_interfaces);
59 claims.sort_unstable();
60 claims.dedup();
61 for &interface in &claims {
62 let interface = u32::from(interface);
63 if unsafe { libc::ioctl(fd, 0x8004550fu32 as _, &interface) } != 0 {
64 return Err(std::io::Error::last_os_error().into());
65 }
66 }
67 info.configuration_id = Some(configuration);
68 info.claimed_interfaces = claims.clone();
69 let dac = Dac::open_capture_device(fd, info, DacConfig::default())?;
70 let capture = dac.open_capture(
71 &CaptureRequest {
72 sample_rate: rate,
73 channels: 2,
74 valid_bits: 16,
75 channel_map: None,
76 },
77 rate as usize,
78 )?;
79 if capture.format().subslot_bytes() != 2 {
80 return Err("probe requires packed 16-bit stereo input for WAV analysis".into());
81 }
82 let mut output = OpenOptions::new()
83 .create_new(true)
84 .write(true)
85 .open(&args[2])?;
86 output.write_all(&[0u8; 44])?;
87 let mut buffer = [0u8; 8192];
88 let mut bytes = 0u32;
89 let started = Instant::now();
90 while started.elapsed() < Duration::from_secs(seconds) {
91 let frames = capture.read(&mut buffer)?;
92 let count = frames * capture.format().bytes_per_frame();
93 output.write_all(&buffer[..count])?;
94 bytes = bytes.checked_add(count as u32).ok_or("WAV too large")?;
95 std::thread::sleep(Duration::from_millis(2));
96 }
97 let stats = capture.stats();
98 capture.close()?;
99 dac.close()?;
100 if !Dac::await_usb_retirement(Duration::from_secs(3)) {
101 return Err("capture did not retire; retain host claims".into());
102 }
103 for &interface in claims.iter().rev() {
104 let interface = u32::from(interface);
105 if unsafe { libc::ioctl(fd, 0x80045510u32 as _, &interface) } != 0 {
106 return Err(std::io::Error::last_os_error().into());
107 }
108 }
109 let mut header = Vec::with_capacity(44);
110 header.extend_from_slice(b"RIFF");
111 header.extend_from_slice(&(36 + bytes).to_le_bytes());
112 header.extend_from_slice(b"WAVEfmt ");
113 header.extend_from_slice(&16u32.to_le_bytes());
114 header.extend_from_slice(&1u16.to_le_bytes());
115 header.extend_from_slice(&2u16.to_le_bytes());
116 header.extend_from_slice(&rate.to_le_bytes());
117 header.extend_from_slice(&(rate * 4).to_le_bytes());
118 header.extend_from_slice(&4u16.to_le_bytes());
119 header.extend_from_slice(&16u16.to_le_bytes());
120 header.extend_from_slice(b"data");
121 header.extend_from_slice(&bytes.to_le_bytes());
122 output.seek(SeekFrom::Start(0))?;
123 output.write_all(&header)?;
124 output.flush()?;
125 let valid = bytes > 0
126 && stats.failed_transfers == 0
127 && stats.failed_packets == 0
128 && stats.missing_frames == 0
129 && stats.overrun_frames == 0
130 && stats.contention_frames == 0;
131 let metadata = serde_json::json!({"sample_rate":rate,"channels":2,"valid_bits":16,"subslot_bytes":2,"bytes":bytes,"capture_complete":valid,"stats":format!("{stats:?}"),"clock_alignment":"unmeasured","gain_calibration":"unmeasured"});
132 std::fs::write(
133 format!("{}.json", args[2]),
134 serde_json::to_vec_pretty(&metadata)?,
135 )?;
136 if !valid {
137 return Err(
138 "capture has missing/failed/backlogged frames; metrics cannot establish discontinuity"
139 .into(),
140 );
141 }
142 println!("CAPTURE_COMPLETE {} frames; annotate playback events against the capture clock before analysis", bytes / 4);
143 Ok(())
144}pub fn interface_number(&self) -> u8
pub fn alternate_setting(&self) -> u8
pub fn endpoint_address(&self) -> u8
pub fn configuration_id(&self) -> u8
Sourcepub fn read(&self, destination: &mut [u8]) -> Result<usize>
pub fn read(&self, destination: &mut [u8]) -> Result<usize>
Return whole wire frames copied. An active empty stream returns zero.
Destination length must be a multiple of format().bytes_per_frame().
Examples found in repository?
examples/loopback_capture.rs (line 91)
4fn main() -> Result<(), Box<dyn std::error::Error>> {
5 use std::{
6 fs::OpenOptions,
7 io::{Seek, SeekFrom, Write},
8 os::fd::AsRawFd,
9 time::{Duration, Instant},
10 };
11 use usbdac_core::{CaptureRequest, Dac, DacConfig, DeviceInfo};
12 let args: Vec<String> = std::env::args().collect();
13 if args.len() != 5 {
14 return Err(
15 "usage: loopback_capture /dev/bus/usb/BBB/DDD output.wav sample_rate seconds (1..120)"
16 .into(),
17 );
18 }
19 let rate: u32 = args[3].parse()?;
20 let seconds: u64 = args[4].parse()?;
21 if rate == 0 || !(1..=120).contains(&seconds) {
22 return Err("invalid capture duration/rate".into());
23 }
24 let file = OpenOptions::new().read(true).write(true).open(&args[1])?;
25 let fd = file.as_raw_fd();
26 // GET_DESCRIPTOR device: identity comes from the actual USB device.
27 #[repr(C)]
28 struct Control {
29 kind: u8,
30 request: u8,
31 value: u16,
32 index: u16,
33 length: u16,
34 timeout: u32,
35 data: *mut u8,
36 }
37 let mut descriptor = [0u8; 18];
38 let mut control = Control {
39 kind: 0x80,
40 request: 6,
41 value: 0x0100,
42 index: 0,
43 length: 18,
44 timeout: 1000,
45 data: descriptor.as_mut_ptr(),
46 };
47 if unsafe { libc::ioctl(fd, 0xc0185500u32 as _, &mut control) } != 18 {
48 return Err(std::io::Error::last_os_error().into());
49 }
50 let mut info = DeviceInfo::new(
51 u16::from_le_bytes([descriptor[8], descriptor[9]]),
52 u16::from_le_bytes([descriptor[10], descriptor[11]]),
53 "Independent loopback input",
54 )
55 .with_device_name(&args[1]);
56 let (configuration, control_interfaces, input_interfaces) = Dac::capture_preflight(fd, &info)?;
57 let mut claims = control_interfaces;
58 claims.extend(input_interfaces);
59 claims.sort_unstable();
60 claims.dedup();
61 for &interface in &claims {
62 let interface = u32::from(interface);
63 if unsafe { libc::ioctl(fd, 0x8004550fu32 as _, &interface) } != 0 {
64 return Err(std::io::Error::last_os_error().into());
65 }
66 }
67 info.configuration_id = Some(configuration);
68 info.claimed_interfaces = claims.clone();
69 let dac = Dac::open_capture_device(fd, info, DacConfig::default())?;
70 let capture = dac.open_capture(
71 &CaptureRequest {
72 sample_rate: rate,
73 channels: 2,
74 valid_bits: 16,
75 channel_map: None,
76 },
77 rate as usize,
78 )?;
79 if capture.format().subslot_bytes() != 2 {
80 return Err("probe requires packed 16-bit stereo input for WAV analysis".into());
81 }
82 let mut output = OpenOptions::new()
83 .create_new(true)
84 .write(true)
85 .open(&args[2])?;
86 output.write_all(&[0u8; 44])?;
87 let mut buffer = [0u8; 8192];
88 let mut bytes = 0u32;
89 let started = Instant::now();
90 while started.elapsed() < Duration::from_secs(seconds) {
91 let frames = capture.read(&mut buffer)?;
92 let count = frames * capture.format().bytes_per_frame();
93 output.write_all(&buffer[..count])?;
94 bytes = bytes.checked_add(count as u32).ok_or("WAV too large")?;
95 std::thread::sleep(Duration::from_millis(2));
96 }
97 let stats = capture.stats();
98 capture.close()?;
99 dac.close()?;
100 if !Dac::await_usb_retirement(Duration::from_secs(3)) {
101 return Err("capture did not retire; retain host claims".into());
102 }
103 for &interface in claims.iter().rev() {
104 let interface = u32::from(interface);
105 if unsafe { libc::ioctl(fd, 0x80045510u32 as _, &interface) } != 0 {
106 return Err(std::io::Error::last_os_error().into());
107 }
108 }
109 let mut header = Vec::with_capacity(44);
110 header.extend_from_slice(b"RIFF");
111 header.extend_from_slice(&(36 + bytes).to_le_bytes());
112 header.extend_from_slice(b"WAVEfmt ");
113 header.extend_from_slice(&16u32.to_le_bytes());
114 header.extend_from_slice(&1u16.to_le_bytes());
115 header.extend_from_slice(&2u16.to_le_bytes());
116 header.extend_from_slice(&rate.to_le_bytes());
117 header.extend_from_slice(&(rate * 4).to_le_bytes());
118 header.extend_from_slice(&4u16.to_le_bytes());
119 header.extend_from_slice(&16u16.to_le_bytes());
120 header.extend_from_slice(b"data");
121 header.extend_from_slice(&bytes.to_le_bytes());
122 output.seek(SeekFrom::Start(0))?;
123 output.write_all(&header)?;
124 output.flush()?;
125 let valid = bytes > 0
126 && stats.failed_transfers == 0
127 && stats.failed_packets == 0
128 && stats.missing_frames == 0
129 && stats.overrun_frames == 0
130 && stats.contention_frames == 0;
131 let metadata = serde_json::json!({"sample_rate":rate,"channels":2,"valid_bits":16,"subslot_bytes":2,"bytes":bytes,"capture_complete":valid,"stats":format!("{stats:?}"),"clock_alignment":"unmeasured","gain_calibration":"unmeasured"});
132 std::fs::write(
133 format!("{}.json", args[2]),
134 serde_json::to_vec_pretty(&metadata)?,
135 )?;
136 if !valid {
137 return Err(
138 "capture has missing/failed/backlogged frames; metrics cannot establish discontinuity"
139 .into(),
140 );
141 }
142 println!("CAPTURE_COMPLETE {} frames; annotate playback events against the capture clock before analysis", bytes / 4);
143 Ok(())
144}pub fn available_frames(&self) -> usize
Sourcepub fn stats(&self) -> CaptureStats
pub fn stats(&self) -> CaptureStats
Examples found in repository?
examples/loopback_capture.rs (line 97)
4fn main() -> Result<(), Box<dyn std::error::Error>> {
5 use std::{
6 fs::OpenOptions,
7 io::{Seek, SeekFrom, Write},
8 os::fd::AsRawFd,
9 time::{Duration, Instant},
10 };
11 use usbdac_core::{CaptureRequest, Dac, DacConfig, DeviceInfo};
12 let args: Vec<String> = std::env::args().collect();
13 if args.len() != 5 {
14 return Err(
15 "usage: loopback_capture /dev/bus/usb/BBB/DDD output.wav sample_rate seconds (1..120)"
16 .into(),
17 );
18 }
19 let rate: u32 = args[3].parse()?;
20 let seconds: u64 = args[4].parse()?;
21 if rate == 0 || !(1..=120).contains(&seconds) {
22 return Err("invalid capture duration/rate".into());
23 }
24 let file = OpenOptions::new().read(true).write(true).open(&args[1])?;
25 let fd = file.as_raw_fd();
26 // GET_DESCRIPTOR device: identity comes from the actual USB device.
27 #[repr(C)]
28 struct Control {
29 kind: u8,
30 request: u8,
31 value: u16,
32 index: u16,
33 length: u16,
34 timeout: u32,
35 data: *mut u8,
36 }
37 let mut descriptor = [0u8; 18];
38 let mut control = Control {
39 kind: 0x80,
40 request: 6,
41 value: 0x0100,
42 index: 0,
43 length: 18,
44 timeout: 1000,
45 data: descriptor.as_mut_ptr(),
46 };
47 if unsafe { libc::ioctl(fd, 0xc0185500u32 as _, &mut control) } != 18 {
48 return Err(std::io::Error::last_os_error().into());
49 }
50 let mut info = DeviceInfo::new(
51 u16::from_le_bytes([descriptor[8], descriptor[9]]),
52 u16::from_le_bytes([descriptor[10], descriptor[11]]),
53 "Independent loopback input",
54 )
55 .with_device_name(&args[1]);
56 let (configuration, control_interfaces, input_interfaces) = Dac::capture_preflight(fd, &info)?;
57 let mut claims = control_interfaces;
58 claims.extend(input_interfaces);
59 claims.sort_unstable();
60 claims.dedup();
61 for &interface in &claims {
62 let interface = u32::from(interface);
63 if unsafe { libc::ioctl(fd, 0x8004550fu32 as _, &interface) } != 0 {
64 return Err(std::io::Error::last_os_error().into());
65 }
66 }
67 info.configuration_id = Some(configuration);
68 info.claimed_interfaces = claims.clone();
69 let dac = Dac::open_capture_device(fd, info, DacConfig::default())?;
70 let capture = dac.open_capture(
71 &CaptureRequest {
72 sample_rate: rate,
73 channels: 2,
74 valid_bits: 16,
75 channel_map: None,
76 },
77 rate as usize,
78 )?;
79 if capture.format().subslot_bytes() != 2 {
80 return Err("probe requires packed 16-bit stereo input for WAV analysis".into());
81 }
82 let mut output = OpenOptions::new()
83 .create_new(true)
84 .write(true)
85 .open(&args[2])?;
86 output.write_all(&[0u8; 44])?;
87 let mut buffer = [0u8; 8192];
88 let mut bytes = 0u32;
89 let started = Instant::now();
90 while started.elapsed() < Duration::from_secs(seconds) {
91 let frames = capture.read(&mut buffer)?;
92 let count = frames * capture.format().bytes_per_frame();
93 output.write_all(&buffer[..count])?;
94 bytes = bytes.checked_add(count as u32).ok_or("WAV too large")?;
95 std::thread::sleep(Duration::from_millis(2));
96 }
97 let stats = capture.stats();
98 capture.close()?;
99 dac.close()?;
100 if !Dac::await_usb_retirement(Duration::from_secs(3)) {
101 return Err("capture did not retire; retain host claims".into());
102 }
103 for &interface in claims.iter().rev() {
104 let interface = u32::from(interface);
105 if unsafe { libc::ioctl(fd, 0x80045510u32 as _, &interface) } != 0 {
106 return Err(std::io::Error::last_os_error().into());
107 }
108 }
109 let mut header = Vec::with_capacity(44);
110 header.extend_from_slice(b"RIFF");
111 header.extend_from_slice(&(36 + bytes).to_le_bytes());
112 header.extend_from_slice(b"WAVEfmt ");
113 header.extend_from_slice(&16u32.to_le_bytes());
114 header.extend_from_slice(&1u16.to_le_bytes());
115 header.extend_from_slice(&2u16.to_le_bytes());
116 header.extend_from_slice(&rate.to_le_bytes());
117 header.extend_from_slice(&(rate * 4).to_le_bytes());
118 header.extend_from_slice(&4u16.to_le_bytes());
119 header.extend_from_slice(&16u16.to_le_bytes());
120 header.extend_from_slice(b"data");
121 header.extend_from_slice(&bytes.to_le_bytes());
122 output.seek(SeekFrom::Start(0))?;
123 output.write_all(&header)?;
124 output.flush()?;
125 let valid = bytes > 0
126 && stats.failed_transfers == 0
127 && stats.failed_packets == 0
128 && stats.missing_frames == 0
129 && stats.overrun_frames == 0
130 && stats.contention_frames == 0;
131 let metadata = serde_json::json!({"sample_rate":rate,"channels":2,"valid_bits":16,"subslot_bytes":2,"bytes":bytes,"capture_complete":valid,"stats":format!("{stats:?}"),"clock_alignment":"unmeasured","gain_calibration":"unmeasured"});
132 std::fs::write(
133 format!("{}.json", args[2]),
134 serde_json::to_vec_pretty(&metadata)?,
135 )?;
136 if !valid {
137 return Err(
138 "capture has missing/failed/backlogged frames; metrics cannot establish discontinuity"
139 .into(),
140 );
141 }
142 println!("CAPTURE_COMPLETE {} frames; annotate playback events against the capture clock before analysis", bytes / 4);
143 Ok(())
144}pub fn state(&self) -> CaptureState
pub fn last_error(&self) -> Option<Error>
Sourcepub fn close(&self) -> Result<()>
pub fn close(&self) -> Result<()>
Stop and retire IN transfers before handing the interface back. A
timeout retains USB ownership in the worker; keep host claims/FD until
Dac::await_usb_retirement confirms retirement after closing the DAC.
Examples found in repository?
examples/loopback_capture.rs (line 98)
4fn main() -> Result<(), Box<dyn std::error::Error>> {
5 use std::{
6 fs::OpenOptions,
7 io::{Seek, SeekFrom, Write},
8 os::fd::AsRawFd,
9 time::{Duration, Instant},
10 };
11 use usbdac_core::{CaptureRequest, Dac, DacConfig, DeviceInfo};
12 let args: Vec<String> = std::env::args().collect();
13 if args.len() != 5 {
14 return Err(
15 "usage: loopback_capture /dev/bus/usb/BBB/DDD output.wav sample_rate seconds (1..120)"
16 .into(),
17 );
18 }
19 let rate: u32 = args[3].parse()?;
20 let seconds: u64 = args[4].parse()?;
21 if rate == 0 || !(1..=120).contains(&seconds) {
22 return Err("invalid capture duration/rate".into());
23 }
24 let file = OpenOptions::new().read(true).write(true).open(&args[1])?;
25 let fd = file.as_raw_fd();
26 // GET_DESCRIPTOR device: identity comes from the actual USB device.
27 #[repr(C)]
28 struct Control {
29 kind: u8,
30 request: u8,
31 value: u16,
32 index: u16,
33 length: u16,
34 timeout: u32,
35 data: *mut u8,
36 }
37 let mut descriptor = [0u8; 18];
38 let mut control = Control {
39 kind: 0x80,
40 request: 6,
41 value: 0x0100,
42 index: 0,
43 length: 18,
44 timeout: 1000,
45 data: descriptor.as_mut_ptr(),
46 };
47 if unsafe { libc::ioctl(fd, 0xc0185500u32 as _, &mut control) } != 18 {
48 return Err(std::io::Error::last_os_error().into());
49 }
50 let mut info = DeviceInfo::new(
51 u16::from_le_bytes([descriptor[8], descriptor[9]]),
52 u16::from_le_bytes([descriptor[10], descriptor[11]]),
53 "Independent loopback input",
54 )
55 .with_device_name(&args[1]);
56 let (configuration, control_interfaces, input_interfaces) = Dac::capture_preflight(fd, &info)?;
57 let mut claims = control_interfaces;
58 claims.extend(input_interfaces);
59 claims.sort_unstable();
60 claims.dedup();
61 for &interface in &claims {
62 let interface = u32::from(interface);
63 if unsafe { libc::ioctl(fd, 0x8004550fu32 as _, &interface) } != 0 {
64 return Err(std::io::Error::last_os_error().into());
65 }
66 }
67 info.configuration_id = Some(configuration);
68 info.claimed_interfaces = claims.clone();
69 let dac = Dac::open_capture_device(fd, info, DacConfig::default())?;
70 let capture = dac.open_capture(
71 &CaptureRequest {
72 sample_rate: rate,
73 channels: 2,
74 valid_bits: 16,
75 channel_map: None,
76 },
77 rate as usize,
78 )?;
79 if capture.format().subslot_bytes() != 2 {
80 return Err("probe requires packed 16-bit stereo input for WAV analysis".into());
81 }
82 let mut output = OpenOptions::new()
83 .create_new(true)
84 .write(true)
85 .open(&args[2])?;
86 output.write_all(&[0u8; 44])?;
87 let mut buffer = [0u8; 8192];
88 let mut bytes = 0u32;
89 let started = Instant::now();
90 while started.elapsed() < Duration::from_secs(seconds) {
91 let frames = capture.read(&mut buffer)?;
92 let count = frames * capture.format().bytes_per_frame();
93 output.write_all(&buffer[..count])?;
94 bytes = bytes.checked_add(count as u32).ok_or("WAV too large")?;
95 std::thread::sleep(Duration::from_millis(2));
96 }
97 let stats = capture.stats();
98 capture.close()?;
99 dac.close()?;
100 if !Dac::await_usb_retirement(Duration::from_secs(3)) {
101 return Err("capture did not retire; retain host claims".into());
102 }
103 for &interface in claims.iter().rev() {
104 let interface = u32::from(interface);
105 if unsafe { libc::ioctl(fd, 0x80045510u32 as _, &interface) } != 0 {
106 return Err(std::io::Error::last_os_error().into());
107 }
108 }
109 let mut header = Vec::with_capacity(44);
110 header.extend_from_slice(b"RIFF");
111 header.extend_from_slice(&(36 + bytes).to_le_bytes());
112 header.extend_from_slice(b"WAVEfmt ");
113 header.extend_from_slice(&16u32.to_le_bytes());
114 header.extend_from_slice(&1u16.to_le_bytes());
115 header.extend_from_slice(&2u16.to_le_bytes());
116 header.extend_from_slice(&rate.to_le_bytes());
117 header.extend_from_slice(&(rate * 4).to_le_bytes());
118 header.extend_from_slice(&4u16.to_le_bytes());
119 header.extend_from_slice(&16u16.to_le_bytes());
120 header.extend_from_slice(b"data");
121 header.extend_from_slice(&bytes.to_le_bytes());
122 output.seek(SeekFrom::Start(0))?;
123 output.write_all(&header)?;
124 output.flush()?;
125 let valid = bytes > 0
126 && stats.failed_transfers == 0
127 && stats.failed_packets == 0
128 && stats.missing_frames == 0
129 && stats.overrun_frames == 0
130 && stats.contention_frames == 0;
131 let metadata = serde_json::json!({"sample_rate":rate,"channels":2,"valid_bits":16,"subslot_bytes":2,"bytes":bytes,"capture_complete":valid,"stats":format!("{stats:?}"),"clock_alignment":"unmeasured","gain_calibration":"unmeasured"});
132 std::fs::write(
133 format!("{}.json", args[2]),
134 serde_json::to_vec_pretty(&metadata)?,
135 )?;
136 if !valid {
137 return Err(
138 "capture has missing/failed/backlogged frames; metrics cannot establish discontinuity"
139 .into(),
140 );
141 }
142 println!("CAPTURE_COMPLETE {} frames; annotate playback events against the capture clock before analysis", bytes / 4);
143 Ok(())
144}Auto Trait Implementations§
impl !Freeze for DacCaptureStream
impl !RefUnwindSafe for DacCaptureStream
impl !UnwindSafe for DacCaptureStream
impl Forget for DacCaptureStream
impl Move for DacCaptureStream
impl Send for DacCaptureStream
impl Sync for DacCaptureStream
impl Unpin for DacCaptureStream
impl UnsafeUnpin for DacCaptureStream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more