-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use libcamera instead of OpenMAX IL and MMAL
- Loading branch information
Showing
76 changed files
with
8,624 additions
and
7,028 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
*.out | ||
*.app | ||
picam | ||
build/ | ||
|
||
*~ | ||
*.sw[po] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
cmake_minimum_required(VERSION 3.6) | ||
|
||
# set the project name | ||
project(picam) | ||
|
||
if (NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt) | ||
if (NOT CMAKE_BUILD_TYPE) | ||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE) | ||
message(STATUS "No previous build - default to Release build") | ||
endif() | ||
endif() | ||
|
||
set(CMAKE_CXX_FLAGS_DEBUG "-g") | ||
set(CMAKE_CXX_FLAGS_RELEASE "-O3") | ||
|
||
set (CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
set (CMAKE_CXX_STANDARD 17) | ||
#add_compile_options(-Wall -Wextra -pedantic -Wno-unused-parameter -faligned-new -Werror -Wfatal-errors) | ||
add_compile_options(-Wall -Wextra -pedantic -Wno-unused-parameter -Werror -Wfatal-errors) | ||
add_definitions(-D_FILE_OFFSET_BITS=64) | ||
|
||
if (CMAKE_COMPILER_IS_GNUCXX) | ||
add_compile_options(-Wno-psabi) | ||
endif() | ||
|
||
option(BUILD_SHARED_LIBS "Build using shared libraries" ON) | ||
|
||
IF (NOT ENABLE_COMPILE_FLAGS_FOR_TARGET) | ||
# On a Pi this will give us armhf or arm64. | ||
execute_process(COMMAND dpkg-architecture -qDEB_HOST_ARCH | ||
OUTPUT_VARIABLE ENABLE_COMPILE_FLAGS_FOR_TARGET OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
endif() | ||
message(STATUS "Platform: ${ENABLE_COMPILE_FLAGS_FOR_TARGET}") | ||
if ("${ENABLE_COMPILE_FLAGS_FOR_TARGET}" STREQUAL "arm64") | ||
# 64-bit binaries can be fully optimised. | ||
add_definitions(-ftree-vectorize) | ||
elseif ("${ENABLE_COMPILE_FLAGS_FOR_TARGET}" STREQUAL "armv8-neon") | ||
# Only build with 32-bit Pi 3/4 specific optimisations if requested on the command line. | ||
add_definitions(-mfpu=neon-fp-armv8 -ftree-vectorize) | ||
endif() | ||
|
||
# Source package generation setup. | ||
set(CPACK_GENERATOR "TXZ") | ||
set(CPACK_PACKAGE_FILE_NAME "libcamera-apps-build") | ||
set(CPACK_SOURCE_GENERATOR "TXZ") | ||
set(CPACK_INSTALL_SCRIPTS ${CMAKE_SOURCE_DIR}/package.cmake) | ||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "libcamera-apps-src") | ||
set(CPACK_SOURCE_IGNORE_FILES "/\.git*;/build;") | ||
include(CPack) | ||
|
||
find_package(PkgConfig REQUIRED) | ||
|
||
pkg_check_modules(LIBCAMERA REQUIRED libcamera) | ||
message(STATUS "libcamera library found:") | ||
message(STATUS " version: ${LIBCAMERA_VERSION}") | ||
message(STATUS " libraries: ${LIBCAMERA_LINK_LIBRARIES}") | ||
message(STATUS " include path: ${LIBCAMERA_INCLUDE_DIRS}") | ||
include_directories(${CMAKE_SOURCE_DIR} ${LIBCAMERA_INCLUDE_DIRS} /usr/include/freetype2 /usr/include/harfbuzz /usr/include/fontconfig) | ||
|
||
#add_subdirectory(core) | ||
add_subdirectory(video_encoder) | ||
add_subdirectory(preview) | ||
add_subdirectory(text) | ||
add_subdirectory(subtitle) | ||
add_subdirectory(timestamp) | ||
add_subdirectory(log) | ||
add_subdirectory(httplivestreaming) | ||
add_subdirectory(mpegts) | ||
add_subdirectory(audio) | ||
add_subdirectory(muxer) | ||
add_subdirectory(libstate) | ||
add_subdirectory(libhook) | ||
add_subdirectory(picam_option) | ||
add_subdirectory(libpicam) | ||
#add_subdirectory(dispmanx) | ||
add_subdirectory(rtsp) |
Oops, something went wrong.