Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
d822db8
Update MediaPipelineServerInternal.cpp
rekhap2kandhavelan Jul 3, 2026
e660c09
Update MediaPipelineServerInternal.cpp
rekhap2kandhavelan Jul 3, 2026
f422cd0
Potential fix for pull request finding
rekhap2kandhavelan Jul 4, 2026
b552061
Potential fix for pull request finding
rekhap2kandhavelan Jul 4, 2026
dc66d0c
Update GstGenericPlayer.cpp
rekhap2kandhavelan Jul 4, 2026
1eb5a4c
Update GstGenericPlayer.cpp
rekhap2kandhavelan Jul 6, 2026
02a91be
Fix clang-format: remove trailing whitespace
rkandh015 Jul 6, 2026
5b910ff
Fix clang-format: reorder using declaration
rkandh015 Jul 6, 2026
739ccb4
Merge branch 'master' into feature/RDKEMW-18434_dev
rekhap2kandhavelan Jul 9, 2026
092987e
Merge branch 'master' into feature/RDKEMW-18434_dev
rekhap2kandhavelan Jul 9, 2026
b6d2a9f
Merge branch 'feature/RDKEMW-18434_dev' of https://github.com/rdkcent…
rkandh015 Jul 9, 2026
6abd5a1
Update GstGenericPlayerPrivateTest.cpp
rekhap2kandhavelan Jul 9, 2026
8106f0e
Fix clang-format: break long EXPECT_CALL line at line 1805
rekhap2kandhavelan Jul 10, 2026
283a18e
Revert "Fix clang-format: break long EXPECT_CALL line at line 1805"
rkandh015 Jul 10, 2026
58c212b
Fix clang-format: break long EXPECT_CALL lines to comply with column …
rkandh015 Jul 10, 2026
7a91e22
Fix clang-format: break long EXPECT_CALL lines to comply with column …
rkandh015 Jul 10, 2026
8348306
Merge branch 'feature/RDKEMW-18434_dev' of https://github.com/rdkcent…
rkandh015 Jul 10, 2026
a404e02
Merge branch 'master' into feature/RDKEMW-18434_dev
rekhap2kandhavelan Jul 15, 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
1 change: 1 addition & 0 deletions media/server/gstplayer/source/GstGenericPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ void GstGenericPlayer::termPipeline()
}

m_finishSourceSetupTimer.reset();
stopNotifyPlaybackInfoTimer();
Comment thread
rekhap2kandhavelan marked this conversation as resolved.

Comment on lines 310 to 314
Comment thread
rekhap2kandhavelan marked this conversation as resolved.
for (auto &elem : m_context.streamInfo)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1710,6 +1710,7 @@ TEST_F(GstGenericPlayerPrivateTest, shouldStartPlaybackInfoTimer)
{
willNotifyPlaybackInfo();
std::unique_ptr<common::ITimer> playbackInfoTimerMock = std::make_unique<StrictMock<TimerMock>>();
EXPECT_CALL(dynamic_cast<StrictMock<TimerMock> &>(*playbackInfoTimerMock), isActive()).WillRepeatedly(Return(false));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please apply the copilot comment.
isActive should return true and cancelling timer in the destructor should be covered

EXPECT_CALL(*m_timerFactoryMock, createTimer(kPlaybackInfoTimerMs, _, common::TimerType::PERIODIC))
Comment thread
rekhap2kandhavelan marked this conversation as resolved.
.WillOnce(Return(ByMove(std::move(playbackInfoTimerMock))));

Expand All @@ -1720,6 +1721,7 @@ TEST_F(GstGenericPlayerPrivateTest, shouldNotifyPlaybackInfoWithAudioFade)
{
willNotifyPlaybackInfoWithAudioFade();
std::unique_ptr<common::ITimer> playbackInfoTimerMock = std::make_unique<StrictMock<TimerMock>>();
EXPECT_CALL(dynamic_cast<StrictMock<TimerMock> &>(*playbackInfoTimerMock), isActive()).WillRepeatedly(Return(false));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please apply the copilot comment.
isActive should return true and cancelling timer in the destructor should be covered

EXPECT_CALL(*m_timerFactoryMock, createTimer(kPlaybackInfoTimerMs, _, common::TimerType::PERIODIC))
Comment thread
rekhap2kandhavelan marked this conversation as resolved.
.WillOnce(Return(ByMove(std::move(playbackInfoTimerMock))));

Expand All @@ -1740,7 +1742,9 @@ TEST_F(GstGenericPlayerPrivateTest, shouldNotStartPositionReportingTimerWhenItIs
TEST_F(GstGenericPlayerPrivateTest, shouldNotStartPlaybackInfoTimerWhenItIsActive)
{
std::unique_ptr<common::ITimer> timerMock = std::make_unique<StrictMock<TimerMock>>();
EXPECT_CALL(dynamic_cast<StrictMock<TimerMock> &>(*timerMock), isActive()).WillOnce(Return(true));
EXPECT_CALL(dynamic_cast<StrictMock<TimerMock> &>(*timerMock), isActive())
.WillOnce(Return(true))
.WillRepeatedly(Return(false));
Comment on lines +1745 to +1747
EXPECT_CALL(*m_timerFactoryMock, createTimer(kPlaybackInfoTimerMs, _, common::TimerType::PERIODIC))
Comment on lines 1744 to 1748
.WillOnce(Return(ByMove(std::move(timerMock))));
willNotifyPlaybackInfo();
Expand Down Expand Up @@ -1772,6 +1776,7 @@ TEST_F(GstGenericPlayerPrivateTest, shouldSchedulePlaybackInfoWhenPlaybackInfoTi
std::unique_ptr<common::ITimer> timerMock = std::make_unique<StrictMock<TimerMock>>();
willNotifyPlaybackInfo();
std::unique_ptr<common::ITimer> playbackInfoTimerMock = std::make_unique<StrictMock<TimerMock>>();
EXPECT_CALL(dynamic_cast<StrictMock<TimerMock> &>(*playbackInfoTimerMock), isActive()).WillRepeatedly(Return(false));
Comment thread
rekhap2kandhavelan marked this conversation as resolved.
EXPECT_CALL(*m_timerFactoryMock, createTimer(kPlaybackInfoTimerMs, _, common::TimerType::PERIODIC))
Comment thread
rekhap2kandhavelan marked this conversation as resolved.
.WillOnce(Invoke(
[&](const std::chrono::milliseconds &timeout, const std::function<void()> &callback, common::TimerType timerType)
Expand Down Expand Up @@ -1799,7 +1804,9 @@ TEST_F(GstGenericPlayerPrivateTest, shouldStopActivePlaybackInfoTimerTimer)
{
willNotifyPlaybackInfo();
std::unique_ptr<common::ITimer> playbackInfoTimerMock = std::make_unique<StrictMock<TimerMock>>();
EXPECT_CALL(dynamic_cast<StrictMock<TimerMock> &>(*playbackInfoTimerMock), isActive()).WillOnce(Return(true));
EXPECT_CALL(dynamic_cast<StrictMock<TimerMock> &>(*playbackInfoTimerMock), isActive())
.WillOnce(Return(true))
.WillRepeatedly(Return(false));
EXPECT_CALL(dynamic_cast<StrictMock<TimerMock> &>(*playbackInfoTimerMock), cancel());
EXPECT_CALL(*m_timerFactoryMock, createTimer(kPlaybackInfoTimerMs, _, common::TimerType::PERIODIC))
.WillOnce(Return(ByMove(std::move(playbackInfoTimerMock))));
Expand All @@ -1823,7 +1830,7 @@ TEST_F(GstGenericPlayerPrivateTest, shouldNotStopInactivePlaybackInfoTimer)
{
willNotifyPlaybackInfo();
std::unique_ptr<common::ITimer> playbackInfoTimerMock = std::make_unique<StrictMock<TimerMock>>();
EXPECT_CALL(dynamic_cast<StrictMock<TimerMock> &>(*playbackInfoTimerMock), isActive()).WillOnce(Return(false));
EXPECT_CALL(dynamic_cast<StrictMock<TimerMock> &>(*playbackInfoTimerMock), isActive()).WillRepeatedly(Return(false));
EXPECT_CALL(*m_timerFactoryMock, createTimer(kPlaybackInfoTimerMs, _, common::TimerType::PERIODIC))
.WillOnce(Return(ByMove(std::move(playbackInfoTimerMock))));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <utility>

using ::testing::_;
using ::testing::AnyNumber;
using ::testing::ByMove;
using ::testing::Invoke;
using ::testing::Return;
Expand Down Expand Up @@ -56,6 +57,7 @@ void GstGenericPlayerTestCommon::gstPlayerWillBeDestroyed()
{
expectShutdown();
expectStop();
EXPECT_CALL(*m_timerFactoryMock, createTimer(_, _, _)).Times(AnyNumber());
Comment thread
rekhap2kandhavelan marked this conversation as resolved.
Comment thread
rekhap2kandhavelan marked this conversation as resolved.
Comment thread
rekhap2kandhavelan marked this conversation as resolved.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please apply this copilot comment. Create timer is not called during the GstGenericPlayer teardown, so this expect_call should be moved to the dedicated method, e.g. void expectPlaybackInfoTimerCreation() and void expectPlaybackInfoTimerCancel(). EXPECT_CALLs should not have any .Times(AnyNumber()); and expects should be added only for tests, that really need it.

EXPECT_CALL(*m_gstWrapperMock, gstPipelineGetBus(GST_PIPELINE(&m_pipeline))).WillOnce(Return(&m_bus));
Comment thread
rekhap2kandhavelan marked this conversation as resolved.
Comment thread
rekhap2kandhavelan marked this conversation as resolved.
EXPECT_CALL(*m_gstWrapperMock, gstBusSetSyncHandler(&m_bus, nullptr, nullptr, nullptr));
Comment thread
rekhap2kandhavelan marked this conversation as resolved.
EXPECT_CALL(*m_gstWrapperMock, gstObjectUnref(&m_bus));
Expand Down
Loading