mirror of
https://github.com/storytold/cloudcam.git
synced 2026-11-21 17:30:44 +01:00
oh
This commit is contained in:
1 parent
36a86e0977
commit
bcc81d6b08
2 files changed
+6
-15
No files matched your search
@@ -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(())
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user