Skip to content

Commit

Permalink
fix: Update frame stride calculation + camera bg overlay radius
Browse files Browse the repository at this point in the history
  • Loading branch information
richiemcilroy committed Mar 19, 2024
1 parent 36651d9 commit c91a3ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/desktop/src-tauri/src/media.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ impl MediaRecorder {
let frame_clone = frame.to_vec();
std::thread::spawn(move || {
let mut frame_data = Vec::with_capacity(capture_size);
let stride = frame_clone[..capture_size].len() / adjusted_height;
let stride = w_cloned * 4;
let rt = tokio::runtime::Runtime::new().unwrap();

for row in 0..h {
Expand Down Expand Up @@ -338,7 +338,7 @@ impl MediaRecorder {

match capturer.frame() {
Ok(frame) => {
let stride = frame[..capture_size].len() / adjusted_height;
let stride = w * 4;
for row in 0..adjusted_height {
let start = row * stride;
let end = start + stride;
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/components/windows/Camera.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const Camera = () => {
return (
<div
data-tauri-drag-region
className="group w-full h-full bg-gray-200 rounded-full m-0 p-0 relative overflow-hidden flex items-center justify-center border-none outline-none focus:outline-none"
className="group w-full h-full bg-gray-200 rounded-full m-0 p-0 relative overflow-hidden flex items-center justify-center border-none outline-none focus:outline-none rounded-full"
>
{isLoading && (
<div className="w-full h-full absolute top-0 left-0 bg-gray-200 z-10 flex items-center justify-center">
Expand Down

1 comment on commit c91a3ba

@vercel
Copy link

@vercel vercel bot commented on c91a3ba Mar 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.