1 Star 1 Fork 5

caesar wang/ipcweb-backend

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

ipcweb-backend

A IP Camera Web Backend Reference Implementation


[TOC]

1. Getting Started

1.1 Build Requirements

ipcweb-backend is designed to run on Linux platform, especially the Linux platform of Rockchip's SoCs. It is cross compiled with the following environments:

  • Build Host: Ubuntu

  • Host Web Server: Any web server that supports CGI application, like Lighttpd, Nginx, Apache, AppWeb etc.

  • Build System: CMake >= 3.8

  • Compiler: GCC >= 6 or Clang

  • PostMan

  • Host Libraries(To test APIs on host environments)

    sudo apt install libboost-all-dev
    
    sudo apt install libcgicc-dev
    
    sudo apt install nlohmann-json-dev
    
    • jwt-cpp This library is not provided by system, it is build from souce
  • Target Libraries The target libraries should be provided by the Buildroot SDK, if them are not found, the CMake build system build them from source.

    BR2_PACKAGE_BOOST=y
    BR2_PACKAGE_BOOST_LOG=y
    BR2_PACKAGE_BOOST_STACKTRACE=y
    BR2_PACKAGE_BOOST_SYSTEM=y
    BR2_PACKAGE_BOOST_THREAD=y
    
    BR2_PACKAGE_LIBCGICC
    
    BR2_PACKAGE_JSON_FOR_MODERN_CPP
    

1.2 Build Instructions

mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/linux-arm.cmake
make -j8

1.5 Unit Testing

This project use Google Test as test framework. Init the googletest submodule to use it.

git submodule init
git submodule update

Build and test

cmake .. -DIPCWEB_BUILD_TESTS
make
make test

The output is like:

Running tests...
Test project /work/www/ipcweb-backend/build
    Start 1: ObjectsTest.Tcpip.noArgs
1/1 Test #1: ObjectsTest.Tcpip.noArgs .........   Passed    0.00 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   0.00 sec

1.4 CGI Testing

Start the web server to test CGI applications, suggest to use AppWeb.

appweb <path/of/web/root> <host>:<port>

Use tools like Postman to test the RESTful API

GET http://:/api/v1/hello.cgi?name=cody

// Copyright 2020 Rockchip Electronics Co.,Ltd. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // 3. Neither the name of the copyright holder nor the names of its contributors // may be used to endorse or promote products derived from this software without // specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE.

简介

暂无描述 展开 收起
README
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/caesar-wang/ipcweb-backend.git
git@gitee.com:caesar-wang/ipcweb-backend.git
caesar-wang
ipcweb-backend
ipcweb-backend
master

搜索帮助