From d76f122ad6162a5e45325b875f6db41cc14b75c7 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Sat, 16 Aug 2014 10:34:14 -0400 Subject: [PATCH] Organized "videobuffer" code into a video static library --- src/CMakeLists.txt | 7 +++++-- src/daemon.cpp | 2 +- src/main.cpp | 2 +- src/video/CMakeLists.txt | 10 ++++++++++ src/{daemon => video}/logging_videobuffer.h | 2 +- src/{ => video}/videobuffer.cpp | 0 src/{ => video}/videobuffer.h | 0 7 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 src/video/CMakeLists.txt rename src/{daemon => video}/logging_videobuffer.h (97%) rename src/{ => video}/videobuffer.cpp (100%) rename src/{ => video}/videobuffer.h (100%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 40f1071..298078d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -60,22 +60,24 @@ include_directories(./openalpr ) set(CMAKE_CSS_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall ") -ADD_EXECUTABLE( alpr main.cpp videobuffer.cpp ) +ADD_EXECUTABLE( alpr main.cpp ) TARGET_LINK_LIBRARIES(alpr openalpr support + video ${OpenCV_LIBS} ${Tesseract_LIBS} ) # Compile the alprd library on Unix-based OS IF (NOT WIN32) - ADD_EXECUTABLE( alprd daemon.cpp videobuffer.cpp daemon/beanstalk.c daemon/beanstalk.cc daemon/uuid.cpp ) + ADD_EXECUTABLE( alprd daemon.cpp daemon/beanstalk.c daemon/beanstalk.cc daemon/uuid.cpp ) TARGET_LINK_LIBRARIES(alprd openalpr support + video uuid curl log4cplus @@ -89,6 +91,7 @@ ENDIF() add_subdirectory(openalpr) add_subdirectory(misc_utilities) +add_subdirectory(video) diff --git a/src/daemon.cpp b/src/daemon.cpp index 3ba4374..9256945 100644 --- a/src/daemon.cpp +++ b/src/daemon.cpp @@ -5,7 +5,7 @@ #include "daemon/beanstalk.hpp" #include "daemon/uuid.h" -#include "daemon/logging_videobuffer.h" +#include "video/logging_videobuffer.h" #include "tclap/CmdLine.h" #include "alpr.h" diff --git a/src/main.cpp b/src/main.cpp index 8384b8d..64d9d03 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,7 +29,7 @@ #include "tclap/CmdLine.h" #include "support/filesystem.h" #include "support/timing.h" -#include "videobuffer.h" +#include "video/videobuffer.h" #include "alpr.h" const std::string MAIN_WINDOW_NAME = "ALPR main window"; diff --git a/src/video/CMakeLists.txt b/src/video/CMakeLists.txt new file mode 100644 index 0000000..3780a8a --- /dev/null +++ b/src/video/CMakeLists.txt @@ -0,0 +1,10 @@ + + +set(video_source_files + videobuffer.cpp + +) + +add_library(video STATIC ${video_source_files}) + +#SET_TARGET_PROPERTIES( video PROPERTIES COMPILE_FLAGS -fPIC) \ No newline at end of file diff --git a/src/daemon/logging_videobuffer.h b/src/video/logging_videobuffer.h similarity index 97% rename from src/daemon/logging_videobuffer.h rename to src/video/logging_videobuffer.h index b6e5d93..ab10e76 100644 --- a/src/daemon/logging_videobuffer.h +++ b/src/video/logging_videobuffer.h @@ -1,6 +1,6 @@ #ifndef OPENALPR_LOGGING_VIDEOBUFFER_H #define OPENALPR_LOGGING_VIDEOBUFFER_H -#include "../videobuffer.h" +#include "videobuffer.h" #include #include diff --git a/src/videobuffer.cpp b/src/video/videobuffer.cpp similarity index 100% rename from src/videobuffer.cpp rename to src/video/videobuffer.cpp diff --git a/src/videobuffer.h b/src/video/videobuffer.h similarity index 100% rename from src/videobuffer.h rename to src/video/videobuffer.h