Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

Commit af5a13d

Browse files
jpeddicordmm318
authored andcommitted
Initial commit
0 parents  commit af5a13d

14 files changed

+1578
-0
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*Issue #, if available:*
2+
3+
*Description of changes:*
4+
5+
6+
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
install:
2+
- git clone https://github.com/ros-industrial/industrial_ci.git .ros_ci
3+
script:
4+
- .ros_ci/travis.sh

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# ROS H264 Video Encoding Library for Amazon Kinesis Video Streams
2+
3+
4+
## Overview
5+
This repository contains the h264_encoder_core package, a library for encoding images into video frames. It is used by the `h264_video_encoder` node.
6+
7+
### License
8+
The source code is released under [LGPL 2.1]. However, h264_encoder_core incorporates several different encoding components which may further restrict the license. By default, x264 is used for software encoding, thereby applying GPL to all of h264_encoder_core.
9+
10+
**Author**: AWS RoboMaker<br/>
11+
**Affiliation**: [Amazon Web Services (AWS)]<br/>
12+
**Maintainer**: AWS RoboMaker, [email protected]
13+
14+
### Supported ROS Distributions
15+
- Kinetic
16+
- Lunar
17+
- Melodic
18+
19+
[Amazon Web Services (AWS)]: https://aws.amazon.com/
20+
[LGPL 2.1]: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html

h264_encoder_core/CMakeLists.txt

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
cmake_minimum_required(VERSION 2.8.3)
2+
cmake_policy(SET CMP0048 NEW)
3+
project(h264_encoder_core VERSION 1.0.0)
4+
5+
add_compile_options(-std=c++11)
6+
7+
# find_package(FFmpeg REQUIRED)
8+
find_package(aws_common REQUIRED)
9+
10+
11+
#############
12+
## Compile ##
13+
#############
14+
15+
# add the publisher example
16+
add_library(${PROJECT_NAME} STATIC
17+
src/h264_encoder.cpp
18+
src/h264_encoder_node_config.cpp
19+
)
20+
21+
target_include_directories(${PROJECT_NAME}
22+
PRIVATE include
23+
PRIVATE ${aws_common_INCLUDE_DIRS}
24+
)
25+
26+
target_link_libraries(${PROJECT_NAME}
27+
avcodec
28+
avutil
29+
swscale
30+
)
31+
32+
33+
#############
34+
## Install ##
35+
#############
36+
37+
## Mark executables and/or libraries for installation
38+
install(TARGETS ${PROJECT_NAME}
39+
EXPORT "${PROJECT_NAME}-targets"
40+
ARCHIVE DESTINATION lib
41+
LIBRARY DESTINATION lib
42+
RUNTIME DESTINATION bin
43+
)
44+
45+
## Mark cpp header files for installation
46+
install(
47+
DIRECTORY include/
48+
DESTINATION include
49+
)
50+
51+
export(TARGETS ${PROJECT_NAME}
52+
FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME}-targets.cmake")
53+
export(PACKAGE ${PROJECT_NAME})
54+
55+
CONFIGURE_FILE(commonConfig.cmake.in
56+
${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake @ONLY)
57+
CONFIGURE_FILE(commonConfigVersion.cmake.in
58+
${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake @ONLY)
59+
60+
INSTALL(FILES ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake DESTINATION share/${PROJECT_NAME}/cmake)
61+
INSTALL(FILES ${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake DESTINATION share/${PROJECT_NAME}/cmake)
62+
INSTALL(EXPORT ${PROJECT_NAME}-targets DESTINATION share/${PROJECT_NAME}/cmake)
63+
64+
65+
#############
66+
## Tests ##
67+
#############
68+
69+
enable_testing()
70+
find_package(GTest QUIET)
71+
if(NOT GTEST_FOUND)
72+
message(WARNING "Could not find GTest. Not building unit tests.")
73+
else()
74+
add_executable(test_h264_encoder_core test/h264_encoder_test.cpp)
75+
target_include_directories(test_h264_encoder_core
76+
PRIVATE include
77+
PRIVATE ${aws_common_INCLUDE_DIRS})
78+
target_link_libraries(test_h264_encoder_core
79+
${GTEST_LIBRARIES}
80+
pthread
81+
${aws_common_LIBRARIES}
82+
${PROJECT_NAME}
83+
)
84+
add_test(NAME test_h264_encoder_core COMMAND test_h264_encoder_core --gtest_output=xml:test_results/)
85+
endif()

0 commit comments

Comments
 (0)