Permalink
Browse files

Merge pull request #20 from EtixLabs/bugfix/version-1.1.1

v1.1.1 : Fixed functional tests & Multiple bugfixes
  • Loading branch information...
Ullaakut committed Nov 12, 2016
2 parents f80af6b + 553524a commit c0d890acad06c4365b7f36c2ab87d624cb388198
View
@@ -2,6 +2,34 @@
This file lists all versions of the repository and precises all changes.
## v1.1.1
#### Minor changes :
* Removed unnecessary null pointer checks (thanks to https://github.com/elfring)
* Updated package description
* Removed debug message in CMake build
* Added `/ch01.264` to the URL dictionary in the deployment (Comelit default RTSP URL)
* Updated tests partially (still needs work to make the code cleaner)
* Variable names are now compliant with Golang best practices
* JSON variable names are back to normal
* Functions have been moved in more appropriate source files
* Structure definitions have been moved in more appropriate source files
* Source files have been renamed to be more relevant
* JUnit output now considers each camera as a test case
* JUnit output now contains errors which makes debugging much easier
* Added header files where it was forgotten
#### Bugfixes :
* Fixed an issue where if you loose your internet connection during thumbnail generation, FFMpeg would get stuck forever and thus Cameradar would never finish
* Fixed an issue where multithreading could cause crashes
* Fixed an issue where the routes dictionary was mistaken for the credentials dictionary
* Fixed issues with the golang testing tool
* Fixed automated camera generation
* Fixed docker IP address resolution
#### Known issues :
* There is an issue with Camera Emulation Server that makes it impossible for Cameradar to generate thumbnails, which is why right now the verification of the thumbnails presence is commented and it is assumed correct. It is probably an issue with GST-RTSP-Server but requires investigation.
## v1.1.0
#### Major changes :
View
@@ -19,11 +19,9 @@ set (PROJECT_NAME cameradar)
project (${PROJECT_NAME})
message ("Here")
set (${PROJECT_NAME}_VERSION_MAJOR 1)
set (${PROJECT_NAME}_VERSION_MINOR 1)
set (${PROJECT_NAME}_VERSION_PATCH 0)
set (${PROJECT_NAME}_VERSION_PATCH 1)
set (${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}${${PROJECT_NAME}_SUFFIX}")
find_package(Git REQUIRED)
@@ -34,7 +32,7 @@ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall -Wextra -Wno-unused-function")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color") #enable error coloration on gcc
# release specific flags
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2") #enable error coloration on gcc
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
#debug specific flags
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -fprofile-arcs -ftest-coverage")
@@ -102,7 +100,7 @@ include_directories (
set (${CAMERADAR_BINARIES} "")
set (${CAMERADAR_LIBRARIES} "")
#build cache managers
# Build cache managers
add_subdirectory (deps)
message ("Debug")
add_subdirectory (cameradar_standalone)
@@ -115,11 +113,11 @@ install (FILES ${CAMERADAR_CACHE_MANAGERS} DESTINATION cache_managers)
install (FILES ${CAMERADAR_LIBRARIES} DESTINATION libraries)
install (DIRECTORY ${CMAKE_SOURCE_DIR}/deps/licenses DESTINATION libraries)
# cpack configuration
# CPack configuration
include (InstallRequiredSystemLibraries)
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "cameradar")
set (CPACK_PACKAGE_VENDOR "Etix Labs")
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "cameradar tool")
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Cameradar hacks its way into RTSP CCTV cameras")
set (CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}_${${PROJECT_NAME}_VERSION}_${CMAKE_BUILD_TYPE}_${CMAKE_SYSTEM_NAME}")
set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
View
@@ -3,7 +3,7 @@
## An RTSP surveillance camera access multitool
[![cameradar License](https://img.shields.io/badge/license-Apache-blue.svg)](#license)
[![Latest release](https://img.shields.io/badge/release-1.1.0-green.svg)](https://github.com/EtixLabs/cameradar/releases/latest)
[![Latest release](https://img.shields.io/badge/release-1.1.1-green.svg)](https://github.com/EtixLabs/cameradar/releases/latest)
#### Cameradar allows you to:
@@ -48,7 +48,7 @@ Of course, you can also call for individual tasks if you plug in a Database to C
This is the fastest and simplest way to use Cameradar. To do this you will just need `docker` on your machine.
Run
Run
```
docker run \
@@ -1,25 +1,16 @@
{
"mysql_db" : {
"host" : "0.0.0.0",
"host" : "cameradar-database",
"port" : 3306,
"user": "root",
"password": "root",
"db_name": "cctv_dev"
"db_name": "cmrdr"
},
"subnets" : "172.16.100.11",
// If not specified, will scan all ports (1-65535)
"subnets" : "localhost",
"ports" : "554,8554",
"rtsp_url_file" : "conf/url.json",
"rtsp_ids_file" : "conf/ids.json",
// You must give an accessible path to an already existing directory
"thumbnail_storage_path" : "/tmp",
// This is the path that will be used in the Docker container
// if you're not familiar with Docker, only change the
// cache_manager_name value
"cache_manager_path" : "../cache_managers",
"rtsp_url_file" : "/cameradar/conf/url.json",
"rtsp_ids_file" : "/cameradar/conf/ids.json",
"thumbnail_storage_path" : "/tmp/thumbs",
"cache_manager_path" : "/cameradar/cache_managers",
"cache_manager_name" : "dumb"
}
@@ -92,12 +92,12 @@ bool
configuration::load_url() {
std::string content;
LOG_DEBUG_("Trying to open ids file from " + this->rtsp_ids_file, "configuration");
LOG_DEBUG_("Trying to open url file from " + this->rtsp_url_file, "configuration");
if (this->rtsp_url_file.size()) {
content = read_file(this->rtsp_url_file.c_str()).second;
} else {
LOG_WARN_(
"No ids file detected in your configuration, Cameradar will use "
"No url file detected in your configuration, Cameradar will use "
"the default one "
"instead.",
"configuration");
@@ -25,8 +25,8 @@ size_t
write_data(void* buffer, size_t size, size_t nmemb, void* userp) {
// I'm sorry for this
// Forget you ever saw it
(void)buffer;
(void)userp;
if (not buffer || not size || not nmemb) return 0;
return size * nmemb;
}
@@ -88,7 +88,7 @@ curl_describe(const std::string& path, bool logs) {
m.lock();
curl_global_cleanup();
m.unlock();
LOG_DEBUG_("Response code : " + std::to_string(rc), "describe");
LOG_DEBUG_("[" + path + "] Response code : " + std::to_string(rc), "describe");
if (logs) {
// Some cameras return 400 instead of 401, don't know why.
// Some cameras timeout and then curl considers the status as 0
@@ -12,19 +12,26 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <rtsp_path.h>
#include <logger.h>
#include <rtsp_path.h>
namespace etix {
namespace cameradar {
const std::string
make_path(const stream_model& model) {
std::string ret(model.service_name + "://" + model.username + ":" + model.password + "@" +
model.address + ":" + std::to_string(model.port) + model.route);
LOG_DEBUG_(ret, "debug");
return ret;
if (model.password != "" || model.username != "") {
std::string ret(model.service_name + "://" + model.username + ":" + model.password + "@" +
model.address + ":" + std::to_string(model.port) + model.route);
LOG_DEBUG_(ret, "debug");
return ret;
} else {
std::string ret(model.service_name + "://" + model.address + ":" +
std::to_string(model.port) + model.route);
LOG_DEBUG_(ret, "debug");
return ret;
}
}
}
}
@@ -1,8 +1,16 @@
# Copyright (C) 2015 Etix Labs - All Rights Reserved.
# All information contained herein is, and remains the property of Etix Labs and its suppliers,
# if any. The intellectual and technical concepts contained herein are proprietary to Etix Labs
# Dissemination of this information or reproduction of this material is strictly forbidden unless
# prior written permission is obtained from Etix Labs.
## Copyright 2016 Etix Labs
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
# MySQL Connector dependency
message(STATUS "Configuring deps.mysqlconnector")
@@ -9,10 +9,16 @@ COL_BLUE=$ESC_SEQ"34;01m"
COL_MAGENTA=$ESC_SEQ"35;01m"
COL_CYAN=$ESC_SEQ"36;01m"
echo -e $COL_YELLOW"Deleting old package ... "$COL_RESET
rm -f cameradar_*_Release_Linux.tar.gz
echo -e $COL_GREEN"OK!"$COL_RESET
echo -e $COL_YELLOW"Creating package ... "$COL_RESET
{ cd ..
{
cd ..
mkdir build
cd build
rm -f cameradar_*_Release_Linux.tar.gz
cmake .. -DCMAKE_BUILD_TYPE=Release
make package
cp cameradar_*_Release_Linux.tar.gz ../deployment
Binary file not shown.
Binary file not shown.
View
@@ -24,6 +24,7 @@
"/camera.stm",
"/ch0",
"/ch001.sdp",
"/ch01.264",
"/ch0_unicast_firststream",
"/ch0_unicast_secondstream",
"/channel1",
View
@@ -2,14 +2,14 @@ FROM ubuntu:15.10
MAINTAINER brendan.leglaunec@etixgroup.com
ENV LD_LIBRARY_PATH="/cctv/libraries"
ENV LD_LIBRARY_PATH="/cameradar/libraries"
# install go
RUN apt-get update && apt-get install -y make git wget curl
RUN wget https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf go1.6.linux-amd64.tar.gz
# set variable env
ENV GOPATH=/go
ENV GOPATH=/cameradartest/go
ENV PATH=$PATH:/go/bin
ENV PATH=$PATH:/usr/local/go/bin
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
@@ -27,17 +27,19 @@ RUN apt-get update && apt-get install -y \
RUN apt-get install -y psmisc
ADD cctv_*_Debug_Linux.tar.gz /
RUN mv cctv_*_Debug_Linux cctv
ADD cameradar_*_Debug_Linux.tar.gz /
RUN mv cameradar_*_Debug_Linux cameradar
# create cameradaratest folder in go src path
RUN mkdir -p /go/src/cameradartest
ADD ./conf /conf
RUN mkdir -p /cameradartest/go/src/cameradartest
COPY src/*.go /cameradartest/go/src/cameradartest/
COPY ./conf /conf
ADD ./docker/run_cameradartest.sh /run.sh
# get go deps
RUN go get github.com/go-sql-driver/mysql
RUN mkdir /thumbnails
WORKDIR /go/src/cameradartest
WORKDIR /cameradartest/go/src/cameradartest
RUN go build -o cameradartest *.go
CMD ["/run.sh"]
View
@@ -1,14 +1,23 @@
FROM ubuntu:16.04
MAINTAINER brendan.leglaunec@etixgroup.com
RUN useradd -m vlc; \
apt-get update; \
apt-get install -y vlc-nox
RUN sed -i s/geteuid/getppid/g /usr/bin/vlc
RUN apt-get update && apt-get install -y \
libgstrtspserver-1.0-dev \
libgstreamer1.0-dev \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
gstreamer1.0-tools \
libssl-dev mysql-client \
gstreamer1.0-plugins-good \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev
ADD ./docker/screen.png /vlc/screen.png
COPY ./docker/run_vlc.sh /start.sh
COPY ./etix_rtsp_server /etix_rtsp_server
COPY ./docker/run_ces.sh /start.sh
COPY ./camera_emulation_server /camera_emulation_server
EXPOSE 8554
RUN ./camera_emulation_server&
View
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
ESC_SEQ="\x1b["
COL_RESET=$ESC_SEQ"39;49;00m"
COL_RED=$ESC_SEQ"31;01m"
COL_GREEN=$ESC_SEQ"32;01m"
COL_YELLOW=$ESC_SEQ"33;01m"
COL_BLUE=$ESC_SEQ"34;01m"
COL_MAGENTA=$ESC_SEQ"35;01m"
COL_CYAN=$ESC_SEQ"36;01m"
echo -e $COL_YELLOW"Deleting old package ... "$COL_RESET
rm -f cameradar_*_Debug_Linux.tar.gz
echo -e $COL_GREEN"OK!"$COL_RESET
echo -e $COL_YELLOW"Creating package ... "$COL_RESET
{
cd ..
mkdir build
cd build
rm -f cameradar_*_Debug_Linux.tar.gz
cmake .. -DCMAKE_BUILD_TYPE=Debug
make package
cp cameradar_*_Debug_Linux.tar.gz ../test
cd ../test
} &> /dev/null
echo -e $COL_GREEN"OK!"$COL_RESET
Binary file not shown.
@@ -1,14 +1,16 @@
{
"mysql_db" : {
"host" : "0.0.0.0",
"host" : "cameradar-database",
"port" : 3306,
"user": "root",
"password": "root",
"db_name": "cctv"
"db_name": "cmrdr"
},
"subnets" : "172.16.100.13 localhost",
"ports" : "554,8554", // if not specified, default will be 1-65535
"rtsp_url_file" : "conf/url.json",
"rtsp_ids_file" : "conf/ids.json",
"thumbnail_storage_path" : "/ce/que/tu/veux"
}
"subnets" : "localhost",
"ports" : "554,8554",
"rtsp_url_file" : "/conf/url.json",
"rtsp_ids_file" : "/conf/ids.json",
"thumbnail_storage_path" : "/tmp",
"cache_manager_path" : "/cameradar/cache_managers",
"cache_manager_name" : "dumb"
}
Oops, something went wrong.

0 comments on commit c0d890a

Please sign in to comment.