Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update windows-capture and make it compile on windows #21

Merged
merged 2 commits into from Jan 20, 2024

Conversation

NiiightmareXD
Copy link

I think we need a better structure to make cross-platform development easier for example we need to implement traits for each os but for now I made it to compile on windows.

windows-capture updates:
Add Crop πŸŽ‰
Better Threading πŸ”₯
Bug Fix ⭐
Performance Boost πŸ”₯
Bug Fix πŸ›
Optimization πŸ”₯
Better Error Message 😊
Update Monitor Struct ⭐
Mutable Buffer πŸ”₯
Bug Fix πŸ›
Low Latency πŸ”₯
Optimization πŸ”₯
Update thiserror βœ…
Native Windows Encoder πŸ”₯

About FFmpeg: the latest version of the crate used for FFmpeg doesn't compile on windows I added a specific commit for windows that compiles but it shouldn't be a problem because I'm going to stabilize the native windows encoder and drop ffmpeg for windows completely its already used for save_as_image.

};
use core_video_sys::{CVPixelBufferRef, CVPixelBufferLockBaseAddress, CVPixelBufferGetWidth, CVPixelBufferGetHeight, CVPixelBufferGetBaseAddressOfPlane, CVPixelBufferGetBytesPerRowOfPlane, CVPixelBufferUnlockBaseAddress};

pub struct YUVFrame {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason for moving this from here to lib.rs ?

Copy link
Author

Choose a reason for hiding this comment

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

Yea frame.rs is filled with macos only code but this struct is used in other places.

@clearlysid
Copy link
Collaborator

Thanks for the PR! I'll flick through this tomorrow βœ…

@thisislvca
Copy link

Looking forward to it!

@thisislvca
Copy link

Btw this still doesn't work @NiiightmareXD:

error: failed to parse manifest at `C:\Users\lucam\Downloads\scap-main\Cargo.toml`

Caused by:
  Dependency 'ac-ffmpeg' has different source paths depending on the build target. Each dependency must have a single canonical source path irrespective of build target.

@clearlysid
Copy link
Collaborator

@thisislvca you need to provide it your own FFmpeg binaries. @ZohebMOPO can you document exact steps here to help?

@thisislvca
Copy link

thisislvca commented Jan 19, 2024

@clearlysid I did provide the binaries, the error is a standard Cargo.toml error when you have deps imported with different source paths. At least that's what I found online :)

@clearlysid
Copy link
Collaborator

Ah! to temporarily get around this for Windows, you can comment out the ac-ffmpeg import for mac (or change it to be the same as windows)

@clearlysid
Copy link
Collaborator

Merging this to main, but just a heads up to everyone: we will be deprecating the main and using v0.0.1/main as the primary one going forward. We did use a lot of @NiiightmareXD's code as reference to update stuff so this PR was very helpful!

@clearlysid clearlysid merged commit ff4ae05 into helmerapp:main Jan 20, 2024
@thisislvca
Copy link

Ok cool to know!

@NiiightmareXD
Copy link
Author

Btw this still doesn't work @NiiightmareXD:

error: failed to parse manifest at `C:\Users\lucam\Downloads\scap-main\Cargo.toml`

Caused by:
  Dependency 'ac-ffmpeg' has different source paths depending on the build target. Each dependency must have a single canonical source path irrespective of build target.

Comment out the version thats for macos I did this because I don't think its good idea to down grade the ffmpeg library for macos when the problem is with windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants