Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,30 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [1.4.0](https://github.com/rdkcentral/subtec-app/compare/1.3.1...1.4.0)

- RDKEMW-7101 : Sarnoff issue [`#39`](https://github.com/rdkcentral/subtec-app/pull/39)
- RDKEMW-4412: TTML attribute tests update to subtec L2 framework [`#38`](https://github.com/rdkcentral/subtec-app/pull/38)
- RDKEMW-4206 : Upstream LGI subtec changes [`#36`](https://github.com/rdkcentral/subtec-app/pull/36)
- RDKEMW-4206: Subtec-app code rebase [`37b33c0`](https://github.com/rdkcentral/subtec-app/commit/37b33c0054d0aa7abb542754ecff40f15e6d4669)
- RDKEMW-4491: Merge tag '1.3.0' into develop [`4b45661`](https://github.com/rdkcentral/subtec-app/commit/4b45661117ac5a6c026f24bf78b2d3caf8bedc76)

#### [1.3.1](https://github.com/rdkcentral/subtec-app/compare/1.3.0...1.3.1)

> 3 September 2025

- RDKEMW-7101 : Sarnoff issue [`#40`](https://github.com/rdkcentral/subtec-app/pull/40)
- 1.3.1 release change log update [`045f0dc`](https://github.com/rdkcentral/subtec-app/commit/045f0dc4435dcf9212ee631a88e019e38bb35fdb)

#### [1.3.0](https://github.com/rdkcentral/subtec-app/compare/1.2.3...1.3.0)

> 20 May 2025

- RDKEMW-4075: Enable TTML override on runtime instead of buildtime [`#26`](https://github.com/rdkcentral/subtec-app/pull/26)
- RDKEMW-3517 : subttxrend-app uses subttxrend-ctrl [`#25`](https://github.com/rdkcentral/subtec-app/pull/25)
- RDKEMW-4491:Merge branch 'release/1.3.0' into main [`9cdf8b1`](https://github.com/rdkcentral/subtec-app/commit/9cdf8b112cb535e3d0b23e2a5dba53fefd0e8e61)
- RDKEMW-3517: subttxrend-app uses subttxrend-ctrl [`aca405c`](https://github.com/rdkcentral/subtec-app/commit/aca405c9c38ade415de8f890530d9b86bc586a39)
- Merge tag '1.2.3' into develop [`5bd1171`](https://github.com/rdkcentral/subtec-app/commit/5bd1171397c556b43d570ca09d8895184dfb9477)
- 1.3.0 release changelog update [`a5b0ebe`](https://github.com/rdkcentral/subtec-app/commit/a5b0ebe0df8c6dd24f9952905ca6f63236d1fa75)

#### [1.2.3](https://github.com/rdkcentral/subtec-app/compare/1.2.2...1.2.3)

Expand Down
2 changes: 1 addition & 1 deletion dvbsubdecoder/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ set(DVBSUBDECODER_SOURCES
#
set(LIBRARY_NAME "dvbsubdecoder")
add_library(${LIBRARY_NAME} SHARED ${DVBSUBDECODER_SOURCES})
set_property(TARGET ${LIBRARY_NAME} PROPERTY CXX_STANDARD 11)
set_property(TARGET ${LIBRARY_NAME} PROPERTY CXX_STANDARD 14)
set_property(TARGET ${LIBRARY_NAME} PROPERTY VERSION 0.0.0)
set_property(TARGET ${LIBRARY_NAME} PROPERTY SOVERSION 0)
set_property(TARGET ${LIBRARY_NAME} PROPERTY PUBLIC_HEADER ${DVBSUBDECODER_PUBLIC_HEADERS})
Expand Down
2 changes: 1 addition & 1 deletion dvbsubdecoder/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ macro (add_cppunit_test _name)
# invoke built-in add_executable
add_executable(${ARGV})

set_property(TARGET ${_name} PROPERTY CXX_STANDARD 11)
set_property(TARGET ${_name} PROPERTY CXX_STANDARD 14)

target_link_libraries(${_name} ${LIBCPPUNIT_LIBRARIES})
if(CMAKE_COMPILER_IS_GNUCXX)
Expand Down
2 changes: 2 additions & 0 deletions dvbsubdecoder/test/PixelWriter/PixelWriter_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#include "PixelWriter.hpp"

#include <array>

using dvbsubdecoder::PixelWriter;
using dvbsubdecoder::Pixmap;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ CPPUNIT_TEST_SUITE( RenderingStateTest );
if (state.addRegion(i & 0xFF, i & 0x0F,
{ 0, 0, 10, 10 }))
{
CPPUNIT_ASSERT(state.getRegionByIndex(i).m_id == i & 0xFF);
CPPUNIT_ASSERT(state.getRegionByIndex(i).m_id == (i & 0xFF));

++regionCount;
CPPUNIT_ASSERT(state.getRegionCount() == regionCount);
Expand Down
2 changes: 1 addition & 1 deletion dvbsubdecoder/test/common/DecoderClientMock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class DecoderClientMock : public dvbsubdecoder::DecoderClient,
return block;
}

virtual void gfxFree(void* block)
virtual void gfxFree(void* block) override
{
if (block)
{
Expand Down
4 changes: 2 additions & 2 deletions subttxrend-app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ option(INSTALL_CONFIG_FILE "Install the configuration file" ON)
#
# Extra compiler / linker options
#
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-as-needed" )
endif()
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra -Werror -Wformat=2")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
Expand Down Expand Up @@ -132,8 +134,6 @@ target_link_libraries(${APP_NAME} ${LIBSUBTTXRENDCC_LIBRARIES})
target_link_libraries(${APP_NAME} ${LIBSUBTTXRENDTTXT_LIBRARIES})
target_link_libraries(${APP_NAME} ${LIBSUBTTXRENDTTML_LIBRARIES})
target_link_libraries(${APP_NAME} ${LIBSUBTTXRENDWEBVTT_LIBRARIES})
target_link_libraries(${APP_NAME} pthread)
target_link_libraries(${APP_NAME} boost_system)

#
# Install rules
Expand Down
4 changes: 0 additions & 4 deletions subttxrend-app/conf/subttxrend-app.conf

This file was deleted.

7 changes: 7 additions & 0 deletions subttxrend-app/src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ void Application::quit()

common::LoggerManager::getInstance()->deinit();
}

#ifdef __APPLE__
void Application::startBlockingApplicationWindow()
{
m_gfxEngine->startBlockingApplicationWindow();
}
#endif

} // namespace app
} // namespace subttxrend
4 changes: 4 additions & 0 deletions subttxrend-app/src/Application.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ class Application : private common::NonCopyable
void runAsync();
void quit();

#ifdef __APPLE__
void startBlockingApplicationWindow();
#endif

private:

/** Application configuration. */
Expand Down
15 changes: 13 additions & 2 deletions subttxrend-app/src/Controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ void forAllControllers(Ctrls const& ctrls, Packet const& packet, void (ctrl::Con
}

constexpr const std::chrono::milliseconds connection_status_check_timeout{1000};
constexpr const std::chrono::milliseconds as_data_acq_timeout{2000};

} /* namespace */

Expand Down Expand Up @@ -239,6 +238,10 @@ void Controller::doOnPacketReceived(UniqueLock& lock, const protocol::Packet& pa
processWebvttTimestamp(static_cast<protocol::PacketWebvttTimestamp const&>(packet));
break;
}
case protocol::Packet::Type::FLUSH: {
processFlushPacket(static_cast<protocol::PacketFlush const&>(packet));
break;
}
case protocol::Packet::Type::PAUSE: {
processPausePacket(static_cast<protocol::PacketPause const&>(packet));
break;
Expand Down Expand Up @@ -373,7 +376,7 @@ void Controller::processTtmlSelection(const protocol::PacketTtmlSelection& packe

common::Properties properties;
try {
properties = m_asLstnr->getData(as_data_acq_timeout);
properties = m_asLstnr->getData();
} catch (std::exception const& e) {
m_logger.oserror(__LOGGER_FUNC__, " exception: ", e.what());
}
Expand Down Expand Up @@ -458,6 +461,14 @@ void Controller::processWebvttTimestamp(const protocol::PacketWebvttTimestamp& p
forAllControllers(m_activeControllers, packet, &ctrl::ControllerInterface::processTimestamp);
}

void Controller::processFlushPacket(const protocol::PacketChannelSpecific& packet)
{
auto timing = m_logger.timing(__LOGGER_FUNC__);
forAllControllers(m_activeControllers, packet, &ctrl::ControllerInterface::flush);
m_dataqueue.clear();
m_renderCond.notify_one();
}

void Controller::processPausePacket(const protocol::PacketChannelSpecific& packet)
{
auto timing = m_logger.timing(__LOGGER_FUNC__);
Expand Down
8 changes: 8 additions & 0 deletions subttxrend-app/src/Controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include <subttxrend/protocol/PacketTtmlTimestamp.hpp>
#include <subttxrend/protocol/PacketWebvttSelection.hpp>
#include <subttxrend/protocol/PacketWebvttTimestamp.hpp>
#include <subttxrend/protocol/PacketFlush.hpp>
#include <subttxrend/protocol/PacketPause.hpp>
#include <subttxrend/protocol/PacketResume.hpp>
#include <subttxrend/protocol/PacketMute.hpp>
Expand Down Expand Up @@ -266,6 +267,13 @@ class Controller : private common::NonCopyable,
*/
void processWebvttTimestamp(const protocol::PacketWebvttTimestamp& timestampPacket);

/**
* Processes flush packet.
*
* @param packet
* flush packet.
*/
void processFlushPacket(const protocol::PacketChannelSpecific& packet);
/**
* Processes pause packet.
*
Expand Down
12 changes: 8 additions & 4 deletions subttxrend-app/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ auto registerSignalListener()
int main(int argc,
char* argv[])
{
#ifndef __APPLE__
auto exitListener = registerSignalListener();

#endif
int rv = EXIT_FAILURE;

try {
Expand All @@ -78,10 +79,13 @@ int main(int argc,
app.runAsync();
std::cerr << "subttxrend-app started" << std::endl;

auto exitRequested = exitListener.get();
std::cerr << "subttxrend-app signaled to exit" << std::endl;
#ifndef __APPLE__
auto signalNum = exitListener.get();
std::cerr << "subttxrend-app signaled (" << signalNum << ") to exit" << std::endl;
#else // __APPLE__
app.startBlockingApplicationWindow();
#endif
app.quit();

rv = EXIT_SUCCESS;
}
catch (std::exception const& e)
Expand Down
85 changes: 58 additions & 27 deletions subttxrend-app/x86_builder/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ function build_project_cmake {

cmake \
-DCMAKE_INSTALL_PREFIX=$3/usr/local \
-DCMAKE_MODULE_PATH=$3/usr/local/share/cmake/Modules \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_FIND_ROOT_PATH=$3 \
-DCMAKE_INSTALL_NAME_DIR=$3/usr/local/lib \
-DCMAKE_CXX_FLAGS="-DPC_BUILD" \
$4 \
$1
Expand Down Expand Up @@ -146,7 +148,12 @@ function build_tests {
mkdir -p $2
pushd $2

cmake -DCMAKE_INSTALL_PREFIX=$3/usr/local -DCMAKE_BUILD_TYPE=Debug -DCMAKE_FIND_ROOT_PATH=$3 $4 $1
cmake -DCMAKE_INSTALL_PREFIX=$3/usr/local \
-DCMAKE_MODULE_PATH=$3/usr/local/share/cmake/Modules \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_FIND_ROOT_PATH=$3 \
$4 \
$1
make $PARALLEL_JOBS_OPT

if cat Makefile | egrep "\binstall\b" 2> /dev/null
Expand Down Expand Up @@ -177,6 +184,28 @@ function run_tests_coverage {
popd
}

function build_components {
build_project_cmake $BASE_DIR/src/rdklogger build/rdklogger $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-common build/subttxrend-common $INSTALL_DIR "${SUBTTXREND_COMMON_DFLAGS}"
build_project_cmake $AV_PROJECTS_DIR/ttxdecoder build/ttxdecoder $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/dvbsubdecoder build/dvbsubdecoder $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-protocol build/subttxrend-protocol $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-socksrc build/subttxrend-socksrc $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-dbus build/subttxrend-dbus $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-gfx build/subttxrend-gfx $INSTALL_DIR -DWITH_OPENGL=1
build_project_cmake $AV_PROJECTS_DIR/subttxrend-dvbsub build/subttxrend-dvbsub $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-ttxt build/subttxrend-ttxt $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-ttml build/subttxrend-ttml $INSTALL_DIR "${SUBTTXREND_TTML_DFLAGS}"
build_project_cmake $AV_PROJECTS_DIR/subttxrend-webvtt build/subttxrend-webvtt $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-scte build/subttxrend-scte $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-cc build/subttxrend-cc $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-ctrl build/subttxrend-ctrl $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-app build/subttxrend-app $INSTALL_DIR -DINSTALL_CONFIG_FILE=OFF
build_project_cmake $AV_PROJECTS_DIR/subttxrend-testapps build/subttxrend-testapps $INSTALL_DIR ""

ls -Rl $INSTALL_DIR
}

#============================================================================
#============================================================================

Expand All @@ -190,15 +219,16 @@ if [ "$#" -lt 1 ] ; then
echo "Example: $0 build"
echo "---------------------------------------------"
echo "Available commands:"
echo "full: clean + build + dotest + run"
echo "clean: clean everything"
echo "build: build everything"
echo "run: run the application"
echo "fast: build with -j8 (jobs) option"
echo "dotest: build, build tests, run tests"
echo "full: clean + build + dotest + run"
echo "clean: clean everything"
echo "build: build everything"
echo "buildwithas: build everything with as clients and lgi transformer enabled"
echo "run: run the application"
echo "fast: build with -j8 (jobs) option"
echo "dotest: build, build tests, run tests"
echo "buildunits $1: build specified unit"
echo "testunits $1: build, build tests, run tests for unit"
echo "doc: build, build docs, show docs warnings"
echo "testunits $1: build, build tests, run tests for unit"
echo "doc: build, build docs, show docs warnings"
echo "---------------------------------------------"
echo ""
exit
Expand Down Expand Up @@ -236,10 +266,18 @@ INSTALL_DIR=$OE_BUILD_DIR/subttxrend-app/x86_builder/build/install
RDK_COMPONENTS_DIR=$ONEMW_ROOT_DIR/components/generic/dvb/
RDK_PATCHES_DIR=$ONEMW_ROOT_DIR/meta-lgi-om-common/meta-rdk/recipes-extended/

UTILS_DFLAGS="-DBUILD_PC=1"
SUBTTXREND_COMMON_DFLAGS="-DBUILD_RDK_REFERENCE=1"
SUBTTXREND_TTML_DFLAGS="-DBUILD_RDK_REFERENCE=1"

#
# export path for .pc for pkg-config
#
if [[ "$OSTYPE" == "darwin"* ]]; then
export PKG_CONFIG_PATH+=$INSTALL_DIR/usr/lib/pkgconfig/:$INSTALL_DIR/usr/local/lib/pkgconfig/:/opt/homebrew/lib/pkgconfig
else
export PKG_CONFIG_PATH+=$INSTALL_DIR/usr/lib/pkgconfig/:$INSTALL_DIR/usr/local/lib/pkgconfig/
fi

if [ "$COMMAND" == "full" ] ; then

Expand All @@ -254,24 +292,15 @@ rm -rf build

elif [ "$COMMAND" == "build" ] ; then

build_project_cmake $BASE_DIR/src/rdklogger build/rdklogger $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-common build/subttxrend-common $INSTALL_DIR -DBUILD_RDK_REFERENCE=1
build_project_cmake $AV_PROJECTS_DIR/ttxdecoder build/ttxdecoder $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/dvbsubdecoder build/dvbsubdecoder $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-protocol build/subttxrend-protocol $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-socksrc build/subttxrend-socksrc $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-dbus build/subttxrend-dbus $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-gfx build/subttxrend-gfx $INSTALL_DIR -DWITH_OPENGL=1
build_project_cmake $AV_PROJECTS_DIR/subttxrend-dvbsub build/subttxrend-dvbsub $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-ttxt build/subttxrend-ttxt $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-ttml build/subttxrend-ttml $INSTALL_DIR -DBUILD_RDK_REFERENCE=1
build_project_cmake $AV_PROJECTS_DIR/subttxrend-webvtt build/subttxrend-webvtt $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-scte build/subttxrend-scte $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-cc build/subttxrend-cc $INSTALL_DIR ""
build_project_cmake $AV_PROJECTS_DIR/subttxrend-app build/subttxrend-app $INSTALL_DIR -DINSTALL_CONFIG_FILE=OFF
build_project_cmake $AV_PROJECTS_DIR/subttxrend-testapps build/subttxrend-testapps $INSTALL_DIR ""

ls -Rl $INSTALL_DIR
build_components

elif [ "$COMMAND" == "buildwithas" ] ; then

UTILS_DFLAGS="-DBUILD_PC=1 -DENABLE_AS=ON"
SUBTTXREND_COMMON_DFLAGS="-DBUILD_RDK_REFERENCE=0"
SUBTTXREND_TTML_DFLAGS="-DBUILD_RDK_REFERENCE=0"

build_components

elif [ "$COMMAND" == "buildunits" ] ; then

Expand Down Expand Up @@ -352,6 +381,7 @@ elif [ "$COMMAND" == "doc" ] ; then
$0 fast

build_doc_cmake build/subttxrend-app
build_doc_cmake build/subttxrend-ctrl
build_doc_cmake build/subttxrend-common
build_doc_cmake build/subttxrend-dbus
build_doc_cmake build/subttxrend-protocol
Expand All @@ -363,6 +393,7 @@ build_doc_cmake build/subttxrend-ttml
build_doc_cmake build/ttxdecoder
build_doc_cmake build/dvbsubdecoder
build_doc_aggregate build/documentation $BASE_DIR/src/doc \
$BASE_DIR/build/subttxrend-ctrl \
$BASE_DIR/build/subttxrend-app \
$BASE_DIR/build/subttxrend-common \
$BASE_DIR/build/subttxrend-dbus \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,11 @@ typedef enum
#define RDK_LOG_TRACE8 RDK_LOG_TRACE
#define RDK_LOG_TRACE9 RDK_LOG_TRACE

#define rdk_dbg_enabled rdk_logger_is_logLevel_enabled

rdk_Error rdk_logger_init(const char* debugConfigFile);

rdk_Error rdk_logger_deinit();

rdk_logger_Bool rdk_dbg_enabled(const char *module,
rdk_logger_Bool rdk_logger_is_logLevel_enabled(const char *module,
rdk_LogLevel level);

void RDK_LOG(rdk_LogLevel level,
Expand Down
2 changes: 1 addition & 1 deletion subttxrend-app/x86_builder/src/rdklogger/src/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ rdk_Error rdk_logger_deinit()
return 0;
}

rdk_logger_Bool rdk_dbg_enabled(const char *module,
rdk_logger_Bool rdk_logger_is_logLevel_enabled(const char *module,
rdk_LogLevel level)
{
return true;
Expand Down
Loading
Loading