Comments (14)
from flashcap.
https://github.com/dotnet/runtime/tree/main/src/coreclr/pal/src/arch/loongarch64
from flashcap.
@kekyo 你好,我想尝试自己移植到loongarch64架构,但是没怎么看懂说明,请问需要手动编写实现NativeMethods_V4L2_Interop_loongarch64吗
from flashcap.
Very interesting ;)
I am interested in this architecture, but on the other hand, I live in an area where SBCs for this architecture are not available at all. If you have a porting environment and intend to do it, I can give you some tips on porting, but what do you think?
...
Wait, loongarch64 is outside Core CLR support, but did it work in the first place?
from flashcap.
Great, I hope the loongarch64 environment will be readily available.
from flashcap.
我记得没错的话 除了SkiaSharp 要使用龙芯自己编译的,其它和发布普通的Linux版本没有差异,不用做额外适配啊
就是发布的时候只能选择框架依赖发布
from flashcap.
It may be possible to just build it, but I can't confirm that it works on my end. if we want to support the Linux environment, we need to generate source code for the V4L2 bridge.
This may be possible by preparing an environment such as QEMU in the worst case. However, without an environment such as an SBC that works in reality, I cannot check if it works when connected to a camera.
from flashcap.
I have put together a simplified document for porting FlashCap to the new Linux platform V4L2: https://github.com/kekyo/FlashCap#porting-v4l2-to-unsupported-platforms
If you wish to make your own trial and error, please use this as a reference.
from flashcap.
No, NativeMethods_V4L2_Interop_*.cs
is semi-automatically generated using FlashCap.V4L2Generator
and the included script dumper.sh
.
I have written an overview in the document shown in the link. What is not clear?
The work is done in four major steps:
- Prepare the environment so that Clang etc. can run on the target.
- Build
FlashCap.V4L2Generator
to work on the target environment. - Modify
dumper.sh
to work on the target environment, and execute it. This will generateNativeMethods_V4L2_Interop_*.cs
file automatically. - Modify FlashCap to recognize the generated code in
NativeMethods_V4L2.cs
.
from flashcap.
好的,我运行dumper.sh时有报错:error: unknown argument: '-ast-dump=json‘,输出的'videodev2.h.ast.json内容是空的,我在网上没有找到解决方案,请问该如何解决这个问题呢
from flashcap.
这是自动生成的代码文件的内容:
// This is auto generated code by FlashCap.V4L2Generator [1.8.0]. Do not edit.
// Linux version 4.19.0-19-loongson-3 ([email protected]) (gcc version 8.3.0 (Loongnix 8.3.0-6.lnd.vec.36)) #1 SMP 4.19.190.8.14 Thu Aug 24 08:54:20 UTC 2023
// Wed, 13 Dec 2023 09:29:56 GMT
using System;
using System.Runtime.InteropServices;
namespace FlashCap.Internal.V4L2
{
internal sealed class NativeMethods_V4L2_Interop_loongarch64 : NativeMethods_V4L2_Interop
{
// Common
public override string Label => "Linux version 4.19.0-19-loongson-3 ([email protected]) (gcc version 8.3.0 (Loongnix 8.3.0-6.lnd.vec.36)) #1 SMP 4.19.190.8.14 Thu Aug 24 08:54:20 UTC 2023";
public override string Architecture => "loongarch64";
public override int sizeof_size_t => 8;
public override int sizeof_off_t => 8;
// Definitions
public override uint V4L2_CAP_VIDEO_CAPTURE => 1U;
public override uint V4L2_PIX_FMT_ABGR32 => 875713089U;
public override uint V4L2_PIX_FMT_ARGB32 => 875708738U;
public override uint V4L2_PIX_FMT_JPEG => 1195724874U;
public override uint V4L2_PIX_FMT_MJPEG => 1196444237U;
public override uint V4L2_PIX_FMT_RGB24 => 859981650U;
public override uint V4L2_PIX_FMT_RGB332 => 826427218U;
public override uint V4L2_PIX_FMT_RGB565 => 1346520914U;
public override uint V4L2_PIX_FMT_RGB565X => 1380075346U;
public override uint V4L2_PIX_FMT_UYVY => 1498831189U;
public override uint V4L2_PIX_FMT_XRGB32 => 875714626U;
public override uint V4L2_PIX_FMT_YUYV => 1448695129U;
public override uint VIDIOC_DQBUF => 3227014673U;
public override uint VIDIOC_ENUM_FMT => 3225441794U;
public override uint VIDIOC_ENUM_FRAMEINTERVALS => 3224655435U;
public override uint VIDIOC_ENUM_FRAMESIZES => 3224131146U;
public override uint VIDIOC_QBUF => 3227014671U;
public override uint VIDIOC_QUERYBUF => 3227014665U;
public override uint VIDIOC_QUERYCAP => 2154321408U;
public override uint VIDIOC_REQBUFS => 3222558216U;
public override uint VIDIOC_S_FMT => 3234878981U;
public override uint VIDIOC_STREAMOFF => 1074026003U;
public override uint VIDIOC_STREAMON => 1074026002U;
// Structures
}
}
请问是否正常?
from flashcap.
It seems that Clang does not recognize the option to output ASTs. Perhaps your version of Clang is different than expected.
NOTE: https://stackoverflow.com/questions/59102944/how-to-represent-clang-ast-in-json-format
Some of other information I have seen says to specify -cc1
instead of -Xclang
.
from flashcap.
Wow! Congraturations!!
If you may need to merge this patch, please make topic branch on develop
branch and send PR. I will review and merge soon.
from flashcap.
Merged, thank you PR and will be released soon.
from flashcap.
Related Issues (20)
- run wpf sample app HOT 3
- Avalonia 11: MVVM Community Toolkit: ObservableCollection<CaptureDeviceDescriptor> is null HOT 2
- Added ShowPropertyPage method to DirectShowDevice class HOT 1
- Need support with Avalonia Sample HOT 9
- Is there any way to set camera parameters like white balance, exposure on linux? HOT 1
- Blue screen error without stopping HOT 1
- 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
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.