Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8695df1
Integerate LLM teamgiven test cases into dev_pli branch
rkandh015 Mar 12, 2026
d8bf7d7
Integerate LLM teamgiven test cases into dev_pli branch
rkandh015 Mar 12, 2026
761c10a
Merge branch 'develop' into feature/RDKEMW-14462
rkandh015 Mar 13, 2026
1587852
Merge branch 'feature/dev_sprint_pli' into feature/RDKEMW-14462
rekhap2kandhavelan Mar 13, 2026
f30f774
Potential fix for pull request finding
rekhap2kandhavelan Mar 13, 2026
6c19e5c
Potential fix for pull request finding
rekhap2kandhavelan Mar 13, 2026
c87f31b
Merge branch 'feature/RDKEMW-14462' of https://github.com/rdkcentral/…
rkandh015 Mar 13, 2026
21c4cf5
Update test/utests/run.sh
rekhap2kandhavelan Apr 2, 2026
0a91e52
Update CMakeLists.txt
rekhap2kandhavelan Apr 2, 2026
9f02ba9
Update CMakeLists.txt
rekhap2kandhavelan Apr 2, 2026
fb96c72
Update CMakeLists.txt
rekhap2kandhavelan Apr 2, 2026
fc2696d
Update CMakeLists.txt
rekhap2kandhavelan Apr 2, 2026
f29ca8a
Update CMakeLists.txt
rekhap2kandhavelan Apr 2, 2026
2008425
Update CMakeLists.txt
rekhap2kandhavelan Apr 2, 2026
bcd8096
Update L1-tests.yml
rekhap2kandhavelan Apr 2, 2026
3b40165
Update L1-tests.yml
rekhap2kandhavelan Apr 3, 2026
42dce52
Update L1-tests.yml
rekhap2kandhavelan Apr 3, 2026
33a8050
Update GstHandlerControlTests.cpp
rekhap2kandhavelan Apr 3, 2026
eb92508
Enable coverage flags in main build when COVERAGE_ENABLED is set
rkandh015 Apr 3, 2026
2aa5167
Update GstHandlerControlTests.cpp
rekhap2kandhavelan Apr 3, 2026
781ecf6
Merge branch 'feature/RDKEMW-14462' of https://github.com/rdkcentral/…
rkandh015 Apr 3, 2026
9d41228
Add bool constructor overload to InterfacePlayerPriv for compatibility
rkandh015 Apr 3, 2026
cbbdad5
Merge branch 'feature/RDKEMW-14462' of https://github.com/rdkcentral/…
rkandh015 Apr 3, 2026
2c2ceac
Merge branch 'feature/dev_sprint_pli' into feature/RDKEMW-14462
rekhap2kandhavelan Apr 3, 2026
de909e8
Update InterfacePlayerRDK.cpp
rekhap2kandhavelan Apr 3, 2026
6063378
Update InterfacePlayerRDK.cpp
rekhap2kandhavelan Apr 4, 2026
93c0c2f
Restore default constructor declaration in InterfacePlayerPriv
rkandh015 Apr 4, 2026
8f24660
Revert "Restore default constructor declaration in InterfacePlayerPriv"
rkandh015 Apr 4, 2026
c4a4b13
resolved build error
rkandh015 Apr 6, 2026
25b08ba
resolved build error
rkandh015 Apr 6, 2026
e2d882a
Merge branch 'feature/RDKEMW-14462' of https://github.com/rdkcentral/…
rkandh015 Apr 6, 2026
c4ddfaf
Merge branch 'feature/RDKEMW-14462' of https://github.com/rdkcentral/…
rkandh015 Apr 6, 2026
87aa205
Merge branch 'feature/RDKEMW-14462' of https://github.com/rdkcentral/…
rkandh015 Apr 6, 2026
2db1ed0
fix review comments
rkandh015 Apr 7, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/L1-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v3

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

# Run L1 tests
- name: Run unit tests with coverage - L1
Expand Down
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ endif()
# Option for building pi-cli
option(BUILD_PICLI "Build the pi-cli test project" OFF)

if(COVERAGE_ENABLED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage -O0")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage -O0")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
endif()

find_package(PkgConfig REQUIRED)
pkg_check_modules(GST REQUIRED gstreamer-plugins-base-1.0)
pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0)
Expand Down
7 changes: 7 additions & 0 deletions GstHandlerControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ GstHandlerControl::ScopeHelper GstHandlerControl::getScopeHelper()

bool GstHandlerControl::waitForDone(int MaximumDelayMilliseconds, std::string name)
{
// Negative delays are treated as an immediate timeout.
if (MaximumDelayMilliseconds < 0)
{
MW_LOG_ERR("GstHandlerControl: invalid negative delay %d", MaximumDelayMilliseconds);
return false;
}

const std::chrono::steady_clock::time_point end =
std::chrono::milliseconds{MaximumDelayMilliseconds} + std::chrono::steady_clock::now();

Expand Down
17 changes: 13 additions & 4 deletions InterfacePlayerRDK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3212,11 +3212,20 @@ void InterfacePlayerPriv::SendNewSegmentEvent(int type, GstClockTime startPts ,G

if( (GstMediaType)mediaType == eGST_MEDIATYPE_VIDEO )
{
bool isVideoMaster = socInterface->IsVideoMaster(gstPrivateContext->video_sink);
if( !isVideoMaster )
bool isVideoMaster = true;
if (socInterface)
{
isVideoMaster = socInterface->IsVideoMaster(gstPrivateContext->video_sink);
}
else
{
MW_LOG_WARN("socInterface is null, assuming video master");
}

// set applied_rate to trickplay rate if video sink doesn't use vmaster
// so that it can correctly handle there being no audio
if (!isVideoMaster)
Comment thread
rekhap2kandhavelan marked this conversation as resolved.
{
Comment thread
rekhap2kandhavelan marked this conversation as resolved.
// set applied_rate to trickplay rate if video sink doesn't use vmaster
// so that it can correctly handle there being no audio
segment.applied_rate = gstPrivateContext->rate;
}
}
Expand Down
12 changes: 12 additions & 0 deletions baseConversion/_base64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
*/
char *base64_Encode(const unsigned char *src, size_t len)
{
if( !src )
{
return NULL;
}
if( !len )
{
return strdup("");
}
const unsigned char *fin = &src[len];
const static char *encode = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; // base64
char *rc = (char *)malloc(((len+2)/3)*4+1);
Expand Down Expand Up @@ -64,6 +72,10 @@ char *base64_Encode(const unsigned char *src, size_t len)
*/
unsigned char *base64_Decode(const char *src, size_t *outLen, size_t srcLen)
{
if( !src || !outLen )
{
return NULL;
}
static const signed char decode[256] =
{
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Expand Down
14 changes: 10 additions & 4 deletions drm/helper/VerimatrixHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <memory>
#include <iostream>

#include "PlayerLogManager.h"
#include "VerimatrixHelper.h"
#include "DrmUtils.h"
#include "DrmConstants.h"
Expand Down Expand Up @@ -121,10 +122,15 @@ void VerimatrixHelper::generateLicenseRequest(const ChallengeInfo& challengeInfo

void VerimatrixHelper::transformLicenseResponse(std::shared_ptr<DrmData> licenseResponse) const
{
if(mDrmInfo.mediaFormat == eMEDIAFORMAT_HLS)
licenseResponse->setData((unsigned char*)mDrmInfo.keyURI.c_str(), mDrmInfo.keyURI.length());
else if(mDrmInfo.mediaFormat == eMEDIAFORMAT_DASH)
licenseResponse->setData((unsigned char*)mKeyID.data(), mKeyID.size());
if(!licenseResponse)
{
MW_LOG_WARN("invalid license response");
return;
}
if (mDrmInfo.mediaFormat == eMEDIAFORMAT_HLS)
licenseResponse->setData(mDrmInfo.keyURI.c_str(), mDrmInfo.keyURI.length());
else if (mDrmInfo.mediaFormat == eMEDIAFORMAT_DASH)
licenseResponse->setData(reinterpret_cast<const char*>(mKeyID.data()), mKeyID.size());
else
MW_LOG_WARN("unknown mediaFormat %d", mDrmInfo.mediaFormat);
}
Expand Down
108 changes: 108 additions & 0 deletions externals/PlayerExternalsInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,114 @@ class FakePlayerExternalsInterface : public PlayerExternalsInterfaceBase
playerDsHdcpProtocolVersion_t m_hdcpCurrentProtocol;
public:
FakePlayerExternalsInterface(){SetHDMIStatus();}
/**
* @brief Get the source video width.
*
* Returns the width of the source video stream.
*
* @return int Source width in pixels.
*/
int getSourceWidth() const { return m_sourceWidth; }

/**
* @brief Get the source video height.
*
* Returns the height of the source video stream.
*
* @return int Source height in pixels.
*/
int getSourceHeight() const { return m_sourceHeight; }

/**
* @brief Get the display width.
*
* Returns the width of the display.
*
* @return int Display width in pixels.
*/
int getDisplayWidth() const { return m_displayWidth; }

/**
* @brief Get the display height.
*
* Returns the height of the display.
*
* @return int Display height in pixels.
*/
int getDisplayHeight() const { return m_displayHeight; }

/**
* @brief Check if HDCP is enabled.
*
* Returns true if HDCP (High-bandwidth Digital Content Protection) is enabled.
*
* @return bool True if HDCP is enabled, false otherwise.
*/
bool isHDCPEnabled() const { return m_isHDCPEnabled; }

/**
* @brief Get the associated GstElement pointer.
*
* Returns the internal GstElement pointer used by this player interface.
*
* @return GstElement* Pointer to the GstElement.
*/
GstElement* getGstElement() const { return m_gstElement; }

/**
* @brief Set the source video width.
*
* Sets the width of the source video stream.
*
* @param width Source width in pixels.
*/
void setSourceWidth(int width) { m_sourceWidth = width; }

/**
* @brief Set the source video height.
*
* Sets the height of the source video stream.
*
* @param height Source height in pixels.
*/
void setSourceHeight(int height) { m_sourceHeight = height; }

/**
* @brief Set the display width.
*
* Sets the width of the display.
*
* @param width Display width in pixels.
*/
void setDisplayWidth(int width) { m_displayWidth = width; }

/**
* @brief Set the display height.
*
* Sets the height of the display.
*
* @param height Display height in pixels.
*/
void setDisplayHeight(int height) { m_displayHeight = height; }

/**
* @brief Enable or disable HDCP.
*
* Sets the HDCP (High-bandwidth Digital Content Protection) enabled state.
*
* @param enabled True to enable HDCP, false to disable.
*/
void setHDCPEnabled(bool enabled) { m_isHDCPEnabled = enabled; }

/**
* @brief Set the GstElement pointer (for fake/test purposes).
*
* Sets the internal GstElement pointer used by this player interface.
*
* @param element Pointer to the GstElement.
*/
void setGstElementFake(GstElement *element) { m_gstElement = element; }


void Initialize() override {}

Expand Down
33 changes: 22 additions & 11 deletions playerisobmff/playerisobmffbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1408,28 +1408,39 @@ SencIsoBmffBox* SencIsoBmffBox::constructSencBox(uint32_t sz, uint8_t *ptr)
*/
void SencIsoBmffBox::truncate(uint32_t firstSampleSize)
{
if (numSamples > 1)
if (numSamples <= 1)
{
if (firstSampleSize)
{
auto newEnd{sampleCountLoc + sizeof(uint32_t) + firstSampleSize};
auto oldSize{getSize()};
auto newSize{static_cast<uint32_t>(newEnd - getBase())};
return;
}

if (firstSampleSize)
{
uint8_t *base = getBase();
uint32_t oldSize = getSize();
uint8_t *end = base + oldSize;

if ((oldSize - newSize) >= PLAYER_SIZEOF_SIZE_AND_TAG)
uint8_t *newEnd = sampleCountLoc + sizeof(uint32_t) + firstSampleSize;
if (newEnd <= base || newEnd > end)
{
MW_LOG_INFO("SencIsoBmffBox::truncate: computed end is out of bounds");
}
else
{
uint32_t newSize = static_cast<uint32_t>(newEnd - base);
if (newSize <= oldSize && (oldSize - newSize) >= PLAYER_SIZEOF_SIZE_AND_TAG)
{
PLAYER_WRITE_U32(getBase(), newSize);
PLAYER_WRITE_U32(base, newSize);
SkipIsoBmffBox skip{oldSize - newSize, newEnd};
}
else
{
MW_LOG_INFO("No room for a skip box");
}
}

numSamples = 1;
PLAYER_WRITE_U32(sampleCountLoc, numSamples);
}

numSamples = 1;
PLAYER_WRITE_U32(sampleCountLoc, numSamples);
}

/**
Expand Down
33 changes: 32 additions & 1 deletion playerisobmff/playerisobmffbuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,30 @@ void PlayerIsoBmffBuffer::setBuffer(uint8_t *buf, size_t sz)
bufSize = sz;
}

/**
* @brief Get buffer pointer
*/
uint8_t* PlayerIsoBmffBuffer::getBuffer() const
{
return buffer;
}

/**
* @brief Get buffer size
*/
size_t PlayerIsoBmffBuffer::getBufferSize() const
{
return bufSize;
}

/**
* @brief Get parsed mdat box count
*/
size_t PlayerIsoBmffBuffer::getMdatCount() const
{
return mdatCount;
}

/**
* @fn parseBuffer
* @param[in] correctBoxSize - flag to correct the box size
Expand All @@ -83,11 +107,18 @@ bool PlayerIsoBmffBuffer::parseBuffer(bool correctBoxSize, int newTrackId)
/**
* @brief Get list of box handles in a parsed buffer
*/
player_isobmff::IsoBmffBox* PlayerIsoBmffBuffer::getChunkedfBox() const
player_isobmff::IsoBmffBox* PlayerIsoBmffBuffer::getChunkedBox() const
{
return this->chunkedBox;
}

/**
* @brief Deprecated alias for getChunkedBox()
*/
player_isobmff::IsoBmffBox* PlayerIsoBmffBuffer::getChunkedfBox() const
{
return getChunkedBox();
}
/**
* @brief Print ISOBMFF boxes
*/
Expand Down
44 changes: 38 additions & 6 deletions playerisobmff/playerisobmffbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,21 @@ class PlayerIsoBmffBuffer

PlayerIsoBmffBuffer(const PlayerIsoBmffBuffer&) = delete;
PlayerIsoBmffBuffer& operator=(const PlayerIsoBmffBuffer&) = delete;


/**
* @fn getChunkedBox
*
* @return Box handle if Chunk box found in a parsed buffer. NULL otherwise
*/
IsoBmffBox* getChunkedBox() const;

/**
* @fn getChunkedfBox
*
* @return Box handle if Chunk box found in a parsed buffer. NULL otherwise
* @note Deprecated alias for getChunkedBox.
*/
player_isobmff::IsoBmffBox* getChunkedfBox() const;
IsoBmffBox* getChunkedfBox() const;

/**
* @fn UpdateBufferData
Expand Down Expand Up @@ -149,11 +157,35 @@ class PlayerIsoBmffBuffer
bool parseMdatBox(uint8_t *buf, size_t &size);

/**
* @fn getMdatBoxSize
* @param[out] size - size of mdat buffer
* @return true if buffer size available. false otherwise
*/
* @fn getMdatBoxSize
* @param[out] size - size of mdat buffer
* @return true if buffer size available. false otherwise
*/
bool getMdatBoxSize(size_t &size);


/**
* @brief Get the vector of ISOBMFF boxes
* @return Constant reference to the vector of boxes
*/
const std::vector<player_isobmff::IsoBmffBox*>& getBoxes() const {
return boxes;
}

/**
* @brief Get buffer pointer
*/
uint8_t* getBuffer() const;
/**
* @brief Get buffer size
*/
size_t getBufferSize() const;

/**
* @brief Get parsed mdat box count
*/
size_t getMdatCount() const;

};

#endif /* __PLAYERISOBMFFBUFFER_H__ */
Loading
Loading