Giter Site home page Giter Site logo

video4linux.jl's People

Contributors

affie avatar dehann avatar github-actions[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

video4linux.jl's Issues

`init_device(fid)` not working with webcam on `/dev/video0`

Hi,

Just thought I'd list an issue that I am seeing, although I don't have an answer to help fix it just yet. From the README example, I'm trying to read an image from the laptop webcam. The webcam does exist at /dev/video0 and can be read via VLC Capture Device mode just fine. It fails pretty hard though, dropped out of Julia. Using Ubuntu 16.04.

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.6.0 (2017-06-19 13:05 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-pc-linux-gnu

julia> using Video4Linux
depfile = joinpath(dirname(@__FILE__()), "../deps/loadpath.jl") = "/home/dehann/.julia/v0.6/Video4Linux/src/../deps/loadpath.jl"

julia> using ImageView

julia> using Colors, ColorTypes

julia> # Warning! no memory and device protection is implemented yet, therefore doing things out of order will cause julia to crash!
       ## set io method to read()
       set_io_method(Int64(0))

julia> ## open device
       fid = open_device("/dev/video0")
17

julia> ## init_device(fd, force_format);

julia> init_device(fid)
Device does not support read i/o
dehann@mrg-galago-01:~$ 

Object files should be compiled localy not kept in repo

Not sure if this was intentional, but compiled object files should probably not be in the repo. The C we can look at compiling the C file with Pkg.build() during the package installation process:

From https://github.com/Affie/Video4Linux.jl
   5273095..e5ee4d7  master     -> origin/master
 * [new branch]      test/expand -> origin/test/expand
Updating 5273095..e5ee4d7
Fast-forward
...
 deps/v4lcapture/src/v4lcapture.o | Bin 15632 -> 0 bytes
...

That said, I'm not seeing that file on my local repo on master (so likely in the git history somewhere). Doesn't really matter if the object file has already been removed.

Memory and device protection measures

There is currently only basic checks to protect/inform julia from/of memory and device errors. To do:

  • Basic protection and checks implemented with return value
  • Device opening closing errors
  • Access wrong memory
  • Out of order such as read before initialize

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.