Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Initial merge to main #7

Merged
merged 59 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
911fe28
initial structure
Jan 2, 2024
5211516
macos capturablecontent impl and more abstraction surface
Feb 3, 2024
ba9cecb
macos impl and general stream interface
Feb 8, 2024
fe55646
initial macos implementation
Mar 1, 2024
862d8bb
basic windows implementation up until stream creation
Mar 1, 2024
4ba90bd
windows stream impl work
Mar 2, 2024
f021a05
windows implementation wip
Mar 7, 2024
d4727fb
further windows stream impl
Mar 14, 2024
afb40f9
windows capture working
Mar 14, 2024
c6f23ae
windows d3d feature
Mar 15, 2024
e4a0374
reorganize
Mar 15, 2024
d20bd21
hide non-public traits
Mar 15, 2024
3eafdd2
dxgi and dx11 features
Mar 15, 2024
78d0283
copy of current docs
Mar 15, 2024
dedbc49
fix mac compile
Mar 15, 2024
bfb583b
add copy of docs
Mar 15, 2024
1af1718
Merge branch 'liam/rust_crate' of https://github.com/AugmendTech/Crab…
Mar 15, 2024
c086087
fix typo
Mar 15, 2024
125a85f
add update_doc_copy.ps1
Mar 15, 2024
bf85692
Merge branch 'liam/rust_crate' of https://github.com/AugmendTech/Crab…
Mar 15, 2024
7ceee13
add update_doc_copy.ps1 and update docs copy
Mar 15, 2024
f2ec47b
impl frame types based on impl trait
Mar 15, 2024
a3c539b
update windows docs
Mar 15, 2024
1b12944
macos docs and feature fixup
Mar 15, 2024
ca24ba3
add comments to documentation
Mar 16, 2024
677dc20
update macos docs and generation script
Mar 16, 2024
258d84e
update macos docs and gen script
Mar 16, 2024
5f395cc
update windows docs
Mar 16, 2024
c9f2f7b
further docs and remove RunLoop
Mar 16, 2024
b2118a4
update windows docs
Mar 16, 2024
36688a6
fix macos compile and update docs
Mar 16, 2024
db474e3
omit dxgi,dx11 from mac doc compile
Mar 16, 2024
2fcff05
iosurface, metal features
Mar 18, 2024
3f92d4f
bitmap feature
Mar 19, 2024
bbf0273
macos doc update
Mar 19, 2024
d048295
macos doc update
Mar 19, 2024
cdbd144
make bitmap structs public
Mar 19, 2024
098ef2a
update macos docs
Mar 19, 2024
63bc7a5
windows bitmap impl
Mar 19, 2024
7a9b08e
update windows docs
Mar 19, 2024
ab2a39f
feature bitmap impl windows
Mar 22, 2024
5407921
metal extension
Mar 23, 2024
2a13eb3
update mac docs, create wgpu feature
Mar 23, 2024
f004b0a
update windows docs
Mar 23, 2024
7848251
macos window capture working
Mar 25, 2024
f29b365
Merge branch 'liam/rust_crate' of https://github.com/AugmendTech/Crab…
Mar 25, 2024
c97eb26
macos feature_bitmap
Mar 25, 2024
5308cb2
rework video frame API for dpi and size
Mar 27, 2024
147ffee
dpi impl windows
Mar 28, 2024
2a22a99
windows dpi and begin audio capture
Mar 29, 2024
a9d722f
WindowsAudioCaptureStream
Mar 29, 2024
660ea2a
windows audio stream
Mar 29, 2024
7104cc3
macos audio frame fixes and more docs
Apr 1, 2024
a185af7
crate example
Apr 2, 2024
654cabe
update macos docs
Apr 2, 2024
61b951a
github pages docs update
Apr 2, 2024
f784314
remove windows_docs folder
Apr 2, 2024
ba58301
update macos docs
Apr 2, 2024
6ecbc21
update windows docs
Apr 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"rust-analyzer.check.features": ["dxgi", "dx11", "bitmap", "metal","iosurface"],
"rust-analyzer.cargo.features": ["dxgi", "dx11", "bitmap", "metal","iosurface"],
}
68 changes: 68 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[package]
name = "crabgrab"
version = "0.1.0"
edition = "2021"

[features]
iosurface = []
metal = ["dep:metal"]
dxgi = []
dx11 = ["dxgi"]
bitmap = ["dep:bytemuck", "dep:half"]
wgpu = []

[target.'cfg(target_os = "windows")'.features]
bitmap = ["dx11"]

[dependencies]
futures = "0.3"
parking_lot = "0.12"
half = { version = "2.4", optional = true }
bytemuck = { version = "1.15", optional = true }

[target.'cfg(target_os = "macos")'.dependencies]
cocoa-foundation = "0.1.0"
block = "0.1.6"
objc = "0.2.7"
cocoa = "0.24"
libc = "~0.2.33"
objc2 = "0.3.0-beta.5"
metal = { version = "0.27", optional = true }
lazy_static = "1.4"
core-graphics-types = "*"
mach2 = "*"

[target.'cfg(target_os = "windows")'.dependencies]
windows = { version = "0.52", features = [
"Win32_Foundation",
"Win32_System_Threading",
"Win32_UI_WindowsAndMessaging",
"Win32_Graphics_Gdi",
"Graphics_Capture",
"Graphics_DirectX_Direct3D11",
"Win32_Graphics",
"Win32_Graphics_Direct3D_Fxc",
"Win32_Graphics_Direct3D",
"Win32_Graphics_Direct3D10",
"Win32_Graphics_Direct3D11",
"Win32_Graphics_Dwm",
"Win32_Graphics_Dxgi_Common",
"Win32_Graphics_Dxgi",
"Win32_Graphics_Gdi",
"Win32_UI_HiDpi",
"Win32_Graphics_Hlsl",
"Win32_Media_Audio",
"Win32_System_ProcessStatus",
"Win32_System_WinRT_Direct3D11",
"Win32_System_WinRT_Graphics_Capture",
"Win32_System_WinRT",
"Win32_System_Com",
"Win32_System_Com_StructuredStorage",
"Win32_System_Variant",
"Foundation",
"Security_Authorization_AppCapabilityAccess"
] }

[dev-dependencies]
tokio = { version = "*", features = ["rt", "macros", "rt-multi-thread"] }
winit = "*"
12 changes: 12 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>CrabGrab documentation</title>
</head>
<body>
<a href="macos_docs/crabgrab/index.html">MacOS Documentation</a>
<br/>
<br/>
<a href="windows_docs/crabgrab/index.html">Windows Documentation</a>
</body>
</html>
1 change: 1 addition & 0 deletions docs/macos_docs/crabgrab/all.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of all items in this crate"><title>List of all items in this crate</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-9ee3a5e31a2afa3e.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="crabgrab" data-themes="" data-resource-suffix="" data-rustdoc-version="1.75.0 (82e1608df 2023-12-21)" data-channel="1.75.0" data-search-js="search-8fbf244ebcf71464.js" data-settings-js="settings-74424d7eec62a23e.js" ><script src="../static.files/storage-fec3eaa3851e447d.js"></script><script defer src="../static.files/main-9dd44ab47b99a0fb.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-5d8b3c7633ad77ba.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../crabgrab/index.html">crabgrab</a><span class="version">0.1.0</span></h2></div><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><h1>List of all items</h1><h3 id="structs">Structs</h3><ul class="all-items"><li><a href="capturable_content/struct.CapturableApplication.html">capturable_content::CapturableApplication</a></li><li><a href="capturable_content/struct.CapturableContent.html">capturable_content::CapturableContent</a></li><li><a href="capturable_content/struct.CapturableContentFilter.html">capturable_content::CapturableContentFilter</a></li><li><a href="capturable_content/struct.CapturableDisplay.html">capturable_content::CapturableDisplay</a></li><li><a href="capturable_content/struct.CapturableDisplayIterator.html">capturable_content::CapturableDisplayIterator</a></li><li><a href="capturable_content/struct.CapturableWindow.html">capturable_content::CapturableWindow</a></li><li><a href="capturable_content/struct.CapturableWindowFilter.html">capturable_content::CapturableWindowFilter</a></li><li><a href="capturable_content/struct.CapturableWindowIterator.html">capturable_content::CapturableWindowIterator</a></li><li><a href="capture_stream/struct.AudioCaptureConfig.html">capture_stream::AudioCaptureConfig</a></li><li><a href="capture_stream/struct.CaptureConfig.html">capture_stream::CaptureConfig</a></li><li><a href="capture_stream/struct.CaptureStream.html">capture_stream::CaptureStream</a></li><li><a href="feature/bitmap/struct.FrameBitmapBgraUnorm8x4.html">feature::bitmap::FrameBitmapBgraUnorm8x4</a></li><li><a href="feature/bitmap/struct.FrameBitmapRgbaF16x4.html">feature::bitmap::FrameBitmapRgbaF16x4</a></li><li><a href="feature/bitmap/struct.FrameBitmapRgbaUnormPacked1010102.html">feature::bitmap::FrameBitmapRgbaUnormPacked1010102</a></li><li><a href="feature/bitmap/struct.FrameBitmapYCbCr.html">feature::bitmap::FrameBitmapYCbCr</a></li><li><a href="feature/iosurface/struct.IoSurface.html">feature::iosurface::IoSurface</a></li><li><a href="frame/struct.AudioChannelDataSamples.html">frame::AudioChannelDataSamples</a></li><li><a href="frame/struct.AudioFrame.html">frame::AudioFrame</a></li><li><a href="frame/struct.VideoFrame.html">frame::VideoFrame</a></li><li><a href="util/struct.Point.html">util::Point</a></li><li><a href="util/struct.Rect.html">util::Rect</a></li><li><a href="util/struct.Size.html">util::Size</a></li></ul><h3 id="enums">Enums</h3><ul class="all-items"><li><a href="capturable_content/enum.CapturableContentError.html">capturable_content::CapturableContentError</a></li><li><a href="capture_stream/enum.CaptureConfigError.html">capture_stream::CaptureConfigError</a></li><li><a href="capture_stream/enum.CapturePixelFormat.html">capture_stream::CapturePixelFormat</a></li><li><a href="capture_stream/enum.StreamCreateError.html">capture_stream::StreamCreateError</a></li><li><a href="capture_stream/enum.StreamError.html">capture_stream::StreamError</a></li><li><a href="capture_stream/enum.StreamEvent.html">capture_stream::StreamEvent</a></li><li><a href="capture_stream/enum.StreamStopError.html">capture_stream::StreamStopError</a></li><li><a href="feature/bitmap/enum.FrameBitmap.html">feature::bitmap::FrameBitmap</a></li><li><a href="feature/bitmap/enum.VideoFrameBitmapError.html">feature::bitmap::VideoFrameBitmapError</a></li><li><a href="feature/bitmap/enum.VideoRange.html">feature::bitmap::VideoRange</a></li><li><a href="feature/iosurface/enum.GetIoSurfaceError.html">feature::iosurface::GetIoSurfaceError</a></li><li><a href="feature/metal/enum.MacosVideoFrameError.html">feature::metal::MacosVideoFrameError</a></li><li><a href="feature/metal/enum.MetalVideoFramePlaneTexture.html">feature::metal::MetalVideoFramePlaneTexture</a></li><li><a href="frame/enum.AudioBufferError.html">frame::AudioBufferError</a></li><li><a href="frame/enum.AudioChannelCount.html">frame::AudioChannelCount</a></li><li><a href="frame/enum.AudioChannelData.html">frame::AudioChannelData</a></li><li><a href="frame/enum.AudioSampleRate.html">frame::AudioSampleRate</a></li></ul><h3 id="traits">Traits</h3><ul class="all-items"><li><a href="feature/bitmap/trait.VideoFrameBitmap.html">feature::bitmap::VideoFrameBitmap</a></li><li><a href="feature/iosurface/trait.MacosIoSurfaceVideoFrame.html">feature::iosurface::MacosIoSurfaceVideoFrame</a></li><li><a href="feature/metal/trait.MetalCaptureStream.html">feature::metal::MetalCaptureStream</a></li><li><a href="feature/metal/trait.MetalVideoFrame.html">feature::metal::MetalVideoFrame</a></li><li><a href="platform/macos/trait.MacosAudioCaptureConfigExt.html">platform::macos::MacosAudioCaptureConfigExt</a></li><li><a href="platform/macos/trait.MacosCaptureConfigExt.html">platform::macos::MacosCaptureConfigExt</a></li></ul></section></div></main></body></html>

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/macos_docs/crabgrab/capturable_content/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `capturable_content` mod in crate `crabgrab`."><title>crabgrab::capturable_content - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-9ee3a5e31a2afa3e.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="crabgrab" data-themes="" data-resource-suffix="" data-rustdoc-version="1.75.0 (82e1608df 2023-12-21)" data-channel="1.75.0" data-search-js="search-8fbf244ebcf71464.js" data-settings-js="settings-74424d7eec62a23e.js" ><script src="../../static.files/storage-fec3eaa3851e447d.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-9dd44ab47b99a0fb.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-5d8b3c7633ad77ba.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../crabgrab/index.html">crabgrab</a><span class="version">0.1.0</span></h2></div><h2 class="location"><a href="#">Module capturable_content</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></section><h2><a href="../index.html">In crate crabgrab</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">crabgrab</a>::<wbr><a class="mod" href="#">capturable_content</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/crabgrab/capturable_content.rs.html#1-205">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.CapturableApplication.html" title="struct crabgrab::capturable_content::CapturableApplication">CapturableApplication</a></div></li><li><div class="item-name"><a class="struct" href="struct.CapturableContent.html" title="struct crabgrab::capturable_content::CapturableContent">CapturableContent</a></div></li><li><div class="item-name"><a class="struct" href="struct.CapturableContentFilter.html" title="struct crabgrab::capturable_content::CapturableContentFilter">CapturableContentFilter</a></div><div class="desc docblock-short">Selects the kind of capturable content to enumerate</div></li><li><div class="item-name"><a class="struct" href="struct.CapturableDisplay.html" title="struct crabgrab::capturable_content::CapturableDisplay">CapturableDisplay</a></div><div class="desc docblock-short">Represents a capturable display</div></li><li><div class="item-name"><a class="struct" href="struct.CapturableDisplayIterator.html" title="struct crabgrab::capturable_content::CapturableDisplayIterator">CapturableDisplayIterator</a></div><div class="desc docblock-short">An iterator over capturable displays</div></li><li><div class="item-name"><a class="struct" href="struct.CapturableWindow.html" title="struct crabgrab::capturable_content::CapturableWindow">CapturableWindow</a></div><div class="desc docblock-short">Represents a capturable application window</div></li><li><div class="item-name"><a class="struct" href="struct.CapturableWindowFilter.html" title="struct crabgrab::capturable_content::CapturableWindowFilter">CapturableWindowFilter</a></div><div class="desc docblock-short">Selects the kind of windows to enumerate for capture</div></li><li><div class="item-name"><a class="struct" href="struct.CapturableWindowIterator.html" title="struct crabgrab::capturable_content::CapturableWindowIterator">CapturableWindowIterator</a></div><div class="desc docblock-short">An iterator over capturable windows</div></li></ul><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2><ul class="item-table"><li><div class="item-name"><a class="enum" href="enum.CapturableContentError.html" title="enum crabgrab::capturable_content::CapturableContentError">CapturableContentError</a></div><div class="desc docblock-short">Represents an error that occured when enumerating capturable content</div></li></ul></section></div></main></body></html>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading