* Revert "fix linux ffmpeg link, still link ffmpeg in hwcodec (#8747)" This reverts commit 48464835f5e7cceca736fa1825aeb07a5883f972. * Revert "fix linux armv7 ffmpeg arch, linux x64 sciter add hwcodec feature (#8744)" This reverts commit b68d7a3054a45a608ddc188f455d0846452abc39. * Revert "arm linux remove cuda-llvm option (#8735)" This reverts commit bc672b336705290ac9dafd35b44fb6378acda63c. * Reapply "try fix arm64 linux ci and publish error log (#8730)" (#8732) This reverts commit e283d33f288742a2a4de119d3e7e322371ec90b7. * Revert "try fix arm64 linux ci and publish error log (#8730)" This reverts commit a4565bf0da99b21d8ba3e38cad5e75118b79921d. * Revert "F-Droid: enable hwcodec for future builds (#8726)" This reverts commit 188f85b042595d045043d9c17211cba2b5e2dc4d. * Revert "remove unused vcpkg ffmpeg code (#8725)" This reverts commit 72c96f22b626bbb06bf603068737c2f359d290b1. * Revert "install ffmpeg lib with vcpkg (#8724)" This reverts commit 0143eaf60176f420b7dbc376acda6ebebff940df. * update hwcodec to reverted Signed-off-by: 21pages <sunboeasy@gmail.com> --------- Signed-off-by: 21pages <sunboeasy@gmail.com>
Derived from https://github.com/quadrupleslap/scrap
scrap
Scrap records your screen! At least it does if you're on Windows, macOS, or Linux.
Usage
[dependencies]
scrap = "0.5"
Its API is as simple as it gets!
struct Display; /// A screen.
struct Frame; /// An array of the pixels that were on-screen.
struct Capturer; /// A recording instance.
impl Capturer {
/// Begin recording.
pub fn new(display: Display) -> io::Result<Capturer>;
/// Try to get a frame.
/// Returns WouldBlock if it's not ready yet.
pub fn frame<'a>(&'a mut self) -> io::Result<Frame<'a>>;
pub fn width(&self) -> usize;
pub fn height(&self) -> usize;
}
impl Display {
/// The primary screen.
pub fn primary() -> io::Result<Display>;
/// All the screens.
pub fn all() -> io::Result<Vec<Display>>;
pub fn width(&self) -> usize;
pub fn height(&self) -> usize;
}
impl<'a> ops::Deref for Frame<'a> {
/// A frame is just an array of bytes.
type Target = [u8];
}
The Frame Format
- The frame format is guaranteed to be packed BGRA.
- The width and height are guaranteed to remain constant.
- The stride might be greater than the width, and it may also vary between frames.
System Requirements
OS | Minimum Requirements |
---|---|
macOS | macOS 10.8 |
Linux | XCB + SHM + RandR |
Windows | DirectX 11.1 |