feat build tools only BUILD_TOOLS=ON
This commit is contained in:
parent
2a1fa19f3f
commit
5ad12d6257
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,3 +14,4 @@ release/
|
||||
.cache
|
||||
out/
|
||||
compile_commands.json
|
||||
build_*
|
||||
|
@ -53,9 +53,9 @@ foreach(src ${src_rtp})
|
||||
message(STATUS "rtp src: ${src}")
|
||||
endforeach()
|
||||
|
||||
target_include_directories(rtp PUBLIC
|
||||
${MediaServer_Root}/librtp/include
|
||||
${MediaServer_Root}/libmpeg/include
|
||||
target_include_directories(
|
||||
rtp
|
||||
PUBLIC ${MediaServer_Root}/librtp/include ${MediaServer_Root}/libmpeg/include
|
||||
${MediaServer_Root}/libmpeg/source)
|
||||
|
||||
include_directories(${SecMedia_Root}/SVAC/src/svac_src)
|
||||
@ -98,16 +98,9 @@ append_srcs(SecMedia_src_list ${SecMedia_Root}/base)
|
||||
|
||||
# message(STATUS "SRCS: ${SecMedia_src_list}")
|
||||
|
||||
# file(
|
||||
# GLOB
|
||||
# SecMedia_src_list
|
||||
# ${SecMedia_Root}/*/*.cpp
|
||||
# ${SecMedia_Root}/*/*.h
|
||||
# ${SecMedia_Root}/*/*.c
|
||||
# ${SecMedia_Root}/*/*/*.cpp
|
||||
# ${SecMedia_Root}/*/*/*.h
|
||||
# ${SecMedia_Root}/*/*/*.c
|
||||
# )
|
||||
# file( GLOB SecMedia_src_list ${SecMedia_Root}/*/*.cpp ${SecMedia_Root}/*/*.h
|
||||
# ${SecMedia_Root}/*/*.c ${SecMedia_Root}/*/*/*.cpp ${SecMedia_Root}/*/*/*.h
|
||||
# ${SecMedia_Root}/*/*/*.c )
|
||||
file(GLOB SecMedia_api_list ${CMAKE_CURRENT_SOURCE_DIR}/include/common.h)
|
||||
|
||||
# # target_compile_options(${PROJECT_NAME} PRIVATE -fvisibility=hidden)
|
||||
@ -116,23 +109,22 @@ file(GLOB SecMedia_api_list ${CMAKE_CURRENT_SOURCE_DIR}/include/common.h)
|
||||
add_library(${PROJECT_NAME} SHARED ${SecMedia_src_list})
|
||||
# add_library(${PROJECT_NAME} STATIC ${SecMedia_src_list})
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC ${LINK_LIB_SVAC_LIST} rtp)
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE
|
||||
${SecMedia_Root}
|
||||
${SecMedia_Root}/3rdpart/media-server/libdash/include
|
||||
${SecMedia_Root}/3rdpart/media-server/libflv/include
|
||||
${SecMedia_Root}/3rdpart/media-server/libhls/include
|
||||
${SecMedia_Root}/3rdpart/media-server/libmov/include
|
||||
${SecMedia_Root}/3rdpart/media-server/libmpeg/include
|
||||
${SecMedia_Root}/3rdpart/media-server/librtmp/include
|
||||
${SecMedia_Root}/3rdpart/media-server/librtp/include
|
||||
${SecMedia_Root}/3rdpart/media-server/librtsp/include
|
||||
${SecMedia_Root}/3rdpart/media-server/libsip/include
|
||||
|
||||
)
|
||||
target_include_directories(
|
||||
${PROJECT_NAME}
|
||||
PRIVATE ${SecMedia_Root}
|
||||
${SecMedia_Root}/3rdpart/media-server/libdash/include
|
||||
${SecMedia_Root}/3rdpart/media-server/libflv/include
|
||||
${SecMedia_Root}/3rdpart/media-server/libhls/include
|
||||
${SecMedia_Root}/3rdpart/media-server/libmov/include
|
||||
${SecMedia_Root}/3rdpart/media-server/libmpeg/include
|
||||
${SecMedia_Root}/3rdpart/media-server/librtmp/include
|
||||
${SecMedia_Root}/3rdpart/media-server/librtp/include
|
||||
${SecMedia_Root}/3rdpart/media-server/librtsp/include
|
||||
${SecMedia_Root}/3rdpart/media-server/libsip/include)
|
||||
|
||||
# set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION}
|
||||
# SOVERSION 1 PUBLIC_HEADER ${SecMedia_api_list} )
|
||||
# CXX_VISIBILITY_PRESET hidden CMAKE_C_FLAGS hidden)
|
||||
# SOVERSION 1 PUBLIC_HEADER ${SecMedia_api_list} ) CXX_VISIBILITY_PRESET hidden
|
||||
# CMAKE_C_FLAGS hidden)
|
||||
|
||||
list(APPEND LINK_LIB_LIST ${PROJECT_NAME})
|
||||
list(APPEND LINK_LIB_LIST pthread)
|
||||
@ -155,8 +147,9 @@ endif()
|
||||
# ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION
|
||||
# ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
|
||||
|
||||
add_subdirectory(test)
|
||||
add_subdirectory(PcapSender)
|
||||
add_subdirectory(PcapRawSender)
|
||||
add_subdirectory(SecSetGen)
|
||||
|
||||
if(BUILD_TOOLS)
|
||||
add_subdirectory(test)
|
||||
add_subdirectory(PcapSender)
|
||||
add_subdirectory(PcapRawSender)
|
||||
add_subdirectory(SecSetGen)
|
||||
endif(BUILD_TOOLS)
|
||||
|
@ -41,11 +41,19 @@ public:
|
||||
|
||||
void Wait() { _event.Wait(); }
|
||||
|
||||
// For Interface
|
||||
size_t sei_end_offset() const { return _sei_end_offset; }
|
||||
|
||||
size_t append_length() const { return _append_length; }
|
||||
|
||||
private:
|
||||
Frame(Type type, const void *data, size_t len);
|
||||
friend class RTPManager;
|
||||
|
||||
private:
|
||||
size_t _sei_end_offset{0};
|
||||
size_t _append_length{0};
|
||||
|
||||
Event _event{true};
|
||||
Type _type;
|
||||
std::vector<uint8_t> _data;
|
||||
|
@ -37,8 +37,8 @@ HK_udp_out(void *Handle, char *buf, uint32_t *len, uint16_t *sei_end_offset, uin
|
||||
|
||||
*len = frame->size();
|
||||
if (buf) { std::copy(frame->data(), frame->data() + frame->size(), buf); }
|
||||
*sei_end_offset = 0;
|
||||
*append_length = 0;
|
||||
*sei_end_offset = frame->sei_end_offset();
|
||||
*append_length = frame->append_length();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user