Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions apps/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use std::{

use cap_export::ExporterBase;
use cap_project::XY;
use cap_recording::feeds::CameraFeed;
use clap::{Args, Parser, Subcommand};
use record::RecordStart;
use serde_json::json;
Expand Down Expand Up @@ -111,7 +110,7 @@ window {}:
}
}
Some(RecordCommands::Cameras) => {
let cameras = CameraFeed::list_cameras();
let cameras = cap_camera::list_cameras().collect::<Vec<_>>();

let mut info = vec![];
for camera_info in cameras {
Expand Down
25 changes: 12 additions & 13 deletions apps/cli/src/record.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use cap_camera::ModelID;
use cap_recording::screen_capture::ScreenCaptureTarget;
use clap::Args;
use scap_targets::{DisplayId, WindowId};
use std::{env::current_dir, path::PathBuf, sync::Arc};
use tokio::{io::AsyncBufReadExt, sync::Mutex};
use std::{env::current_dir, path::PathBuf};
use tokio::io::AsyncBufReadExt;
use uuid::Uuid;

#[derive(Args)]
Expand Down Expand Up @@ -43,16 +42,16 @@ impl RecordStart {
_ => Err("No target specified".to_string()),
}?;

let camera = if let Some(model_id) = self.camera {
let _model_id: ModelID = model_id
.try_into()
.map_err(|_| "Invalid model ID".to_string())?;
// let camera = if let Some(model_id) = self.camera {
// let _model_id: ModelID = model_id
// .try_into()
// .map_err(|_| "Invalid model ID".to_string())?;

todo!()
// Some(CameraFeed::init(model_id).await.unwrap())
} else {
None
};
// todo!()
// // Some(CameraFeed::init(model_id).await.unwrap())
// } else {
// None
// };

let id = Uuid::new_v4().to_string();
let path = self
Expand All @@ -66,8 +65,8 @@ impl RecordStart {
capture_target: target_info,
capture_system_audio: self.system_audio,
mic_feed: None,
camera_feed: None, // camera.map(|c| Arc::new(Mutex::new(c))),
},
camera.map(|c| Arc::new(Mutex::new(c))),
false,
)
.await
Expand Down
Loading
Loading