From 38b95057e9dc013a63bcd48211a99215c1df34f5 Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Sun, 10 May 2020 12:12:06 -1000 Subject: [PATCH 01/15] find aasdk as a module --- CMakeLists.txt | 14 ++++------- cmake_modules/Findaasdk.cmake | 44 +++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 10 deletions(-) create mode 100644 cmake_modules/Findaasdk.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 03e73dd..01d3fdc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,7 @@ find_package(Qt5 COMPONENTS Multimedia MultimediaWidgets Bluetooth) find_package(Protobuf REQUIRED) find_package(OpenSSL REQUIRED) find_package(rtaudio REQUIRED) +find_package(aasdk REQUIRED) if(WIN32) set(WINSOCK2_LIBRARIES "ws2_32") @@ -56,8 +57,6 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${PROTOBUF_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR} ${RTAUDIO_INCLUDE_DIRS} - ${AASDK_PROTO_INCLUDE_DIRS} - ${AASDK_INCLUDE_DIRS} ${BCM_HOST_INCLUDE_DIRS} ${ILCLIENT_INCLUDE_DIRS} ${include_directory}) @@ -72,11 +71,7 @@ file(GLOB_RECURSE autoapp_source_files ${autoapp_sources_directory}/*.ui ${autoa add_executable(autoapp ${autoapp_source_files}) -file(GLOB_RECURSE autoapp_lib_source_files ${autoapp_sources_directory}/App.cpp ${autoapp_sources_directory}/Configuration/*.cpp ${autoapp_sources_directory}/Projection/*.cpp ${autoapp_sources_directory}/Service/*.cpp) -file(GLOB_RECURSE autoapp_lib_inlcude_files ${autoapp_include_directory}/App.hpp ${autoapp_include_directory}/Configuration/*.hpp ${autoapp_include_directory}/Projection/*.hpp ${autoapp_include_directory}/Service/*.hpp) -add_library(auto SHARED ${autoapp_lib_source_files} ${autoapp_lib_inlcude_files}) - -target_link_libraries(autoapp +target_link_libraries(autoapp aasdk ${Boost_LIBRARIES} ${Qt5Multimedia_LIBRARIES} ${Qt5MultimediaWidgets_LIBRARIES} @@ -87,8 +82,7 @@ target_link_libraries(autoapp ${ILCLIENT_LIBRARIES} ${WINSOCK2_LIBRARIES} ${RTAUDIO_LIBRARIES} - ${AASDK_PROTO_LIBRARIES} - ${AASDK_LIBRARIES}) + ) set(btservice_sources_directory ${sources_directory}/btservice) set(btservice_include_directory ${include_directory}/f1x/openauto/btservice) @@ -101,4 +95,4 @@ target_link_libraries(btservice ${Qt5Bluetooth_LIBRARIES} ${Qt5MultimediaWidgets_LIBRARIES} ${PROTOBUF_LIBRARIES} - ${AASDK_PROTO_LIBRARIES}) +) diff --git a/cmake_modules/Findaasdk.cmake b/cmake_modules/Findaasdk.cmake new file mode 100644 index 0000000..d1c7fec --- /dev/null +++ b/cmake_modules/Findaasdk.cmake @@ -0,0 +1,44 @@ +set (AASDK_DIR ~/aasdk) + +find_path(AASDK_INCLUDE_DIR + f1x/aasdk/Version.hpp + PATHS ${AASDK_DIR} + PATH_SUFFIXES include +) + +find_path(AASDK_PROTO_INCLUDE_DIR + aasdk_proto/AbsoluteInputEventData.pb.h + PATHS ${AASDK_DIR} +) + +find_path(AASDK_LIB_DIR + libaasdk.so + PATHS ${AASDK_DIR} + PATH_SUFFIXES lib +) + +if (AASDK_INCLUDE_DIR AND AASDK_PROTO_INCLUDE_DIR AND AASDK_LIB_DIR) + set(AASDK_FOUND TRUE) +endif() + +if (AASDK_FOUND) + if (NOT aasdk_FIND_QUIETLY) + message(STATUS "Found aasdk:") + message(STATUS " - Includes: ${AASDK_INCLUDE_DIR}") + message(STATUS " - Libraries: ${AASDK_LIBRARIES}") + endif() + add_library(aasdk INTERFACE) + target_include_directories(aasdk INTERFACE ${AASDK_INCLUDE_DIR} ${AASDK_PROTO_INCLUDE_DIR}) + target_link_libraries(aasdk INTERFACE ${AASDK_LIB_DIR}/libaasdk.so ${AASDK_LIB_DIR}/libaasdk_proto.so) +else() + if (aasdk_FIND_REQUIRED) + if(AASDK_INCLUDE_DIR AND NOT AASDK_PROTO_INCLUDE_DIR) + message(FATAL_ERROR "aasdk was found but not built. Perform an in-source build.") + else() + message(FATAL_ERROR "Could not find aasdk") + endif() + endif() +endif() + +mark_as_advanced(AASDK_INCLUDE_DIRS AASDK_LIBRARIES) + From fe4e5522ed0c9778fc413e7834b4c1837c768612 Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Sun, 10 May 2020 12:12:59 -1000 Subject: [PATCH 02/15] Add zlib requirement # Conflicts: # CMakeLists.txt --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 01d3fdc..75db540 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,7 @@ find_package(Protobuf REQUIRED) find_package(OpenSSL REQUIRED) find_package(rtaudio REQUIRED) find_package(aasdk REQUIRED) +find_package(ZLIB REQUIRED) if(WIN32) set(WINSOCK2_LIBRARIES "ws2_32") @@ -78,6 +79,7 @@ target_link_libraries(autoapp aasdk ${Qt5Bluetooth_LIBRARIES} ${LIBUSB_1_LIBRARIES} ${PROTOBUF_LIBRARIES} + ${ZLIB_LIBRARIES} ${BCM_HOST_LIBRARIES} ${ILCLIENT_LIBRARIES} ${WINSOCK2_LIBRARIES} From 1100f7155cadb62d243ebb946d91f6b2c05e56e5 Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Sun, 10 May 2020 07:41:30 -1000 Subject: [PATCH 03/15] Add ccache support --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 75db540..6101943 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,10 @@ cmake_minimum_required(VERSION 3.5.1) + +find_program(CCACHE_PROGRAM ccache) +if(CCACHE_PROGRAM) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") +endif() + project(openauto CXX) set(CMAKE_AUTOMOC ON) From e350341bfdf897e7896e304705b1785ad2a98e49 Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Sun, 10 May 2020 12:14:13 -1000 Subject: [PATCH 04/15] Fix system warnings about libusb zero-size arrays --- CMakeLists.txt | 4 +--- cmake_modules/Findlibusb-1.0.cmake | 7 +++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6101943..0daf7db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,7 +60,6 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5Bluetooth_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} - ${LIBUSB_1_INCLUDE_DIRS} ${PROTOBUF_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR} ${RTAUDIO_INCLUDE_DIRS} @@ -78,12 +77,11 @@ file(GLOB_RECURSE autoapp_source_files ${autoapp_sources_directory}/*.ui ${autoa add_executable(autoapp ${autoapp_source_files}) -target_link_libraries(autoapp aasdk +target_link_libraries(autoapp aasdk libusb ${Boost_LIBRARIES} ${Qt5Multimedia_LIBRARIES} ${Qt5MultimediaWidgets_LIBRARIES} ${Qt5Bluetooth_LIBRARIES} - ${LIBUSB_1_LIBRARIES} ${PROTOBUF_LIBRARIES} ${ZLIB_LIBRARIES} ${BCM_HOST_LIBRARIES} diff --git a/cmake_modules/Findlibusb-1.0.cmake b/cmake_modules/Findlibusb-1.0.cmake index ec40055..8c52b20 100644 --- a/cmake_modules/Findlibusb-1.0.cmake +++ b/cmake_modules/Findlibusb-1.0.cmake @@ -83,8 +83,11 @@ else (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS) if (LIBUSB_1_FOUND) if (NOT libusb_1_FIND_QUIETLY) message(STATUS "Found libusb-1.0:") - message(STATUS " - Includes: ${LIBUSB_1_INCLUDE_DIRS}") - message(STATUS " - Libraries: ${LIBUSB_1_LIBRARIES}") + message(STATUS " - Includes: ${LIBUSB_1_INCLUDE_DIRS}") + message(STATUS " - Libraries: ${LIBUSB_1_LIBRARIES}") + add_library(libusb INTERFACE) + target_include_directories(libusb SYSTEM INTERFACE ${LIBUSB_1_INCLUDE_DIR}) + target_link_libraries(libusb INTERFACE ${LIBUSB_1_LIBRARY}) endif (NOT libusb_1_FIND_QUIETLY) else (LIBUSB_1_FOUND) if (libusb_1_FIND_REQUIRED) From df632418274cb5aa86200c24851fab029875071b Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Sun, 10 May 2020 11:23:56 -1000 Subject: [PATCH 05/15] Mute const char* warnings related to ilclient This does not actually fix the problem. The right answer is for ilclient API to declare const char*, but they're system headers right now, so we work around. --- src/autoapp/Projection/OMXVideoOutput.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/autoapp/Projection/OMXVideoOutput.cpp b/src/autoapp/Projection/OMXVideoOutput.cpp index 4b4f75a..b74783c 100644 --- a/src/autoapp/Projection/OMXVideoOutput.cpp +++ b/src/autoapp/Projection/OMXVideoOutput.cpp @@ -262,19 +262,19 @@ void OMXVideoOutput::setOpacity(OMX_U32 alpha) bool OMXVideoOutput::createComponents() { - if(ilclient_create_component(client_, &components_[VideoComponent::DECODER], "video_decode", static_cast(ILCLIENT_DISABLE_ALL_PORTS | ILCLIENT_ENABLE_INPUT_BUFFERS)) != 0) + if(ilclient_create_component(client_, &components_[VideoComponent::DECODER], const_cast("video_decode"), static_cast(ILCLIENT_DISABLE_ALL_PORTS | ILCLIENT_ENABLE_INPUT_BUFFERS)) != 0) { OPENAUTO_LOG(error) << "[OMXVideoOutput] video decode component creation failed."; return false; } - if(ilclient_create_component(client_, &components_[VideoComponent::RENDERER], "video_render", ILCLIENT_DISABLE_ALL_PORTS) != 0) + if(ilclient_create_component(client_, &components_[VideoComponent::RENDERER], const_cast("video_render"), ILCLIENT_DISABLE_ALL_PORTS) != 0) { OPENAUTO_LOG(error) << "[OMXVideoOutput] video renderer component creation failed."; return false; } - if(ilclient_create_component(client_, &components_[VideoComponent::CLOCK], "clock", ILCLIENT_DISABLE_ALL_PORTS) != 0) + if(ilclient_create_component(client_, &components_[VideoComponent::CLOCK], const_cast("clock"), ILCLIENT_DISABLE_ALL_PORTS) != 0) { OPENAUTO_LOG(error) << "[OMXVideoOutput] clock component creation failed."; return false; @@ -286,7 +286,7 @@ bool OMXVideoOutput::createComponents() return false; } - if(ilclient_create_component(client_, &components_[VideoComponent::SCHEDULER], "video_scheduler", ILCLIENT_DISABLE_ALL_PORTS) != 0) + if(ilclient_create_component(client_, &components_[VideoComponent::SCHEDULER], const_cast("video_scheduler"), ILCLIENT_DISABLE_ALL_PORTS) != 0) { OPENAUTO_LOG(error) << "[OMXVideoOutput] video scheduler component creation failed."; return false; From 16cec35bdde00615bdaec602b1b24646d067acbc Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Sun, 10 May 2020 12:04:43 -1000 Subject: [PATCH 06/15] Add OMX as a module --- CMakeLists.txt | 17 +++------ cmake_modules/Findlibomx.cmake | 70 ++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 12 deletions(-) create mode 100644 cmake_modules/Findlibomx.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 0daf7db..128c441 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,19 +41,12 @@ find_package(OpenSSL REQUIRED) find_package(rtaudio REQUIRED) find_package(aasdk REQUIRED) find_package(ZLIB REQUIRED) +find_package(libomx) if(WIN32) set(WINSOCK2_LIBRARIES "ws2_32") endif(WIN32) -if(RPI_BUILD) - add_definitions(-DUSE_OMX -DOMX_SKIP64BIT) - set(BCM_HOST_LIBRARIES "/opt/vc/lib/libbcm_host.so") - set(BCM_HOST_INCLUDE_DIRS "/opt/vc/include") - set(ILCLIENT_INCLUDE_DIRS "/opt/vc/src/hello_pi/libs/ilclient") - set(ILCLIENT_LIBRARIES "/opt/vc/src/hello_pi/libs/ilclient/libilclient.a;/opt/vc/lib/libvcos.so;/opt/vc/lib/libvcilcs.a;/opt/vc/lib/libvchiq_arm.so") -endif(RPI_BUILD) - include_directories(${CMAKE_CURRENT_BINARY_DIR} ${Qt5Multimedia_INCLUDE_DIRS} ${Qt5MultimediaWidgets_INCLUDE_DIRS} @@ -63,8 +56,6 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${PROTOBUF_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR} ${RTAUDIO_INCLUDE_DIRS} - ${BCM_HOST_INCLUDE_DIRS} - ${ILCLIENT_INCLUDE_DIRS} ${include_directory}) link_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) @@ -84,12 +75,14 @@ target_link_libraries(autoapp aasdk libusb ${Qt5Bluetooth_LIBRARIES} ${PROTOBUF_LIBRARIES} ${ZLIB_LIBRARIES} - ${BCM_HOST_LIBRARIES} - ${ILCLIENT_LIBRARIES} ${WINSOCK2_LIBRARIES} ${RTAUDIO_LIBRARIES} ) +if(libomx_FOUND) + target_link_libraries(autoapp omx) +endif() + set(btservice_sources_directory ${sources_directory}/btservice) set(btservice_include_directory ${include_directory}/f1x/openauto/btservice) file(GLOB_RECURSE btservice_source_files ${btservice_sources_directory}/*.cpp ${btservice_include_directory}/*.hpp ${common_include_directory}/*.hpp) diff --git a/cmake_modules/Findlibomx.cmake b/cmake_modules/Findlibomx.cmake new file mode 100644 index 0000000..2c9f1dd --- /dev/null +++ b/cmake_modules/Findlibomx.cmake @@ -0,0 +1,70 @@ +set (OMX_DIR /opt/vc/) + +find_path(BCM_HOST_INCLUDE_DIR + bcm_host.h + PATHS + ${OMX_DIR} + PATH_SUFFIXES + include +) + +find_path(BCM_HOST_LIB_DIR + libbcm_host.so + PATHS + ${OMX_DIR} + PATH_SUFFIXES + lib +) + +find_path(ILCLIENT_INCLUDE_DIR + ilclient.h + PATHS + ${OMX_DIR} + PATH_SUFFIXES + src/hello_pi/libs/ilclient +) + +find_path(ILCLIENT_LIB_DIR + libilclient.a + PATHS + ${OMX_DIR} + PATH_SUFFIXES + src/hello_pi/libs/ilclient +) + + + +if (BCM_HOST_INCLUDE_DIR AND ILCLIENT_INCLUDE_DIR AND BCM_HOST_LIB_DIR AND ILCLIENT_LIB_DIR) + set(libomx_FOUND TRUE) +endif() + +if (libomx_FOUND) + if (NOT libomx_FIND_QUIETLY) + message(STATUS "Found omx:") + message(STATUS " - Bcm Host: ${BCM_HOST_INCLUDE_DIR}") + message(STATUS " - ilclient: ${ILCLIENT_INCLUDE_DIR}") + endif() + + add_library(omx INTERFACE) + + target_include_directories(omx SYSTEM INTERFACE + ${BCM_HOST_INCLUDE_DIR} + ${ILCLIENT_INCLUDE_DIR} + ) + + target_link_libraries(omx INTERFACE + ${BCM_HOST_LIB_DIR}/libbcm_host.so + ${ILCLIENT_LIB_DIR}/libilclient.a + ${BCM_HOST_LIB_DIR}/libvcos.so + ${BCM_HOST_LIB_DIR}/libvcilcs.a + ${BCM_HOST_LIB_DIR}/libvchiq_arm.so + ) + + target_compile_definitions(omx INTERFACE + -DUSE_OMX + -DOMX_SKIP64BIT + -DRASPBERRYPI3 + ) + +endif() + From 1bd667da51378d0bffca07e454355da2c27957dd Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Sun, 10 May 2020 11:58:49 -1000 Subject: [PATCH 07/15] Hide GCC psabi warnings --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 128c441..6eec0f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT} -Wall -pedantic -fPIC") set(CMAKE_CXX_FLAGS_DEBUG "-g -O0") set(CMAKE_CXX_FLAGS_RELEASE "-g -O3") +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 6.3) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-psabi") +endif() + add_definitions(-DBOOST_ALL_DYN_LINK) find_package(Boost REQUIRED COMPONENTS system log OPTIONAL_COMPONENTS unit_test_framework) From 7506df26eeb1c2801044cb96955873a0f4d07da6 Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Sun, 10 May 2020 11:59:11 -1000 Subject: [PATCH 08/15] FPIC isn't necessary. Already provided. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6eec0f6..3ed4f89 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,8 @@ set(Boost_USE_STATIC_RUNTIME OFF) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake_modules/") SET(CMAKE_CXX_STANDARD 14) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT} -Wall -pedantic -fPIC") + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT} -Wall -pedantic") set(CMAKE_CXX_FLAGS_DEBUG "-g -O0") set(CMAKE_CXX_FLAGS_RELEASE "-g -O3") From 74723699797555d35868b31240e1cd42dd32e9f0 Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Mon, 25 May 2020 15:44:22 -0500 Subject: [PATCH 09/15] Support install --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ed4f89..1197baa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,6 +84,7 @@ target_link_libraries(autoapp aasdk libusb ${RTAUDIO_LIBRARIES} ) + if(libomx_FOUND) target_link_libraries(autoapp omx) endif() @@ -100,3 +101,7 @@ target_link_libraries(btservice ${Qt5MultimediaWidgets_LIBRARIES} ${PROTOBUF_LIBRARIES} ) + +install(TARGETS autoapp btservice + RUNTIME DESTINATION bin) + From ef47eecefa45f89a10ef7f8bbb2edfb61ebb776f Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Mon, 25 May 2020 21:45:41 -0500 Subject: [PATCH 10/15] Strip extra whitespace --- CMakeLists.txt | 2 -- cmake_modules/Findaasdk.cmake | 1 - cmake_modules/Findlibomx.cmake | 3 --- 3 files changed, 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1197baa..91f98fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,7 +84,6 @@ target_link_libraries(autoapp aasdk libusb ${RTAUDIO_LIBRARIES} ) - if(libomx_FOUND) target_link_libraries(autoapp omx) endif() @@ -104,4 +103,3 @@ target_link_libraries(btservice install(TARGETS autoapp btservice RUNTIME DESTINATION bin) - diff --git a/cmake_modules/Findaasdk.cmake b/cmake_modules/Findaasdk.cmake index d1c7fec..e254703 100644 --- a/cmake_modules/Findaasdk.cmake +++ b/cmake_modules/Findaasdk.cmake @@ -41,4 +41,3 @@ else() endif() mark_as_advanced(AASDK_INCLUDE_DIRS AASDK_LIBRARIES) - diff --git a/cmake_modules/Findlibomx.cmake b/cmake_modules/Findlibomx.cmake index 2c9f1dd..278831e 100644 --- a/cmake_modules/Findlibomx.cmake +++ b/cmake_modules/Findlibomx.cmake @@ -32,8 +32,6 @@ find_path(ILCLIENT_LIB_DIR src/hello_pi/libs/ilclient ) - - if (BCM_HOST_INCLUDE_DIR AND ILCLIENT_INCLUDE_DIR AND BCM_HOST_LIB_DIR AND ILCLIENT_LIB_DIR) set(libomx_FOUND TRUE) endif() @@ -67,4 +65,3 @@ if (libomx_FOUND) ) endif() - From 5867a24f7f3a7105d885a77dae8675b02f530784 Mon Sep 17 00:00:00 2001 From: Kyle Gordon Date: Mon, 29 Jun 2020 13:13:06 +0100 Subject: [PATCH 11/15] Shuffle original project info --- Readme.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Readme.md b/Readme.md index d9db82d..9764088 100644 --- a/Readme.md +++ b/Readme.md @@ -1,15 +1,6 @@ # OpenAuto -### Support project -[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R4HXE5ESDR4U4) - -**OpenAuto Pro version** provides features like brightness control, volume control, support of Kodi and integration with the Raspberry PI OS (Raspbian Desktop). [See how it works at OpenAuto Pro overview video](https://www.youtube.com/watch?v=9sTOMI1qTiA) - -If you are looking for the car power supply with ignition state detection [go to the Blue Wave Studio page](https://bluewavestudio.io/index.php/bluewave-shop) - -For support of other platforms please contact me at f1xstudiopl@gmail.com - ### Community [![Join the chat at https://gitter.im/publiclab/publiclab](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/openauto_androidauto/Lobby) @@ -54,3 +45,12 @@ Copyrights (c) 2018 f1x.studio (Michal Szwaj) ### Remarks **This software is not certified by Google Inc. It is created for R&D purposes and may not work as expected by the original authors. Do not use while driving. You use this software at your own risk.** + +### Support OpenAuto Pro +[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R4HXE5ESDR4U4) + +**OpenAuto Pro version** provides features like brightness control, volume control, support of Kodi and integration with the Raspberry PI OS (Raspbian Desktop). [See how it works at OpenAuto Pro overview video](https://www.youtube.com/watch?v=9sTOMI1qTiA) + +If you are looking for the car power supply with ignition state detection [go to the Blue Wave Studio page](https://bluewavestudio.io/index.php/bluewave-shop) + +For support of other platforms please contact me at f1xstudiopl@gmail.com \ No newline at end of file From a2b54630b0c0a95db6e3e5888c1ca3463774c5ac Mon Sep 17 00:00:00 2001 From: Kyle Gordon Date: Mon, 29 Jun 2020 21:36:18 +0100 Subject: [PATCH 12/15] Build instructions --- Readme.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Readme.md b/Readme.md index 9764088..56a6801 100644 --- a/Readme.md +++ b/Readme.md @@ -9,6 +9,26 @@ OpenAuto is an AndroidAuto(tm) headunit emulator based on aasdk library and Qt l [See demo video](https://www.youtube.com/watch?v=k9tKRqIkQs8) +### Build Guide +#### Local build instructions for Raspberry Pi + +```sudo apt-get update +sudo apt-get -y install cmake build-essential git + +sudo apt-get install libboost-all-dev libusb-1.0.0-dev libssl-dev cmake libprotobuf-dev protobuf-c-compiler protobuf-compiler libqt5multimedia5 libqt5multimedia5-plugins libqt5multimediawidgets5 qtmultimedia5-dev libqt5bluetooth5 libqt5bluetooth5-bin qtconnectivity5-dev pulseaudio librtaudio-dev + +git clone https://github.com/OpenDsh/openauto + +mkdir openauto_build; cd openauto_build + +cmake -DCMAKE_BUILD_TYPE=Release -DRPI3_BUILD=TRUE -DAASDK_INCLUDE_DIRS="../aasdk/include" -DAASDK_LIBRARIES="../aasdk/lib/libaasdk.so" -DAASDK_PROTO_INCLUDE_DIRS="../aasdk" -DAASDK_PROTO_LIBRARIES="../aasdk/lib/libaasdk_proto.so" ../openauto + +make -j2 +sudo make install +``` + +The executable binary can then be found at ~/openauto/bin/autoapp + ### Supported functionalities - 480p, 720p and 1080p with 30 or 60 FPS - RaspberryPI 3 hardware acceleration support to decode video stream (up to 1080p@60!) From 1357f96d4eb6db4e24305b45f4e4b34bc4c0434e Mon Sep 17 00:00:00 2001 From: Kyle Gordon Date: Mon, 29 Jun 2020 21:56:48 +0100 Subject: [PATCH 13/15] aasdk required --- Readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Readme.md b/Readme.md index 56a6801..11b6dbd 100644 --- a/Readme.md +++ b/Readme.md @@ -12,6 +12,8 @@ OpenAuto is an AndroidAuto(tm) headunit emulator based on aasdk library and Qt l ### Build Guide #### Local build instructions for Raspberry Pi +Having aasdk built and install first is a prequisite for this task. Please complete the necessary aasdk steps before proceeding here. + ```sudo apt-get update sudo apt-get -y install cmake build-essential git From 7b5239102027deca1beb8dbf5b479d37c77cd237 Mon Sep 17 00:00:00 2001 From: Kyle Gordon Date: Tue, 30 Jun 2020 11:25:17 +0100 Subject: [PATCH 14/15] Remove outdated contact info --- Readme.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Readme.md b/Readme.md index 11b6dbd..ec2b073 100644 --- a/Readme.md +++ b/Readme.md @@ -66,13 +66,4 @@ Copyrights (c) 2018 f1x.studio (Michal Szwaj) - OpenMAX IL API ### Remarks -**This software is not certified by Google Inc. It is created for R&D purposes and may not work as expected by the original authors. Do not use while driving. You use this software at your own risk.** - -### Support OpenAuto Pro -[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R4HXE5ESDR4U4) - -**OpenAuto Pro version** provides features like brightness control, volume control, support of Kodi and integration with the Raspberry PI OS (Raspbian Desktop). [See how it works at OpenAuto Pro overview video](https://www.youtube.com/watch?v=9sTOMI1qTiA) - -If you are looking for the car power supply with ignition state detection [go to the Blue Wave Studio page](https://bluewavestudio.io/index.php/bluewave-shop) - -For support of other platforms please contact me at f1xstudiopl@gmail.com \ No newline at end of file +**This software is not certified by Google Inc. It is created for R&D purposes and may not work as expected by the original authors. Do not use while driving. You use this software at your own risk.** \ No newline at end of file From 8bbef14efa4a30578654cfb4116f5a70b80c1d8f Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Sat, 4 Jul 2020 10:34:31 -0500 Subject: [PATCH 15/15] Partially revert "Add OMX as a module" This reverts commit 16cec35bdde00615bdaec602b1b24646d067acbc. --- CMakeLists.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 91f98fd..f30daea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,12 +46,19 @@ find_package(OpenSSL REQUIRED) find_package(rtaudio REQUIRED) find_package(aasdk REQUIRED) find_package(ZLIB REQUIRED) -find_package(libomx) if(WIN32) set(WINSOCK2_LIBRARIES "ws2_32") endif(WIN32) +if(RPI_BUILD) + add_definitions(-DUSE_OMX -DOMX_SKIP64BIT) + set(BCM_HOST_LIBRARIES "/opt/vc/lib/libbcm_host.so") + set(BCM_HOST_INCLUDE_DIRS "/opt/vc/include") + set(ILCLIENT_INCLUDE_DIRS "/opt/vc/src/hello_pi/libs/ilclient") + set(ILCLIENT_LIBRARIES "/opt/vc/src/hello_pi/libs/ilclient/libilclient.a;/opt/vc/lib/libvcos.so;/opt/vc/lib/libvcilcs.a;/opt/vc/lib/libvchiq_arm.so") +endif(RPI_BUILD) + include_directories(${CMAKE_CURRENT_BINARY_DIR} ${Qt5Multimedia_INCLUDE_DIRS} ${Qt5MultimediaWidgets_INCLUDE_DIRS} @@ -61,6 +68,8 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${PROTOBUF_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR} ${RTAUDIO_INCLUDE_DIRS} + ${BCM_HOST_INCLUDE_DIRS} + ${ILCLIENT_INCLUDE_DIRS} ${include_directory}) link_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) @@ -80,14 +89,12 @@ target_link_libraries(autoapp aasdk libusb ${Qt5Bluetooth_LIBRARIES} ${PROTOBUF_LIBRARIES} ${ZLIB_LIBRARIES} + ${BCM_HOST_LIBRARIES} + ${ILCLIENT_LIBRARIES} ${WINSOCK2_LIBRARIES} ${RTAUDIO_LIBRARIES} ) -if(libomx_FOUND) - target_link_libraries(autoapp omx) -endif() - set(btservice_sources_directory ${sources_directory}/btservice) set(btservice_include_directory ${include_directory}/f1x/openauto/btservice) file(GLOB_RECURSE btservice_source_files ${btservice_sources_directory}/*.cpp ${btservice_include_directory}/*.hpp ${common_include_directory}/*.hpp)