Giter Site home page Giter Site logo

Comments (7)

sappho192 avatar sappho192 commented on May 23, 2024 1

I have looked at the source of FlashCap, but that doesn't bring me closer to understand what the error code 22 is about.

I think the error code 22 is came from Linux native error code. Link

Maybe I/O argument for /dev/video has been changed since Raspbian 11...?

from flashcap.

dkjonas avatar dkjonas commented on May 23, 2024 1

Following up on this, just in case others experience the same issue.

The problem is that the kernel on Raspberry Pi4 may be 64 bit, even if user space is 32 bit (see raspberrypi/firmware#1795). Because of this uname will return aarch64 and the 64 bit Interop is used. This makes the mmap call fail.

To get it running on my system, I changed the code in NativeMethods_V4L2.cs to use armv7l Interop for the aarch64 case.

This of course not a general solution, but I have no idea of how to create a better architecture selection.

from flashcap.

kekyo avatar kekyo commented on May 23, 2024

I can't look it up on RPi right now, but what about sappho's point that /dev/video may not exist?

from flashcap.

sappho192 avatar sappho192 commented on May 23, 2024

I've searched some [similar] [issues], maybe V4L2 related code needs to be updated.
But it's odd because Raspbian 11 was released two years ago, and FlashCap was released last year.

Source of simple problem that throws the above exception:

I suggest getting a stack trace (toward Linux system calls) with this code may help discover the problem.

from flashcap.

dkjonas avatar dkjonas commented on May 23, 2024

but what about sappho's point that /dev/video may not exist?

Device exits and I can open it with a native linux program (guvcview).
Also, if FlashCap couldn't open the device, then I think it would fail earlier. It does some ioctl on the fd, before the failing mmap.

I suggest getting a stack trace (toward Linux system calls) with this code may help discover the problem.

I'm not sure how to do this.

from flashcap.

kekyo avatar kekyo commented on May 23, 2024

Oh, understood... This difference could also be in Win32 WoW. (Fortunately in Win32 we didn't have to interact directly with the native interface, so the problem didn't occur.)

It might be a good idea to additionally check IntPtr.Size to choose between using aarch64 or armv7l (maybe we should do the same for x86_64).

from flashcap.

kekyo avatar kekyo commented on May 23, 2024

Fixed and will release on next version.

from flashcap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.