Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ waiver with respect to the entirety of your contributions.
## How do I make a contribution?

Never made an open source contribution before? Wondering how contributions work
in the in our project? Here's a quick rundown!
in our project? Here's a quick rundown!

1. Find an issue that you are interested in addressing or a feature that you
would like to add.
Expand Down Expand Up @@ -49,9 +49,17 @@ in the in our project? Here's a quick rundown!
13. Make changes to the pull request if the reviewing maintainer recommends them.
14. Celebrate your success after your pull request is merged!

## Where can I go for help?
## Can I contribute without coding?

If you need help, you can ask questions directly in our chat support channel available
on our website : <https://www.e-consystems.com>. You can also send in your queries via email to
<[email protected]>
Sure. You are welcome to use and test the provided applications and library on your
device. If you face any issues, you can report them in the [opencv_v4l2 issues page][1].
Make sure to provide as much information as possible. You can use [this link][2] to create
a bug report.

Or if you think this project can be improved upon by adding a new feature, you can create
a feature request in the issues page using [this link][3].


[1]:https://github.com/econsystems/opencv_v4l2/issues
[2]:https://github.com/econsystems/opencv_v4l2/issues/new?template=bug_report.md
[3]:https://github.com/econsystems/opencv_v4l2/issues/new?template=feature_request.md
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,8 @@ The above commands would generate multiple binaries with different characteristi
9. `opencv-buildinfo`: Sample application that prints the build information of the OpenCV library
being used. This application can be used to verify that the options selected during compilation were
really enabled.

#### Disclaimer
1. This project is provided for the ease of use for developers.
**Anyone who uses this code and has a github account is welcome to
contribute to it.** Please check the [CONTRIBUTING.md](CONTRIBUTING.md) file to know more.
14 changes: 14 additions & 0 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
cmake_minimum_required (VERSION 3.0)

set (V4L2_HELPER_LIB_VERSION_MAJOR 0)
set (V4L2_HELPER_LIB_VERSION_MINOR 1)
set (V4L2_HELPER_LIB_VERSION_PATCH 0)
Expand All @@ -22,3 +24,15 @@ set_target_properties (
)
install (TARGETS v4l2_helper LIBRARY DESTINATION ${V4L2_HELPER_LIB_INSTALL_PATH})
install (FILES ${V4L2_HELPER_LIB_INCLUDE_DIR}/v4l2_helper.h DESTINATION ${V4L2_HELPER_HEADER_INSTALL_PATH})

# uninstall target
# Ref: https://gitlab.kitware.com/cmake/community/wikis/FAQ#can-i-do-make-uninstall-with-cmake
if(NOT TARGET uninstall)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)

add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif()
39 changes: 39 additions & 0 deletions lib/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

[//]: #
[//]: # "v4l2_helper - README.md file for library"
[//]: #
[//]: # "Copyright (c) 2017-2018, e-con Systems India Pvt. Ltd. All rights reserved."
[//]: #

## V4L2 Helper

A light-weight V4L2 helper library which abstracts away the
process of fetching frames from a device that supports V4L2.
This library exposes some APIs which could be used to:

* initialise the V4L2 device
* read a frame from the V4L2 device
* de-initialise the V4L2 device

#### Building
To build and install the library separately

```
mkdir build && cd build
cmake ..
make
sudo make install
```

#### Disclaimer
1. This library is provided for the ease of use for developers.
Anyone with a github account is welcome to contribute to it.
Please check the [CONTRIBUTING.md](../CONTRIBUTING.md) file to know more.

2. This is not a replacement to lib-v4l

#### TODO

1. The library maintains some global state across different
functions. So, it is not suitable for accessing multiple
cameras simultaneously.
22 changes: 22 additions & 0 deletions lib/cmake_uninstall.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
endif(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")

file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
exec_program(
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
)
if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
endif(NOT "${rm_retval}" STREQUAL 0)
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
endforeach(file)