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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

cmake_minimum_required(VERSION 3.5)
project(Playergstinterface)

set(CMAKE_CXX_STANDARD 14)

find_package(PkgConfig REQUIRED)
pkg_check_modules(GST REQUIRED gstreamer-plugins-base-1.0)
pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0)
Expand Down Expand Up @@ -72,15 +75,24 @@ if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
execute_process (
COMMAND bash -c "xcrun --show-sdk-path" OUTPUT_VARIABLE osxSdkPath OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(OS_CXX_FLAGS "${OS_CXX_FLAGS} -std=c++14 -g -x objective-c++ -Wno-inconsistent-missing-override -F${osxSdkPath}/System/Library/Frameworks")
set(OS_CXX_FLAGS "${OS_CXX_FLAGS} -g -x objective-c++ -Wno-inconsistent-missing-override -F${osxSdkPath}/System/Library/Frameworks")
set(OS_LD_FLAGS "${OS_LD_FLAGS} -F${osxSdkPath}/System/Library/Frameworks -framework Cocoa -L${osxSdkPath}/../MacOSX.sdk/usr/lib -L.libs/lib -L/usr/local/lib/")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isysroot ${osxSdkPath}/../MacOSX.sdk -I/usr/local/include")
string(STRIP ${OS_LD_FLAGS} OS_LD_FLAGS)
pkg_check_modules(OPENSSL REQUIRED openssl)
set(LIBPLAYERGSTINTERFACE_DEPENDS ${LIBPLAYERGSTINTERFACE_DEPENDS} "${OPENSSL_LINK_LIBRARIES}")
link_directories(${OPENSSL_LIBRARY_DIRS})
link_directories(${GSTREAMER_LIBRARY_DIRS})
set(CMAKE_THREAD_LIBS_INIT "-lpthread")
set(CMAKE_HAVE_THREADS_LIBRARY 1)
pkg_check_modules(GLIB REQUIRED GLib-2.0)
include_directories(${GLIB_INCLUDE_DIRS})
pkg_check_modules(LIBCJSON REQUIRED libcjson)
include_directories(${LIBCJSON_INCLUDE_DIRS})
set(LIBPLAYERGSTINTERFACE_DEPENDS ${LIBPLAYERGSTINTERFACE_DEPENDS} "${LIBCJSON_LINK_LIBRARIES}")
# This is .libs/lib/pkgconfig which picks up all locally built dependencies
link_directories(${LIBCJSON_LIBRARY_DIRS})
#link_directories(".libs/lib")

# XCode build flags. Even when using CLANG, the GCC name is required to enable the check
set(CMAKE_XCODE_ATTRIBUTE_GCC_WARN_UNUSED_FUNCTION "YES")
Expand Down
799 changes: 799 additions & 0 deletions baseConversion/test/test_l1__base64.cpp

Large diffs are not rendered by default.

510 changes: 510 additions & 0 deletions baseConversion/test/test_l1_base16.cpp

Large diffs are not rendered by default.

1,943 changes: 1,943 additions & 0 deletions closedcaptions/subtec/test/test_l1_PlayerSubtecCCManager.cpp

Large diffs are not rendered by default.

81 changes: 81 additions & 0 deletions closedcaptions/test/test_l1_CCTrackInfo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@

/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2025 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* @file test_l1_CCTrackInfo.cpp
* @page CCTrackInfo Level 1 Tests
*
* ## Module's Role
* This module includes Level 1 functional tests (success and failure scenarios).
* This is to ensure that the CCTrackInfo methods meet the requirements.
*
* **Pre-Conditions:** None @n
* **Dependencies:** None @n
*
*/

#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <stdio.h>
#include "CCTrackInfo.h"


// Test Case: Verify default constructor initializes instreamId and language without exceptions
/**
* @brief Verify that default CCTrackInfo constructor initializes instreamId and language members to empty strings without throwing any exceptions.
*
* This test creates an instance of CCTrackInfo using its default constructor and verifies that the members instreamId and language are initialized as empty strings. It ensures that the construction process does not throw any exceptions and that the object's default state is valid.
*
* **Test Group ID:** Basic: 01@n
* **Test Case ID:** 001@n
* **Priority:** High@n
* @n
* **Pre-Conditions:** None@n
* **Dependencies:** None@n
* **User Interaction:** None@n
* @n
* **Test Procedure:**@n
* | Variation / Step | Description | Test Data | Expected Result | Notes |
* | :----: | --------- | ---------- |-------------- | ----- |
* | 01 | Invoke default constructor of CCTrackInfo and verify instreamId and language are empty strings | input: none, output: instreamId = "", language = "" | Default constructed object has instreamId = "" and language = "" verified using EXPECT_EQ | Should Pass |
*/
TEST(CCTrackInfo, VerifyDefaultConstructorInitializesInstreamIdAndLanguageWithoutExceptions) {
std::cout << "Entering VerifyDefaultConstructorInitializesInstreamIdAndLanguageWithoutExceptions test" << std::endl;

// Invoke the default constructor of CCTrackInfo
std::cout << "Invoking CCTrackInfo default constructor" << std::endl;
CCTrackInfo ccTrackInfo;
std::cout << "After construction: instreamId = \"" << ccTrackInfo.instreamId << "\", language = \"" << ccTrackInfo.language << "\"" << std::endl;

// Debug logs for expected default values from getters (here using direct access members)
std::cout << "Retrieved value of instreamId: \"" << ccTrackInfo.instreamId << "\"" << std::endl;
std::cout << "Retrieved value of language: \"" << ccTrackInfo.language << "\"" << std::endl;

// Validate that the default constructed values are empty strings
EXPECT_EQ(ccTrackInfo.instreamId, "");
EXPECT_EQ(ccTrackInfo.language, "");

std::cout << "Exiting VerifyDefaultConstructorInitializesInstreamIdAndLanguageWithoutExceptions test" << std::endl;
}

int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
Loading
Loading