Skip to content

Commit

Permalink
feat!(collect-eits): replace enclosed characters by default
Browse files Browse the repository at this point in the history
For example, `🈞` is replaced with `[再]`.

The `--use-unicode-symbol` option is added just for backword-compatibility.

LibISDB is used for parsing descriptors in EIT sections.

BREAKING CHANGE: an enclosed character is replaced with a sequence of
non-enclosed characters by default.
  • Loading branch information
masnagam committed Aug 10, 2020
1 parent ed5e092 commit f87be79
Show file tree
Hide file tree
Showing 4 changed files with 153 additions and 97 deletions.
53 changes: 51 additions & 2 deletions CMakeLists.txt
Expand Up @@ -33,6 +33,9 @@ set(MIRAKC_ARIB_ARIBB24_VERSION
set(MIRAKC_ARIB_TSDUCK_ARIB_VERSION
"c400025b7d31e26c0c15471e81adf2ad50632281"
CACHE STRING "tsduck-arib version to use." FORCE)
set(MIRAKC_ARIB_LIBISDB_VERSION
"911e4c5262ec3c68a9758ffac112f11047613234"
CACHE STRING "LibISDB version to use." FORCE)
set(MIRAKC_ARIB_GOOGLETEST_VERSION
"release-1.10.0"
CACHE STRING "googletest version to use." FORCE)
Expand Down Expand Up @@ -124,6 +127,8 @@ message(STATUS " MIRAKC_ARIB_ARIBB24_VERSION:")
message(STATUS " ${MIRAKC_ARIB_ARIBB24_VERSION}")
message(STATUS " MIRAKC_ARIB_TSDUCK_ARIB_VERSION:")
message(STATUS " ${MIRAKC_ARIB_TSDUCK_ARIB_VERSION}")
message(STATUS " MIRAKC_ARIB_LIBISDB_VERSION:")
message(STATUS " ${MIRAKC_ARIB_LIBISDB_VERSION}")
message(STATUS " MIRAKC_ARIB_GOOGLETEST_VERSION:")
message(STATUS " ${MIRAKC_ARIB_GOOGLETEST_VERSION}")
message(STATUS " MIRAKC_ARIB_GOOGLE_BENCHMARK_VERSION:")
Expand Down Expand Up @@ -339,7 +344,7 @@ if(cppcodec)
add_library(cppcodec::header-only INTERFACE IMPORTED)

set_target_properties(cppcodec::header-only PROPERTIES
INTERFACE_INCUDE_DIRECTORIES
INTERFACE_INCLUDE_DIRECTORIES
${MIRAKC_ARIB_VENDOR_DIR}/include
)
else()
Expand Down Expand Up @@ -385,7 +390,7 @@ if(aribb24_LIB)
CXX
IMPORTED_LOCATION
${aribb24_LIB}
INTERFACE_INCUDE_DIRECTORIES
INTERFACE_INCLUDE_DIRECTORIES
${MIRAKC_ARIB_VENDOR_DIR}/include
)
else()
Expand Down Expand Up @@ -470,6 +475,46 @@ else()
set(MIRAKC_ARIB_VENDOR_READY FALSE)
endif()

# LibISDB

ExternalProject_Add(vendor-libisdb
PREFIX
${MIRAKC_ARIB_VENDOR_DIR}
GIT_REPOSITORY
https://github.com/DBCTRADO/LibISDB.git
GIT_TAG
${MIRAKC_ARIB_LIBISDB_VERSION}
CMAKE_ARGS
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-D CMAKE_INSTALL_PREFIX=${MIRAKC_ARIB_VENDOR_DIR}
-D CMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
EXCLUDE_FROM_ALL
YES
)

add_dependencies(vendor vendor-libisdb)

find_library(libisdb_LIB isdb
PATHS ${MIRAKC_ARIB_VENDOR_DIR}/lib ${MIRAKC_ARIB_VENDOR_DIR}/lib64
NO_DEFAULT_PATH)

if(libisdb_LIB)
# Add an interface target for LibISDB like other third party libraries.
add_library(libisdb::static-lib STATIC IMPORTED)

set_target_properties(libisdb::static-lib PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES
CXX
IMPORTED_LOCATION
${libisdb_LIB}
INTERFACE_INCLUDE_DIRECTORIES
${MIRAKC_ARIB_VENDOR_DIR}/src/vendor-libisdb
)
else()
message(WARNING "LibISDB: not found")
set(MIRAKC_ARIB_VENDOR_READY FALSE)
endif()

if(MIRAKC_ARIB_TEST)
# Google Test

Expand Down Expand Up @@ -594,6 +639,7 @@ target_link_libraries(mirakc-arib
cppcodec::header-only
tsduck-arib::static-lib
aribb24::static-lib
libisdb::static-lib
)

target_compile_definitions(mirakc-arib
Expand All @@ -607,6 +653,7 @@ target_compile_definitions(mirakc-arib
MIRAKC_ARIB_CPPCODEC_VERSION="${MIRAKC_ARIB_CPPCODEC_VERSION}"
MIRAKC_ARIB_ARIBB24_VERSION="${MIRAKC_ARIB_ARIBB24_VERSION}"
MIRAKC_ARIB_TSDUCK_ARIB_VERSION="${MIRAKC_ARIB_TSDUCK_ARIB_VERSION}"
MIRAKC_ARIB_LIBISDB_VERSION="${MIRAKC_ARIB_LIBISDB_VERSION}"
)

if(MIRAKC_ARIB_TEST)
Expand Down Expand Up @@ -646,6 +693,7 @@ if(MIRAKC_ARIB_TEST)
cppcodec::header-only
tsduck-arib::static-lib
aribb24::static-lib
libisdb::static-lib
)

add_custom_target(test
Expand All @@ -672,6 +720,7 @@ if(MIRAKC_ARIB_TEST)
cppcodec::header-only
tsduck-arib::static-lib
aribb24::static-lib
libisdb::static-lib
)

add_custom_target(benchmark $<TARGET_FILE:mirakc-arib-benchmark>)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -113,6 +113,7 @@ mirakc-arib is static-linked against the following libraries:
* [tplgy/cppcodec] (MIT)
* [masnagam/tsduck-arib] forked from [tsduck/tsduck] (BSD 2-Clause)
* [masnagam/aribb24] forked from [nkoriyama/aribb24] (LGPL-3.0)
* [DBCTRADO/LibISDB] (GPLv2)

The following libraries are used for testing purposes:

Expand Down Expand Up @@ -166,6 +167,7 @@ shall be dual licensed as above, without any additional terms or conditions.
[tsduck/tsduck]: https://github.com/tsduck/tsduck
[masnagam/aribb24]: https://github.com/masnagam/aribb24
[nkoriyama/aribb24]: https://github.com/nkoriyama/aribb24
[DBCTRADO/LibISDB]: https://github.com/DBCTRADO/LibISDB
[google/googletest]: https://github.com/google/googletest
[google/benchmark]: https://github.com/google/benchmark
[node-aribts]: https://github.com/rndomhack/node-aribts
Expand Down

0 comments on commit f87be79

Please sign in to comment.