This commit is contained in:
Brandon Thomas committed 2021-03-18 05:44:28 -04:00
1 parent 36a86e0977
commit bcc81d6b08
2 files changed
+6 -15

No files matched your search

+5 -14
View File
@@ -17,28 +17,19 @@ impl CaptureBuffer {
}
}
pub fn set_captures(&self) -> AnyhowResult<()> {
/*if captures.len() != self.num_devices {
pub fn set_captures(&self, captures: Vec<Capture>) -> AnyhowResult<()> {
if captures.len() != self.num_devices {
return Err(anyhow!("Number of captures ({}) != number of devices ({})",
captures.len(), self.num_devices));
}*/
}
/*match self.captures.write() {
match self.captures.lock() {
Err(err) => {
return Err(anyhow!("Lock error: {:?}", err))
},
Ok(mut caps) => {
caps.clear();
caps.extend(captures);
},
}*/
match self.captures.lock() {
Ok(mut lock) => {
//*lock = captures;
lock.clear();
*lock = captures;
},
Err(_) => {},
}
Ok(())
+1 -1
View File
@@ -27,7 +27,7 @@ impl MultiDeviceCapturer {
loop {
match self.get_synchronized_captures() {
Ok(captures) => {
self.capture_buffer.set_captures();
self.capture_buffer.set_captures(captures);
},
Err(e) => {
println!("Error with captures: {:?}", e);