Comments (1)
I love the simplicity of this library and was surprised that it even supports Avalonia. It would be great to have 4k preview support in the future.
Thanks for using FlashCap!
Since the release of FlashCap, we have investigated some environments where FlashCap does not yet work, specifically the Android camera system. So we have found a few issues that FlashCap may need to address in the future:
Preview surface support
Many media capture APIs support preview surfaces. This is a feature that allows for extremely fast previews by transferring data directly from the capture device to the GPU, "independent" of the bitmap from the media.
When I first implemented FlashCap, we had a bit of trouble deciding whether to support it or not, but since our first and most important goal was to get bitmap data, we decided not to support it. (FlashCap was largely born out of the necessity of my work.)
I have actually tested FlashCap at about 2K resolution and it captures fine in my environment. However, at resolutions as high as 4K, the frame rate drops drastically when previewing. In the near future (4K resolution is already becoming popular?), it is likely to be possible to use native preview functionality.
I think that there must be some way to support native preview functionality. The challenge is to find a way to handle previews in a unified, transparent, and easy-to-use API across multiple platforms.
Reactive interface
When I first looked into the Android NDK Camera API, I was surprised by its complexity. For good reason: the camera device itself and the attributes it supports (resolution, camera settings, etc.) need to be able to be changed by the user at any time in the Android configuration screen, and the application needs to be able to detect these changes.
For example, a user could open the Android configuration screen and suddenly disable the application's camera permissions or, in some cases, switch the camera to no longer needed. Or they could change the default focus setting of the camera. Thus, the camera API was almost entirely realized through callbacks, and this seemed to be one of the factors complicating things.
To return to our FlashCap, it is actually quite possible that such device changes can occur in Windows and Linux as well, if the camera's USB cable is unplugged or newly connected, etc. Windows and Linux are not as nervous as Android. However, if we want to support a system with a reactive low-level API like Android and possibly iOS in the future, the current FlashCap API may not be able to handle it. Perhaps we need to consider something like the FlashCap V2 API with a reactive interface.
Needs to be...
These are pretty heavy issues, especially since the V2 API is likely to be incompatible with the current API, so I feel this needs to be implemented in a meaningful way.
(This does not mean that they are unwilling to do so. :)
from flashcap.
Related Issues (20)
- Capture Error event handler HOT 1
- SET the power line frequency property HOT 1
- After running StartAsync() on linux, executing StopAsync() and then StartAsync(), pixelBufferArrived will not be executed again. HOT 4
- VideoCharacteristics not detected HOT 17
- Typo in Linux device enumeration HOT 3
- Reversed logic when enumerating Linux device capabilities HOT 3
- 执行OpenAsync时发生异常 HOT 1
- Elgato CamLink 4K DirectShow Pixel Format HOT 4
- Capture works first time on Linux, but not subsequent times HOT 4
- How to do shrink memory when capturing from WebCam to WPF HOT 2
- Avalonia aot 启动失败
- Is there a camera snapshot event handler? HOT 1
- AutoPixelBufferScope set PixelBuffer to null, cause allocate new PixelBuffer for every frame HOT 3
- Possible leaks in AsyncLock HOT 1
- Desktop Screen Capture Support HOT 1
- Support for camera module/ CSIconnector on Pi Zero 2W HOT 3
- OnPixelBufferArrived can not get new YUYV buffer in v1.10.0 (v1.9.0 is ok) HOT 5
- Support for AV to USB HOT 3
- 当同时连接多个摄像头(比如6个)的时候,数据返回会缺失 (When multiple cameras are connected simultaneously (such as 6), data return will be missing) HOT 2
- Verified Capture Cards HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flashcap.