Skip to content

Commit

Permalink
Add version
Browse files Browse the repository at this point in the history
  • Loading branch information
gehee committed May 3, 2024
1 parent ac8aa10 commit 74e49e2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.1)

project(fpvue)
project(fpvue VERSION 0.1)

set(CMAKE_CXX_STANDARD 17)

Expand Down Expand Up @@ -46,6 +46,9 @@ if(CMAKE_BUILD_TYPE MATCHES "Debug")
)
endif()

configure_file(fpvue_config.h.in fpvue_config.h)
target_include_directories(${PROJECT_NAME} PUBLIC "${PROJECT_BINARY_DIR}")

include(GNUInstallDirs)
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
Expand Down
14 changes: 11 additions & 3 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ extern "C" {
#include "gstrtpreceiver.h"
#include "scheduling_helper.hpp"
#include "time_util.h"
#include "fpvue_config.h"


#define READ_BUF_SIZE (1024*1024) // SZ_1M https://github.com/rockchip-linux/mpp/blob/ed377c99a733e2cdbcc457a6aa3f0fcd438a9dff/osal/inc/mpp_common.h#L179
Expand Down Expand Up @@ -441,7 +442,7 @@ void set_mpp_decoding_parameters(MppApi * mpi, MppCtx ctx) {

void printHelp() {
printf(
"\n\t\tFPVue FPV Decoder for Rockchip (%s)\n"
"\n\t\tFPVue FPV Decoder for Rockchip (%d.%d)\n"
"\n"
" Usage:\n"
" fpvue [Arguments]\n"
Expand All @@ -459,8 +460,8 @@ void printHelp() {
"\n"
" --dvr - Save the video feed (no osd) to the provided filename\n"
"\n"
" --screen-mode - Override default screen mode. ex:1920x1080@120\n"
"\n", __DATE__
" --screen-mode - Override default screen mode. ex:1920x1080@120\n"
"\n", fpvue_VERSION_MAJOR , fpvue_VERSION_MINOR
);
}

Expand Down Expand Up @@ -562,8 +563,15 @@ int main(int argc, char **argv)
continue;
}

__OnArgument("--version") {
printf("FPVue Rockchip %d.%d\n", fpvue_VERSION_MAJOR , fpvue_VERSION_MINOR);
return 0;
}

__EndParseConsoleArguments__

printf("FPVue Rockchip %d.%d\n", fpvue_VERSION_MAJOR , fpvue_VERSION_MINOR);

if (enable_osd == 0 ) {
video_zpos = 4;
}
Expand Down

0 comments on commit 74e49e2

Please sign in to comment.