Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
70 changes: 53 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,14 @@ pkg_check_modules(LIBDASH REQUIRED libdash)
pkg_check_modules(OPENSSL REQUIRED openssl)
pkg_check_modules(LIBCJSON REQUIRED libcjson)
pkg_check_modules(UUID REQUIRED uuid)

pkg_check_modules(BASECONVERSION REQUIRED libbaseconversion)
pkg_check_modules(PLAYERLOGMANAGER REQUIRED libplayerlogmanager)
pkg_check_modules(PLAYERFBINTERFACE REQUIRED libplayerfbinterface)
pkg_check_modules(PLAYERGSTINTERFACE REQUIRED libplayergstinterface)
pkg_check_modules(SUBTEC REQUIRED libsubtec)

if(CMAKE_TEST_MW)
message("CMAKE_TEST_MW ON")
pkg_check_modules(BASECONVERSION REQUIRED libbaseconversion)
pkg_check_modules(PLAYERLOGMANAGER REQUIRED libplayerlogmanager)
pkg_check_modules(PLAYERFBINTERFACE REQUIRED libplayerfbinterface)
pkg_check_modules(PLAYERGSTINTERFACE REQUIRED libplayergstinterface)
pkg_check_modules(SUBTEC REQUIRED libsubtec)
endif()
if(APPLE)
# libcurl < 8.5 exhibits memory leaks. On Ubuntu 22.04 can't update beyond 7.81.0-1ubuntu1.16 without building from source
pkg_check_modules(CURL REQUIRED libcurl>=8.5)
Expand Down Expand Up @@ -159,7 +160,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/tsb/api)

# Locally built/installed dependencies are here
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.libs/include)

if(CMAKE_TEST_MW)
set(LIBAAMP_DEPENDS
${OS_LD_FLAGS}
${UUID_LINK_LIBRARIES}
Expand All @@ -180,16 +181,43 @@ set(LIBAAMP_DEPENDS
${SUBTEC_LINK_LIBRARIES}
-ldl
)
else()
set(LIBAAMP_DEPENDS
${OS_LD_FLAGS}
${UUID_LINK_LIBRARIES}
${LIBCJSON_LINK_LIBRARIES}
${GSTREAMERBASE_LINK_LIBRARIES}
${GSTREAMER_LINK_LIBRARIES}
${CURL_LINK_LIBRARIES}
${LIBDASH_LINK_LIBRARIES}
${LIBXML2_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${OPENSSL_LIBRARIES}
${GL_DEPENDS}
${AAMP_CLI_LD_FLAGS}
-ldl)
endif()

# TDB needs to bring back for UT.
#include(test/mocks/mocks.cmake NO_POLICY_SCOPE)

if(CMAKE_TEST_MW)
include_directories(${PLAYERFBINTERFACE_INCLUDE_DIRS})
include_directories(${BASECONVERSION_INCLUDE_DIRS})
include_directories(${PLAYERLOGMANAGER_INCLUDE_DIRS})
include_directories(${PLAYERGSTINTERFACE_INCLUDE_DIRS})
include_directories(${SUBTEC_INCLUDE_DIRS})

else()
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/middleware)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/middleware/drm)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/middleware/drm/helper)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/middleware/externals)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/middleware/externals/contentsecuritymanager)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/middleware/playerLogManager)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/middleware/drm/aes)

add_subdirectory(middleware)
endif()
if (CMAKE_INBUILT_AAMP_DEPENDENCIES)
message("Building aamp support libraries")
include_directories(support/aampabr)
Expand Down Expand Up @@ -407,7 +435,11 @@ endif()

set(LIBAAMP_SOURCES "${LIBAAMP_SOURCES}" "${LIBAAMP_MOCK_SOURCES}")
add_library(aamp SHARED ${LIBAAMP_SOURCES})
target_link_libraries(aamp tsb ${LIBAAMP_DEPENDS} ${LIBAAMP_MOCK_DEPENDS})
if(CMAKE_TEST_MW)
target_link_libraries(aamp tsb ${LIBAAMP_DEPENDS} ${LIBAAMP_MOCK_DEPENDS})
else()
target_link_libraries(aamp tsb playergstinterface playerfbinterface ${LIBAAMP_DEPENDS} ${LIBAAMP_MOCK_DEPENDS})
endif()
set_target_properties(aamp PROPERTIES COMPILE_FLAGS "${LIBAAMP_DEFINES} ${OS_CXX_FLAGS}")
set_target_properties(aamp PROPERTIES PUBLIC_HEADER "main_aamp.h")
set_target_properties(aamp PROPERTIES PRIVATE_HEADER "priv_aamp.h")
Expand All @@ -429,13 +461,17 @@ set(AAMP_CLI_SOURCES
test/aampcli/AampcliPrintf.cpp
)
add_executable(aamp-cli ${AAMP_CLI_SOURCES})
target_link_libraries(aamp-cli aamp tsb
${PLAYERFBINTERFACE_LINK_LIBRARIES}
${BASECONVERSION_LINK_LIBRARIES}
${PLAYERLOGMANAGER_LINK_LIBRARIES}
${PLAYERGSTINTERFACE_LINK_LIBRARIES}
${SUBTEC_LINK_LIBRARIES}
${AAMP_CLI_LD_FLAGS} "-lreadline")
if(CMAKE_TEST_MW)
target_link_libraries(aamp-cli aamp tsb
${PLAYERFBINTERFACE_LINK_LIBRARIES}
${BASECONVERSION_LINK_LIBRARIES}
${PLAYERLOGMANAGER_LINK_LIBRARIES}
${PLAYERGSTINTERFACE_LINK_LIBRARIES}
${SUBTEC_LINK_LIBRARIES}
${AAMP_CLI_LD_FLAGS} "-lreadline")
else()
target_link_libraries(aamp-cli aamp tsb playergstinterface playerfbinterface ${AAMP_CLI_LD_FLAGS} "-lreadline")
endif()
#aamp-cli is not an ideal standalone app. It uses private aamp instance for debugging purposes

set_target_properties(aamp-cli PROPERTIES COMPILE_FLAGS "${LIBAAMP_DEFINES} ${OS_CXX_FLAGS}")
Expand Down
5 changes: 5 additions & 0 deletions middleware/.github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
* @rdkcentral/mw-player-int-maintainers
51 changes: 51 additions & 0 deletions middleware/.github/workflows/L1-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: L1 tests

on:
pull_request:
branches: [develop, main]
paths: ['**/*.c', '**/*.cpp', '**/*.cc', '**/*.cxx', '**/*.h', '**/*.hpp', '**/*.sh']

jobs:
execute-unit-tests-on-pr:
name: Runs all unit tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: native build
run: yes | ./install-middleware.sh -s subtec

# Run L1 tests
- name: Run unit tests with coverage
working-directory: ./test/utests
run: ./run.sh -c

# Publish test results
- name: Publish L1 test results
uses: dorny/test-reporter@v1
with:
name: Unit Test Results
path: test/utests/build/ctest-results.xml
reporter: java-junit

# Upload artifact (test/utests/build/ctest-results.xml)
- name: Upload test result file (test/utests)
uses: actions/upload-artifact@v4
with:
name: ctest-results-middleware-utests-${{ github.run_id }}
path: test/utests/build/ctest-results.xml

- name: Upload CombinedCoverage report
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
name: CombinedCoverage-report
path: test/utests/build/CombinedCoverage/
if-no-files-found: warn

# Show failure
- name: Show failure details (if any)
# if: failure()
run: tail -n 50 test/utests/build/ctest-results.xml || true
20 changes: 20 additions & 0 deletions middleware/.github/workflows/cla.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "CLA"

permissions:
contents: read
pull-requests: write
actions: write
statuses: write

on:
issue_comment:
types: [created]
pull_request_target:
types: [opened, closed, synchronize]

jobs:
CLA-Lite:
name: "Signature"
uses: rdkcentral/cmf-actions/.github/workflows/cla.yml@v1
secrets:
PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_ASSISTANT }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Fossid Stateless Diff Scan

on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read
pull-requests: read

jobs:
call-fossid-workflow:
if: ${{ ! github.event.pull_request.head.repo.fork }}
uses: rdkcentral/build_tools_workflows/.github/workflows/[email protected]
secrets:
FOSSID_CONTAINER_USERNAME: ${{ secrets.FOSSID_CONTAINER_USERNAME }}
FOSSID_CONTAINER_PASSWORD: ${{ secrets.FOSSID_CONTAINER_PASSWORD }}
FOSSID_HOST_USERNAME: ${{ secrets.FOSSID_HOST_USERNAME }}
FOSSID_HOST_TOKEN: ${{ secrets.FOSSID_HOST_TOKEN }}
29 changes: 29 additions & 0 deletions middleware/.github/workflows/native-full-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build Component in Native Environment

on:
pull_request:
branches: [ develop , main ]
paths: ['**/*.c', '**/*.cpp', '**/*.cc', '**/*.cxx', '**/*.h', '**/*.hpp', '**/*.sh']

jobs:
build-player-interface-on-pr:
name: Build player-interface component in github rdkcentral
runs-on: ubuntu-latest
container:
image: ghcr.io/rdkcentral/docker-rdk-ci:latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: native build
run: |
apt-get update
apt-get install -y sudo
sudo apt-get install -y python3-pip
sudo apt remove -y meson || true
sudo pip3 install --upgrade meson
hash -r
yes | ./install-middleware.sh -s subtec
env:
GITHUB_TOKEN: ${{ secrets.RDKCM_RDKE }}
2 changes: 2 additions & 0 deletions middleware/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/
.libs/
Loading
Loading