Skip to content

Commit cd21d14

Browse files
committed
VPLAY-11225 [Tech Debt] mediafailed event enhancements ( minor code etc )
Reason for change: Added minor code for MediaFailedEvent Risks: Low Test Procedure: Refer jira ticket Priority: P1 Signed-off-by: lashmintha <[email protected]>
1 parent 08b4966 commit cd21d14

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

AAMP-UVE-API.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2463,8 +2463,8 @@ When a player instance is no longer needed, recommend to call explicit release()
24632463
| AAMP_TUNE_GST_PIPELINE_ERROR | 80 | 8001 | AAMP: Error from gstreamer pipeline |
24642464
| AAMP_TUNE_FAILED_PTS_ERROR | 80 | 8002 | AAMP: Playback failed due to PTS error |
24652465

2466-
| AAMP_TUNE_PLAYBACK_STALLED | 7600 | 0 | AAMP: Playback was stalled due to lack of new fragments |
2467-
| AAMP_TUNE_FAILURE_UNKNOWN | 100 | 0 | AAMP: Unknown Failure |
2466+
| AAMP_TUNE_PLAYBACK_STALLED | 7600 | 1 | AAMP: Playback was stalled due to lack of new fragments |
2467+
| AAMP_TUNE_FAILURE_UNKNOWN | 100 | 1 | AAMP: Unknown Failure |
24682468

24692469
---
24702470

priv_aamp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,10 @@ static TuneFailureMap tuneFailureMap[] =
238238
{AAMP_TUNE_FAILED_PTS_ERROR, 80, 8002, "AAMP: Playback failed due to PTS error"},
239239

240240
//Playback failure
241-
{AAMP_TUNE_PLAYBACK_STALLED, 7600, 0, "AAMP: Playback was stalled due to lack of new fragments"},
241+
{AAMP_TUNE_PLAYBACK_STALLED, 7600, 1, "AAMP: Playback was stalled due to lack of new fragments"},
242242

243243
//Unknown failure
244-
{AAMP_TUNE_FAILURE_UNKNOWN, 100, 0, "AAMP: Unknown Failure"}
244+
{AAMP_TUNE_FAILURE_UNKNOWN, 100, 1, "AAMP: Unknown Failure"}
245245
};
246246

247247
static const std::pair<std::string , std::string> gCDAIErrorDetails[] = {

test/utests/tests/AampEventTests/AampEventTests.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
using namespace testing;
2525

2626
#define EFFECTIVE_URL "http://manifest.mpd"
27+
#define TUNE_FAILURE_UNKNOWN_MAJOR 100
28+
#define TUNE_FAILURE_UNKNOWN_MINOR 1
2729

2830
class AAMPEventTests : public ::testing::Test {
2931
protected:
@@ -82,7 +84,7 @@ class MediaErrorEventTest : public testing::Test{
8284
protected:
8385

8486
void SetUp() override {
85-
errorEvent = new MediaErrorEvent(AAMP_TUNE_FAILURE_UNKNOWN,100,10001,"Test",false,0,0,0,"", session_id);
87+
errorEvent = new MediaErrorEvent(AAMP_TUNE_FAILURE_UNKNOWN,TUNE_FAILURE_UNKNOWN_MAJOR,TUNE_FAILURE_UNKNOWN_MINOR,"Test",false,0,0,0,"", session_id);
8688
}
8789
void TearDown() override {
8890
delete errorEvent;
@@ -120,7 +122,7 @@ TEST_F(MediaErrorEventTest, MediaErrorEventMethodsanotherTest) {
120122

121123
EXPECT_EQ(errorEvent->getFailure(), AAMPTuneFailure::AAMP_TUNE_FAILURE_UNKNOWN);
122124
EXPECT_EQ(errorEvent->getCode(), 100);
123-
EXPECT_EQ(errorEvent->getMinorCode(), 10001);
125+
EXPECT_EQ(errorEvent->getMinorCode(), 1);
124126
EXPECT_EQ(errorEvent->getDescription(), "Test");
125127
EXPECT_EQ(errorEvent->getResponseData(), "");
126128
EXPECT_FALSE(errorEvent->shouldRetry());

0 commit comments

Comments
 (0)