Conversation
RDKEMW-9809 : Latest AAMP sync
To resolve MacOS compilation failure
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
RDKEMW-11934 : Fix build failure in MAC
main merge
RDKEMW-13297:Player-interface component separation phase1
|
I have read the CLA Document and I hereby sign the CLA 2 out of 3 committers have signed the CLA. |
There was a problem hiding this comment.
Pull request overview
This PR appears to consolidate and modernize the middleware build/test setup while refactoring some platform-specific behavior into shared implementations (notably AC4 track selection), adding new media/demux data types, and extending DRM + externals interfaces.
Changes:
- Move
SetAC4Tracksfrom per-SoC implementations to a defaultSocInterfaceimplementation. - Update unit test infrastructure (new tests, mocks/fakes expansion, coverage wiring changes, run script updates).
- Introduce new interfaces/types and build packaging improvements (e.g.,
DemuxDataTypes.h, multiplepkg-config.pc.intemplates, various CMake updates).
Reviewed changes
Copilot reviewed 127 out of 140 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| vendor/realtek/RealtekSocInterface.h | Removes SoC-specific AC4 track API override. |
| vendor/realtek/RealtekSocInterface.cpp | Removes SoC-specific AC4 track setter implementation. |
| vendor/default/DefaultSocInterface.h | Removes DefaultSoC AC4 track API override. |
| vendor/default/DefaultSocInterface.cpp | Removes DefaultSoC AC4 track setter; doc tweak. |
| vendor/brcm/BrcmSocInterface.h | Removes BRCM AC4 stub override; whitespace tweak. |
| vendor/brcm/BrcmSocInterface.cpp | Trailing newline change. |
| vendor/amlogic/AmlogicSocInterface.h | Removes Amlogic AC4 override; minor whitespace cleanup. |
| vendor/amlogic/AmlogicSocInterface.cpp | Removes Amlogic AC4 setter; whitespace cleanup. |
| vendor/SocInterface.h | Makes SetAC4Tracks non-pure virtual (defaultable). |
| vendor/SocInterface.cpp | Adds default SocInterface::SetAC4Tracks implementation. |
| test/utests/tests/base16Tests/CMakeLists.txt | Coverage handling changed to CodeCoverage module usage. |
| test/utests/tests/TextStyleAttributes/CMakeLists.txt | Coverage wiring modified (currently conditional changed). |
| test/utests/tests/PluginsTests/CMakeLists.txt | Major CMake simplification + fake source inclusion (currently has variable issues). |
| test/utests/tests/PlayerUtilsTests/PlayerUtilsTests.cpp | Adds gtest main for PlayerUtils test suite. |
| test/utests/tests/PlayerUtilsTests/CMakeLists.txt | Adds new PlayerUtils test target. |
| test/utests/tests/PlayerExternalsRdkTests/PlayerExternalsRdkInterfaceTests.cpp | Adds gtest main for externals RDK interface tests. |
| test/utests/tests/PlayerExternalsRdkTests/CMakeLists.txt | Renames/reworks externals RDK tests target + sources and linkage. |
| test/utests/tests/OcdmBasicSessionAdapterTests/FunctionalTests.cpp | Test robustness/ordering tweaks for OCDM basic session tests. |
| test/utests/tests/OcdmBasicSessionAdapterTests/CMakeLists.txt | Include path + coverage wiring changes. |
| test/utests/tests/OCDMSessionAdapter/KeyUpdateTests.cpp | Adds new unit tests for usable-key tracking in OCDM session adapter. |
| test/utests/tests/OCDMSessionAdapter/CMakeLists.txt | Adds new key update test source + coverage wiring changes. |
| test/utests/tests/InterfacePlayerTests/InterfacePlayerTests.cpp | Adds gtest main for InterfacePlayer tests. |
| test/utests/tests/InterfacePlayerTests/CMakeLists.txt | New InterfacePlayer test target configuration and linkage. |
| test/utests/tests/GstUtilsTests/GstUtilsTests.cpp | Adds AAC RAW caps test and expands format list test. |
| test/utests/tests/GstUtilsTests/CMakeLists.txt | Coverage wiring changes. |
| test/utests/tests/GstPlayer/PauseOnPlaybackTests.cpp | Test adjustments around frame-step property and sink naming. |
| test/utests/tests/GstPlayer/FunctionalTests.cpp | Removes commented-out legacy configure call; minor commentary. |
| test/utests/tests/GstPlayer/CMakeLists.txt | Simplifies dependencies and fake sources list (currently has a bad path). |
| test/utests/tests/GstHandlerControlTests/CMakeLists.txt | Coverage wiring changes. |
| test/utests/tests/DrmUrlTests/CMakeLists.txt | Updates include paths (middleware layout) + coverage + simulator define. |
| test/utests/tests/DrmSessionManagerTests/DrmSessionManagerTests.cpp | Copyright year bump. |
| test/utests/tests/DrmSessionManagerTests/CMakeLists.txt | Adds new DrmSessionManager test target. |
| test/utests/tests/DrmSecureClient/CMakeLists.txt | Simplifies coverage + link logic. |
| test/utests/tests/DrmOcdm/DrmSessionFactoryTests.cpp | Removes large test file. |
| test/utests/tests/DrmOcdm/DrmMemorySystemTests.cpp | Removes large test file. |
| test/utests/tests/DrmOcdm/DrmHelperTests.cpp | Removes additional tests (mostly verbose/console-driven). |
| test/utests/tests/DrmOcdm/CMakeLists.txt | Reduces test list/sources; adds HLS DRM define; coverage wiring changes. |
| test/utests/tests/DrmAes/CMakeLists.txt | Removes DrmAes test target configuration. |
| test/utests/tests/CMakeLists.txt | Updates test subdirectory list (adds new targets, removes old). |
| test/utests/tests/Base64PLAYER/CMakeLists.txt | Coverage wiring changes. |
| test/utests/tests/Base64PLAYER/Base64Tests.cpp | Updates base64 decode calls to new signature with input length. |
| test/utests/run.sh | Updates build env var naming and adds USE_DS_EVENT_SUPPORTED cmake option. |
| test/utests/mocks/MockSocInterface.h | Adds a new SocInterface-related mock header. |
| test/utests/mocks/MockPlayerConfig.h | Fixes header guard naming to PLAYER_* variant. |
| test/utests/mocks/MockPacketSender.h | Removes mock packet sender header. |
| test/utests/mocks/MockOpenCdmSessionAdapter.h | Adds methods/state to OCDM session adapter mock. |
| test/utests/mocks/MockHlsDrmSession.h | Removes HLS DRM session mock header. |
| test/utests/mocks/MockGstUtils.h | Extends GstUtils mock interface with buffer creation API. |
| test/utests/mocks/MockGStreamer.h | Adds extra mocked functions and formatting tweaks. |
| test/utests/mocks/MockGLib.h | Adds more GLib mock surface area (signals + g_object_get/set overloads). |
| test/utests/mocks/MockDrmSessionManager.h | Replaces incorrect content with an actual mock class header. |
| test/utests/mocks/MockDrmSessionFactory.h | Adds a DrmSessionFactory mock interface/header. |
| test/utests/mocks/MockDrmSession.h | Updates mock DrmSession class (currently introduces a compile issue). |
| test/utests/mocks/MockDrmHelper.h | Renames header guard and adjusts mock method qualifiers. |
| test/utests/fakes/Fakeopencdmsessionadapter.cpp | Delegates more behavior to mock; returns global empty usable-keys vector. |
| test/utests/fakes/FakeSocInterface.cpp | Updates fake implementations to align with moved AC4 behavior and other stubs. |
| test/utests/fakes/FakePlayerExternalsRdkInterface.cpp | Adds a standalone fake PlayerExternalsRdkInterface implementation for tests. |
| test/utests/fakes/FakePacketSender.cpp | Removes fake PacketSender implementation. |
| test/utests/fakes/FakeGstUtils.cpp | Adds mock delegation for new GstUtils APIs. |
| test/utests/fakes/FakeGStreamer.cpp | Adds mock delegation for additional gstreamer APIs. |
| test/utests/fakes/FakeGLib.cpp | Adds mock delegation for more properties/signals/g_object_get. |
| test/utests/fakes/FakeDrmSessionFactory.cpp | Adds fake DrmSessionFactory delegating to mock (currently symbol mismatch). |
| test/utests/fakes/FakeDRMSessionManager.cpp | Adds fake DrmSessionManager delegating select calls to a mock. |
| test/utests/fakes/FakeCrypto.cpp | Removes OpenSSL EVP stubs. |
| test/utests/fakes/FakeContentSecurityManagerSession.cpp | Adds fake ContentSecurityManagerSession implementation. |
| test/utests/fakes/FakeContentSecurityManager.cpp | Adds fake ContentSecurityManager implementation. |
| test/utests/fakes/FakeBase64.cpp | Replaces an incorrect gtest main with a base64 stub implementation. |
| test/utests/fakes/CMakeLists.txt | Adds externals/rdk include dir; minor formatting. |
| test/utests/drm/mocks/MockOpenCdm.h | Renames header guard to PLAYER_* variant. |
| test/utests/cmake_exclude_file.list | Adds a shared coverage exclude list file for utests. |
| test/utests/ReadMe.md | Updates microtests documentation and coverage/run instructions. |
| test/utests/CMakeLists.txt | Updates utests deps (adds OpenSSL); adjusts pkg-config modules (currently incorrect mapping). |
| subtec/subtecparser/TextStyleAttributes.h | Introduces Doxygen tag typos (@patam). |
| scripts/taglib_compat.h | Adds TagLib 2.x compatibility header for build integration. |
| scripts/install_subtec.sh | Improves gdbus-codegen handling and robustness across OSes. |
| scripts/install_options.sh | Updates default branch name. |
| scripts/install_gstreamer.sh | Adjusts gst-plugins-good build dir logic and injects TagLib compat include. |
| playerLogManager/CMakeLists.txt | Adds project versioning, default install prefix, and pkg-config generation/install. |
| playerJsonObject/PlayerJsonObject.cpp | Updates base64 URL decode padding handling to call new decode signature. |
| playerJsonObject/CMakeLists.txt | Adds project versioning, default install prefix, and pkg-config generation/install. |
| pkgconfig/libsubtec_connector.pc.in | Adds new pkg-config template for subtec_connector. |
| pkgconfig/libsubtec.pc.in | Adds new pkg-config template for subtec. |
| pkgconfig/libplayerlogmanager.pc.in | Adds new pkg-config template for playerlogmanager. |
| pkgconfig/libplayerjsonobject.pc.in | Adds new pkg-config template for playerjsonobject. |
| pkgconfig/libplayergstinterface.pc.in | Adds new pkg-config template for playergstinterface. |
| pkgconfig/libplayerfbinterface.pc.in | Adds new pkg-config template for playerfbinterface. |
| pkgconfig/libbaseconversion.pc.in | Adds new pkg-config template for baseconversion. |
| install-middleware.sh | Adds glib install step and minor cleanup. |
| gst-plugins/gstinit.cpp | Removes version strings from plugin registration logging. |
| gst-plugins/gst_subtec/CMakeLists.txt | Updates C++ standard and simplifies platform linking logic. |
| gst-plugins/CMakeLists.txt | Updates gstreamer deps and flags (currently incorrect pkg-config module mapping). |
| externals/rdk/PlayerExternalsRdkInterface.h | Adds DS event support hooks and new power/fake-tune callback API. |
| externals/rdk/PlayerExternalsRdkInterface.cpp | Implements DS event registration/unregistration and new power/fake-tune APIs. |
| externals/rdk/IIarm/DeviceIARMInterface.h | Formatting/cleanup. |
| externals/rdk/IIarm/DeviceIARMInterface.cpp | Adds optional pre-init decoding + power controller integration; updates base64 decode calls. |
| externals/contentsecuritymanager/SecManagerThunder.cpp | Fixes license header typo; updates base64 decode call signature. |
| externals/contentsecuritymanager/IFirebolt/ContentProtectionFirebolt.cpp | Fixes license header typo; updates base64 decode call signature. |
| externals/contentsecuritymanager/ContentSecurityManagerSession.cpp | Fixes license header typo. |
| externals/contentsecuritymanager/ContentSecurityManager.cpp | Fixes license header typo. |
| externals/PlayerExternalsInterfaceBase.h | Adds power/fake-tune callback API. |
| externals/PlayerExternalsInterface.h | Implements new API stubs for fake externals; adds IsDevicePropertiesPresent(). |
| externals/PlayerExternalsInterface.cpp | Implements new power/fake-tune API forwarding and IsDevicePropertiesPresent(). |
| externals/CMakeLists.txt | Adds versioning, default install prefix, pkg-config generation; renames RFC option var. |
| drm/processProtectionHls.cpp | Updates base64 decode call signature. |
| drm/ocdm/opencdmsessionadapter.h | Marks getUsableKeys() as override. |
| drm/ocdm/opencdmsessionadapter.cpp | Improves key update handling, usable key tracking, and adds new error state on session create. |
| drm/helper/WidevineDrmHelper.cpp | Avoids logging raw input; adds debug logging of stored key IDs. |
| drm/DrmUtils.h | Adds MW_DRM_SESSION_CREATE_FAILED error code. |
| drm/DrmUtils.cpp | Fixes spelling in comment (“Destructor”). |
| drm/DrmSessionManager.h | Adjusts member visibility and mutex placement; removes inline test helper. |
| drm/DrmSessionManager.cpp | Deletes m_drmConfigParam in destructor; adds better error logging and key normalization. |
| drm/DrmSession.h | Adds KEY_ERROR_SESSION_CREATE_FAILED state. |
| drm/DrmSession.cpp | Fixes double semicolon. |
| closedcaptions/rialto/PlayerRialtoCCManager.cpp | Preserves CC track format and prefixes numeric tracks for Rialto. |
| closedcaptions/PlayerCCManager.h | Updates RestoreCC signature and stores track format. |
| closedcaptions/PlayerCCManager.cpp | Tracks CC format and restores correct default behavior. |
| baseConversion/_base64.h | Removes old 2-arg decode declaration (keeps length-explicit API). |
| baseConversion/_base64.cpp | Removes old 2-arg decode wrapper implementation. |
| baseConversion/CMakeLists.txt | Adds versioning, default install prefix, and pkg-config generation/install. |
| aamp_sync_cid.txt | Adds sync CID marker file. |
| PlayerUtils.cpp | Updates base64 URL decode padding handling to call new decode signature. |
| OSX/OSxSetup.md | Updates clone instructions/branch name. |
| InterfacePlayerRDK.h | Introduces demux sample-based SendHelper, adds stream caps setter, removes useMp4Demux. |
| InterfacePlayerPriv.h | Adds mp4demux playback semantics flag; removes obsolete comment block. |
| GstUtils.h | Adds AAC RAW output format and buffer creation helper declaration. |
| GstUtils.cpp | Adds AAC RAW caps + newline in logs + implements CreateGstBufferWithData. |
| DemuxDataTypes.h | Adds new demux/media structures (samples, codec/protection metadata) with move-only semantics. |
| CMakeLists.txt | Adds versioning, default install prefix, installs new header, and generates multiple pkg-config files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0) | ||
| pkg_check_modules(GSTREAMERBASE REQUIRED gstreamer-base-1.0) | ||
| pkg_check_modules(GSTREAMERAPP REQUIRED gstreamer-app-1.0) | ||
| pkg_check_modules(GSTREAMERBASE REQUIRED gstreamer-app-1.0) | ||
| pkg_check_modules(GLIB REQUIRED glib-2.0) |
There was a problem hiding this comment.
pkg_check_modules(GSTREAMERBASE REQUIRED gstreamer-app-1.0) looks incorrect: it binds the app pkg-config module to the GSTREAMERBASE_* variables. This will make GSTREAMERBASE_INCLUDE_DIRS/LINK_LIBRARIES refer to gstreamer-app, and break any code expecting gstreamer-base. Define separate modules (e.g. GSTREAMERAPP for gstreamer-app-1.0 and GSTREAMERBASE for gstreamer-base-1.0) and update consumers accordingly.
| @@ -84,8 +80,9 @@ set(PLAYER_SOURCES | |||
| add_executable(${EXEC_NAME} | |||
| ${TEST_SOURCES} | |||
| ${MOCK_SOURCES} | |||
| ${FAKE_SOURCES} | |||
| ${PLAYER_SOURCES}) | |||
There was a problem hiding this comment.
The fake source list variables are inconsistent/typoed: UTEST_ROOT is undefined (should be UTESTS_ROOT), FAKE_SOURCE is set but add_executable() uses ${FAKE_SOURCES}. As written, configuration will fail or the fake source won’t be compiled/linked. Use a single consistent variable name (e.g. FAKE_SOURCES) and the correct root variable.
| #include "DrmSessionFactory.h" | ||
| #include "MockDrmSessionFactory.h" | ||
|
|
||
| // Global pointer to the mock DrmSessionFactory instance | ||
| MockDrmSessionFactory* g_MockDrmSessionFactory = nullptr; | ||
|
|
||
| /** | ||
| * @brief Fake implementation of GetDrmSession | ||
| * | ||
| * If g_MockDrmSessionFactory is set, delegates to the mock. | ||
| * Otherwise returns nullptr. | ||
| */ | ||
| DrmSession* DrmSessionFactory::GetDrmSession(DrmHelperPtr drmHelper, DrmCallbacks* drmCallbacks) | ||
| { | ||
| if (g_MockDrmSessionFactory) | ||
| { | ||
| return g_MockDrmSessionFactory->GetDrmSession(drmHelper, drmCallbacks); | ||
| } |
There was a problem hiding this comment.
MockDrmSessionFactory.h declares extern MockDrmSessionFactory *g_mockDrmSessionFactory;, but this file defines and uses g_MockDrmSessionFactory (different name/case). Tests setting g_mockDrmSessionFactory won’t affect DrmSessionFactory::GetDrmSession(), and you may also get an undefined symbol for g_mockDrmSessionFactory. Rename to the declared symbol and use it consistently.
| if (CMAKE_XCODE_BUILD_SYSTEM) | ||
| include(CodeCoverage) | ||
| APPEND_COVERAGE_COMPILER_FLAGS() | ||
| endif() |
There was a problem hiding this comment.
Coverage flags are being appended under if (CMAKE_XCODE_BUILD_SYSTEM) instead of if (COVERAGE_ENABLED), unlike other test targets. This means -DCOVERAGE_ENABLED=ON won’t actually enable coverage for this target unless you happen to be using the Xcode generator. Switch this condition back to COVERAGE_ENABLED (and keep the Xcode schema block separate if needed).
| * @patam[out] colorOut - color option for the input value | ||
| * @return int - 0 for success, -1 for failure |
There was a problem hiding this comment.
Doxygen tag typo: @patam[out] should be @param[out].
| * @patam[out] edgeTypeOut - opacity option for the input value | ||
| * @return int - 0 for success, -1 for failure |
There was a problem hiding this comment.
Doxygen tag typo: @patam[out] should be @param[out].
| message("using gstreamer-1.0") | ||
| pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0) | ||
| pkg_check_modules(GSTREAMERBASE REQUIRED gstreamer-app-1.0) | ||
| pkg_check_modules(GSTREAMERVIDEO REQUIRED gstreamer-video-1.0) | ||
|
|
There was a problem hiding this comment.
pkg_check_modules(GSTREAMERBASE REQUIRED gstreamer-app-1.0) appears to be using the gstreamer-app pkg-config package under the GSTREAMERBASE_* variable namespace. This will cause ${GSTREAMERBASE_LIBRARIES/INCLUDE_DIRS} to resolve to the wrong component. Use gstreamer-base-1.0 for GSTREAMERBASE (and define a separate GSTREAMERAPP for gstreamer-app-1.0 if needed).
| MOCK_METHOD(void, generateDRMSession, (const uint8_t *f_pbInitData, uint32_t f_cbInitData, std::string &customData), (override)); | ||
| MOCK_METHOD(DrmData*, generateKeyRequest, (std::string& destinationURL, uint32_t timeout), (override)); | ||
| MOCK_METHOD(DrmData*, generateKeyRequest, (string& destinationURL, uint32_t timeout), (override)); | ||
| MOCK_METHOD(int, processDRMKey, (DrmData* key, uint32_t timeout), (override)); | ||
| MOCK_METHOD(int, decrypt, (GstBuffer* keyIDBuffer, GstBuffer* ivBuffer, GstBuffer* buffer, unsigned subSampleCount, GstBuffer* subSamplesBuffer, GstCaps* caps), (override)); | ||
| MOCK_METHOD(int, decrypt, (const uint8_t *f_pbIV, uint32_t f_cbIV, const uint8_t *payloadData, uint32_t payloadDataSize, uint8_t **ppOpaqueData), (override)); | ||
| MOCK_METHOD(KeyState, getState, (), (override)); | ||
| MOCK_METHOD(void, clearDecryptContext, (), (override)); | ||
| #if defined(USE_OPENCDM_ADAPTER) | ||
| MOCK_METHOD(void, setKeyId, (const std::vector<uint8_t>& keyId), (override)); | ||
| #endif | ||
| MOCK_METHOD(const std::vector<std::vector<uint8_t>>&, getUsableKeys, (), (const, override)); |
There was a problem hiding this comment.
generateKeyRequest uses string& destinationURL but string is not declared in this header (should be std::string). This will not compile unless some unrelated header injects using string = ... into the global namespace. Change the signature to std::string& (and include <string> if not already provided via includes).
| set(FAKE_SOURCES ${UTESTS_ROOT}/fakes/FakeGStreamer.cpp | ||
| ${UTESTS_ROOT}fakes/FakeGLib.cpp | ||
| ${UTESTS_ROOT}/fakes/FakeGstUtils.cpp | ||
| ${UTESTS_ROOT}/fakes/FakeSocInterface.cpp) | ||
| ${UTESTS_ROOT}fakes/FakeGLib.cpp) | ||
|
|
There was a problem hiding this comment.
${UTESTS_ROOT}fakes/FakeGLib.cpp is missing a path separator after UTESTS_ROOT, so CMake will look for a non-existent path like ../../fakes... concatenated. This should likely be ${UTESTS_ROOT}/fakes/FakeGLib.cpp.
| curl -o gst-plugins-good-$DEFAULT_GSTVERSION.tar.xz https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-$DEFAULT_GSTVERSION.tar.xz | ||
| tar -xvzf gst-plugins-good-$DEFAULT_GSTVERSION.tar.xz | ||
| cd gst-plugins-good-$DEFAULT_GSTVERSION | ||
|
|
||
| patch -p1 < ../../OSx/patches/0009-qtdemux-tm_gst-1.16.patch | ||
| patch -p1 < ../../OSx/patches/0013-qtdemux-remove-override-segment-event_gst-1.16.patch | ||
| patch -p1 < ../../OSx/patches/0014-qtdemux-clear-crypto-info-on-trak-switch_gst-1.16.patch | ||
| patch -p1 < ../../OSx/patches/0021-qtdemux-tm-multiperiod_gst-1.16.patch | ||
| sed -in 's/gstglproto_dep\x27], required: true/gstglproto_dep\x27], required: false/g' meson.build | ||
|
|
||
|
|
||
| # | ||
| # NOTE: Don't casually change the order of PKG_CONFIG assignment otherwise the build will fail, or it will build OK, but fail at runtime | ||
| # with a gstreamer error. Is this a problem with pkg-config or meson, don't know. | ||
| # | ||
| # These particular packages are not found with the default search path for some reason, have to look them up. | ||
| PKG_CONFIG="$(install_pkgs_pkgconfig_darwin_fn orc)" | ||
| PKG_CONFIG+=":$(install_pkgs_pkgconfig_darwin_fn flac)" | ||
| PKG_CONFIG+=":$(install_pkgs_pkgconfig_darwin_fn mpg123)" | ||
| PKG_CONFIG+=":$(install_pkgs_pkgconfig_darwin_fn speex)" | ||
| PKG_CONFIG+=":$(install_pkgs_pkgconfig_darwin_fn taglib)" | ||
| PKG_CONFIG+=":$(install_pkgs_pkgconfig_darwin_fn jpeg-turbo)" | ||
|
|
||
| PKG_CONFIG+=":/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig" | ||
| if [[ $ARCH == "x86_64" ]]; then | ||
| PKG_CONFIG+=":/usr/local/lib/pkgconfig" | ||
| elif [[ $ARCH == "arm64" ]]; then | ||
| PKG_CONFIG+=":/opt/homebrew/lib/pkgconfig" | ||
| fi | ||
|
|
||
| echo "Building gst-plugins-good with --pkg-config path $PKG_CONFIG..." | ||
| meson --pkg-config-path="${PKG_CONFIG}" build | ||
| ninja -C build | ||
| sudo ninja -C build install | ||
|
|
||
| BUILD_DIR=".libs/gst-plugins-good-${DEFAULT_GSTVERSION}/build" | ||
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| ABS_COMPAT="${SCRIPT_DIR}/taglib_compat.h" | ||
|
|
||
| echo "Building gst-plugins-good in ${BUILD_DIR}" | ||
| if [ -d "${BUILD_DIR}" ]; then | ||
| echo "Existing build directory ${BUILD_DIR} detected; running 'meson setup' with --wipe (this will reset the build directory)." | ||
| meson setup "${BUILD_DIR}" --wipe --pkg-config-path="${PKG_CONFIG}" \ | ||
| -Dcpp_args="-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST -include ${ABS_COMPAT}" | ||
| else | ||
| meson setup "${BUILD_DIR}" --pkg-config-path="${PKG_CONFIG}" \ | ||
| -Dcpp_args="-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST -include ${ABS_COMPAT}" | ||
| fi | ||
| ninja -C "${BUILD_DIR}" -v | ||
| sudo ninja -C "${BUILD_DIR}" install |
There was a problem hiding this comment.
This function downloads and builds third-party gst-plugins-good code via curl and then installs it system-wide with sudo ninja ... install without any checksum or signature verification of the tarball. If an attacker can tamper with the download channel (e.g. via DNS/HTTPS compromise of gstreamer.freedesktop.org) or the tarball on the remote host, they can inject arbitrary code that will be compiled and executed as root during installation. To harden the supply chain, pin the source to an immutable identifier and validate it (e.g. verify a published SHA256 or GPG signature) before building and running privileged install steps, or prefer using the system package manager where possible.
No description provided.