Skip to content

VPLAY-9810:Add droppedFrames to MonitorAV event #270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: dev_sprint_25_2
Choose a base branch
from
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
38 changes: 30 additions & 8 deletions AampEvent.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's license file the

Check failure on line 2 in AampEvent.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'AampEvent.cpp' (Match: rdk/components/generic/aamp/rdk/components/generic/aamp/stable2, 1363 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/aamp/+archive/stable2.tar.gz, file: AampEvent.cpp)

Check failure on line 2 in AampEvent.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'AampEvent.cpp' (Match: rdk/components/generic/aamp/rdk/components/generic/aamp/2.10.1.0, 1363 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/aamp/+archive/2.10.1.0.tar.gz, file: AampEvent.cpp)
* following copyright and licenses apply:
*
* Copyright 2018 RDK Management
Expand Down Expand Up @@ -150,14 +150,16 @@

/**
* @brief ProgressEvent Constructor

*
*/
ProgressEvent::ProgressEvent(double duration, double position, double start, double end, float speed, long long pts, double bufferedDuration, std::string seiTimecode, double liveLatency, long profileBandwidth, long networkBandwidth, double currentPlayRate,
ProgressEvent::ProgressEvent(double duration, double position, double start, double end, float speed, long long pts, double videoBufferedDuration, double audioBufferedDuration, std::string seiTimecode, double liveLatency, long profileBandwidth, long networkBandwidth, double currentPlayRate,
std::string sid):
AAMPEventObject(AAMP_EVENT_PROGRESS, std::move(sid)), mDuration(duration),
mPosition(position), mStart(start),
mEnd(end), mSpeed(speed), mPTS(pts),
mBufferedDuration(bufferedDuration),
mVideoBufferedDurationMs(videoBufferedDuration),
mAudioBufferedDurationMs(audioBufferedDuration),
mSEITimecode(seiTimecode),

Choose a reason for hiding this comment

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

Coverity Issue - Variable copied when it could be moved

"seiTimecode" is passed-by-value as parameter to "std::__cxx11::basic_string<char, std::char_traits, std::allocator >::basic_string(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const &)", when it could be moved instead.

Low Impact, CWE-none
COPY_INSTEAD_OF_MOVE

How to fix

Use "std::move(""seiTimecode"")" instead of "seiTimecode".

mLiveLatency(liveLatency),
mProfileBandwidth(profileBandwidth),
Expand Down Expand Up @@ -228,13 +230,23 @@
}

/**
* @brief Get Buffered Duration
* @brief Get Video Buffered Duration in milliseconds
*
* @return Video Buffered Duration
*/
double ProgressEvent::getVideoBufferedDuration() const
{
return mVideoBufferedDurationMs;
}

/**
* @brief Get Audio Buffered Duration in milliseconds
*
* @return Buffered duration
* @return Audio Buffered Duration
*/
double ProgressEvent::getBufferedDuration() const
double ProgressEvent::getAudioBufferedDuration() const
{
return mBufferedDuration;
return mAudioBufferedDurationMs;
}

/**
Expand Down Expand Up @@ -1632,9 +1644,9 @@
/**
* @fn MonitorAVStatusEvent Constructor
*/
MonitorAVStatusEvent::MonitorAVStatusEvent(const std::string &state, int64_t videoPosMs, int64_t audioPosMs, uint64_t timeInStateMs, std::string sid):
MonitorAVStatusEvent::MonitorAVStatusEvent(const std::string &state, int64_t videoPosMs, int64_t audioPosMs, uint64_t timeInStateMs, std::string sid, uint64_t droppedFrames):
AAMPEventObject(AAMP_EVENT_MONITORAV_STATUS, std::move(sid)), mMonitorAVStatus(state), mVideoPositionMS(videoPosMs),
mAudioPositionMS(audioPosMs), mTimeInStateMS(timeInStateMs)
mAudioPositionMS(audioPosMs), mTimeInStateMS(timeInStateMs), mDroppedFrames(droppedFrames)
{

}
Expand Down Expand Up @@ -1678,3 +1690,13 @@
{
return mTimeInStateMS;
}

/**
* @brief getDroppedFrames
*
* @return Dropped Frames Count
*/
uint64_t MonitorAVStatusEvent::getDroppedFrames() const
{
return mDroppedFrames;
}
30 changes: 23 additions & 7 deletions AampEvent.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's license file the

Check failure on line 2 in AampEvent.h

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'AampEvent.h' (Match: rdk/components/generic/aamp/rdk/components/generic/aamp/stable2, 2482 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/aamp/+archive/stable2.tar.gz, file: AampEvent.h)

Check failure on line 2 in AampEvent.h

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'AampEvent.h' (Match: rdk/components/generic/aamp/rdk/components/generic/aamp/2.10.4.0, 2483 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/aamp/+archive/2.10.4.0.tar.gz, file: AampEvent.h)
* following copyright and licenses apply:
*
* Copyright 2018 RDK Management
Expand Down Expand Up @@ -246,6 +246,7 @@
double endMilliseconds; /**< time shift buffer end position (relative to tune time - starts at zero) */
long long videoPTS; /**< Video Presentation 90 Khz time-stamp */
double videoBufferedMilliseconds; /**< current duration of buffered video ready to playback */
double audioBufferedMilliseconds; /**< current duration of buffered audio ready to playback */
const char* timecode; /**< SEI Timecode information */
double liveLatency; /**< Live latency */
long profileBandwidth; /**< Profile Bandwidth */
Expand Down Expand Up @@ -509,6 +510,7 @@
int64_t mVideoPositionMS; /**< Video position in milliseconds */
int64_t mAudioPositionMS; /**< Audio position in milliseconds */
uint64_t mTimeInStateMS; /**< Time in the current state in milliseconds */
uint64_t mDroppedFrames; /**< Dropped Frames Count */
} monitorAVStatus;
} data;

Expand Down Expand Up @@ -707,7 +709,8 @@
double mEnd; /**< time shift buffer end position (relative to tune time - starts at zero) in MS */
float mSpeed; /**< current trick speed (1.0 for normal play rate) */
long long mPTS; /**< Video Presentation 90 Khz time-stamp */
double mBufferedDuration; /**< current duration of buffered video ready to playback */
double mVideoBufferedDurationMs; /**< current duration of buffered video ready to playback */
double mAudioBufferedDurationMs; /**< current duration of buffered audio ready to playback */
std::string mSEITimecode; /**< SEI Timecode information */
double mLiveLatency; /**< Live latency */
long mProfileBandwidth; /**<Profile Bandwidth */
Expand All @@ -728,15 +731,16 @@
* @param[in] end - End Position
* @param[in] speed - Current Speed
* @param[in] pts - Video PTS
* @param[in] bufferedDuration - buffered duration
* @param[in] videobufferedDuration - video buffered duration in milliseconds
* @param[in] audiobufferedDuration - audio buffered duration in milliseconds
* @param[in] seiTimecode - Time code
* @param[in] liveLatency - Live latency
* @param[in] profileBandwidth - profile Bandwidth
* @param[in] networkBandwidth - network Bandwidth
* @param[in] currentPlayRate - currentPlayRate

*/
ProgressEvent(double duration, double position, double start, double end, float speed, long long pts, double bufferedDuration, std::string seiTimecode, double liveLatency, long profileBandwidth, long networkBandwidth, double currentPlayRate, std::string sid);
ProgressEvent(double duration, double position, double start, double end, float speed, long long pts, double videoBufferedDuration, double audioBufferedDuration, std::string seiTimecode, double liveLatency, long profileBandwidth, long networkBandwidth, double currentPlayRate, std::string sid);

/**
* @brief ProgressEvent Destructor
Expand Down Expand Up @@ -777,12 +781,17 @@
long long getPTS() const;

/**
* @fn getBufferedDuration
* @fn getVideoBufferedDuration in milliseconds
*/
double getBufferedDuration() const;
double getVideoBufferedDuration() const;

/**
* @fn getSEITimeCode
* @fn getAudioBufferedDuration in milliseconds
*/
double getAudioBufferedDuration() const;

/**
* @fn getSEITimeCode in milliseconds
*/
const char* getSEITimeCode() const;

Expand Down Expand Up @@ -2399,6 +2408,7 @@
int64_t mVideoPositionMS; /**< Video position in milliseconds */
int64_t mAudioPositionMS; /**< Audio position in milliseconds */
uint64_t mTimeInStateMS; /**< Time in the current state in milliseconds */
uint64_t mDroppedFrames; /**< Dropped Frames Count */

public:
MonitorAVStatusEvent() = delete;
Expand All @@ -2413,8 +2423,9 @@
* @param[in] audioPositionMS - Audio position in milliseconds
* @param[in] timeInStateMS - Time in the current state in milliseconds
* @param[in] sid - Session Identifier
* @param[in] droppedFrames - Dropped Frames Count
*/
MonitorAVStatusEvent(const std::string &status, int64_t videoPositionMS, int64_t audioPositionMS, uint64_t timeInStateMS, std::string sid);
MonitorAVStatusEvent(const std::string &status, int64_t videoPositionMS, int64_t audioPositionMS, uint64_t timeInStateMS, std::string sid, uint64_t droppedFrames);

/**
* @brief MonitorAVStatusEvent Destructor
Expand All @@ -2440,6 +2451,11 @@
* @fn getTimeInStateMS
*/
uint64_t getTimeInStateMS() const;

/**
* @fn getDroppedFrames
*/
uint64_t getDroppedFrames() const;
};


Expand Down
4 changes: 3 additions & 1 deletion AampEventListener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ static void GenerateLegacyAAMPEvent(const AAMPEventPtr &e, AAMPEvent &event)
event.data.progress.startMilliseconds = ev->getStart();
event.data.progress.endMilliseconds = ev->getEnd();
event.data.progress.videoPTS = ev->getPTS();
event.data.progress.videoBufferedMilliseconds = ev->getBufferedDuration();
event.data.progress.videoBufferedMilliseconds = ev->getVideoBufferedDuration();
event.data.progress.audioBufferedMilliseconds = ev->getAudioBufferedDuration();
event.data.progress.timecode = ev->getSEITimeCode();
event.data.progress.liveLatency = ev->getLiveLatency();
event.data.progress.profileBandwidth = ev->getProfileBandwidth();
Expand Down Expand Up @@ -310,6 +311,7 @@ static void GenerateLegacyAAMPEvent(const AAMPEventPtr &e, AAMPEvent &event)
event.data.monitorAVStatus.mVideoPositionMS = ev->getVideoPositionMS();
event.data.monitorAVStatus.mAudioPositionMS = ev->getAudioPositionMS();
event.data.monitorAVStatus.mTimeInStateMS = ev->getTimeInStateMS();
event.data.monitorAVStatus.mDroppedFrames = ev->getDroppedFrames();
}
default:
// Some events without payload also falls here, for now
Expand Down
9 changes: 8 additions & 1 deletion StreamAbstractionAAMP.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's license file the

Check failure on line 2 in StreamAbstractionAAMP.h

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'StreamAbstractionAAMP.h' (Match: rdk/components/generic/aamp/rdk/components/generic/aamp/2009.sprint.end, 2153 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/aamp/+archive/2009_sprint_end.tar.gz, file: StreamAbstractionAAMP.h)

Check failure on line 2 in StreamAbstractionAAMP.h

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'StreamAbstractionAAMP.h' (Match: rdk/components/generic/aamp/rdk/components/generic/aamp/stable2, 2153 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/aamp/+archive/stable2.tar.gz, file: StreamAbstractionAAMP.h)

Check failure on line 2 in StreamAbstractionAAMP.h

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'StreamAbstractionAAMP.h' (Match: rdk/components/generic/aamp/rdk/components/generic/aamp/2.10.5.0, 2153 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/aamp/+archive/2.10.5.0.tar.gz, file: StreamAbstractionAAMP.h)
* following copyright and licenses apply:
*
* Copyright 2018 RDK Management
Expand Down Expand Up @@ -1786,6 +1786,13 @@
*/
double GetBufferedVideoDurationSec();

/**
* @fn GetBufferedAudioDurationSec
*
* @return duration of currently buffered audio in seconds
*/
double GetBufferedAudioDurationSec();

/**
* @fn UpdateStreamInfoBitrateData
*
Expand Down Expand Up @@ -2091,7 +2098,7 @@
*
* @return buffer value based on Local TSB
*/
double GetBufferValue(MediaTrack *video);
double GetBufferValue(MediaTrack *track);

/**
* @fn GetDesiredProfileBasedOnCache
Expand Down
4 changes: 3 additions & 1 deletion aampgstplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1281,10 +1281,12 @@ static gboolean MonitorAvTimerCallback(gpointer user_data)
{
timeInState = player->GetMonitorAVInterval(); // Cap to reporting interval
}
GstPlaybackQualityStruct* playbackQuality = player->playerInstance->GetVideoPlaybackQuality();
player->aamp->SendMonitorAvEvent(monitorAVState.description,
monitorAVState.av_position[eMEDIATYPE_VIDEO],
monitorAVState.av_position[eMEDIATYPE_AUDIO],
timeInState);
timeInState,
(playbackQuality && playbackQuality->dropped > 0) ? playbackQuality->dropped : 0);
}
}
}
Expand Down
11 changes: 10 additions & 1 deletion jsbindings/jsbindings.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's license file the

Check failure on line 2 in jsbindings/jsbindings.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'jsbindings/jsbindings.cpp' (Match: rdk/components/generic/aamp/rdk/components/generic/aamp/stable2, 4782 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/aamp/+archive/stable2.tar.gz, file: jsbindings/jsbindings.cpp)

Check failure on line 2 in jsbindings/jsbindings.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'jsbindings/jsbindings.cpp' (Match: rdk/components/generic/aamp/rdk/components/generic/aamp/2009.sprint.end, 4782 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/aamp/+archive/2009_sprint_end.tar.gz, file: jsbindings/jsbindings.cpp)
* following copyright and licenses apply:
*
* Copyright 2018 RDK Management
Expand Down Expand Up @@ -764,7 +764,11 @@
JSStringRelease(name);

name = JSStringCreateWithUTF8CString("videoBufferedMiliseconds"); // FIXME
JSObjectSetProperty(context, eventObj, name, JSValueMakeNumber(context, evt->getBufferedDuration()), kJSPropertyAttributeReadOnly, NULL);
JSObjectSetProperty(context, eventObj, name, JSValueMakeNumber(context, evt->getVideoBufferedDuration()), kJSPropertyAttributeReadOnly, NULL);
JSStringRelease(name);

name = JSStringCreateWithUTF8CString("audioBufferedMiliseconds"); // FIXME
JSObjectSetProperty(context, eventObj, name, JSValueMakeNumber(context, evt->getAudioBufferedDuration()), kJSPropertyAttributeReadOnly, NULL);
JSStringRelease(name);

name = JSStringCreateWithUTF8CString("timecode");
Expand Down Expand Up @@ -2037,6 +2041,11 @@
prop = JSStringCreateWithUTF8CString("timeInStateMs");
JSObjectSetProperty(context, eventObj, prop, JSValueMakeNumber(context, evt->getTimeInStateMS()), kJSPropertyAttributeReadOnly, NULL);
JSStringRelease(prop);

prop = JSStringCreateWithUTF8CString("droppedFrames");
JSObjectSetProperty(context, eventObj, prop, JSValueMakeNumber(context, evt->getDroppedFrames()), kJSPropertyAttributeReadOnly, NULL);
JSStringRelease(prop);

}
};
/**
Expand Down
10 changes: 9 additions & 1 deletion jsbindings/jseventlistener.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's license file the

Check failure on line 2 in jsbindings/jseventlistener.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'jsbindings/jseventlistener.cpp' (Match: rdk/components/generic/aamp/rdk/components/generic/aamp/2.10.4.0, 1936 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/aamp/+archive/2.10.4.0.tar.gz, file: jsbindings/jseventlistener.cpp)
* following copyright and licenses apply:
*
* Copyright 2018 RDK Management
Expand Down Expand Up @@ -120,7 +120,11 @@
JSStringRelease(prop);

prop = JSStringCreateWithUTF8CString("videoBufferedMiliseconds");
JSObjectSetProperty(p_obj->_ctx, jsEventObj, prop, JSValueMakeNumber(p_obj->_ctx, evt->getBufferedDuration()), kJSPropertyAttributeReadOnly, NULL);
JSObjectSetProperty(p_obj->_ctx, jsEventObj, prop, JSValueMakeNumber(p_obj->_ctx, evt->getVideoBufferedDuration()), kJSPropertyAttributeReadOnly, NULL);
JSStringRelease(prop);

prop = JSStringCreateWithUTF8CString("audioBufferedMiliseconds");
JSObjectSetProperty(p_obj->_ctx, jsEventObj, prop, JSValueMakeNumber(p_obj->_ctx, evt->getAudioBufferedDuration()), kJSPropertyAttributeReadOnly, NULL);
JSStringRelease(prop);

prop = JSStringCreateWithUTF8CString("timecode");
Expand Down Expand Up @@ -1676,6 +1680,10 @@
prop = JSStringCreateWithUTF8CString("timeInStateMs");
JSObjectSetProperty(p_obj->_ctx, jsEventObj, prop, JSValueMakeNumber(p_obj->_ctx, evt->getTimeInStateMS()), kJSPropertyAttributeReadOnly, NULL);
JSStringRelease(prop);

prop = JSStringCreateWithUTF8CString("droppedFrames");
JSObjectSetProperty(p_obj->_ctx, jsEventObj, prop, JSValueMakeNumber(p_obj->_ctx, evt->getDroppedFrames()), kJSPropertyAttributeReadOnly, NULL);
JSStringRelease(prop);
}
};

Expand Down
25 changes: 15 additions & 10 deletions priv_aamp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2040,7 +2040,8 @@ void PrivateInstanceAAMP::ReportProgress(bool sync, bool beginningOfStream)
double start = -1;
double end = -1;
long long videoPTS = -1;
double bufferedDuration = 0.0;
double videoBufferedDuration = 0.0;
double audioBufferedDuration = 0.0;
bool bProcessEvent = true;
double latency = 0;

Expand Down Expand Up @@ -2088,8 +2089,10 @@ void PrivateInstanceAAMP::ReportProgress(bool sync, bool beginningOfStream)
std::lock_guard<std::recursive_mutex> guard(mStreamLock);
if (mpStreamAbstractionAAMP)
{
bufferedDuration = mpStreamAbstractionAAMP->GetBufferedVideoDurationSec() * 1000.0;
videoBufferedDuration = mpStreamAbstractionAAMP->GetBufferedVideoDurationSec() * 1000.0;
audioBufferedDuration = mpStreamAbstractionAAMP->GetBufferedAudioDurationSec() * 1000.0;
}

}
if ((mReportProgressPosn == position) && !pipeline_paused && beginningOfStream != true)
{
Expand Down Expand Up @@ -2142,7 +2145,7 @@ void PrivateInstanceAAMP::ReportProgress(bool sync, bool beginningOfStream)
// update available buffer to Manifest refresh cycle .
if(mMPDDownloaderInstance != nullptr)
{
mMPDDownloaderInstance->SetBufferAvailability((int)bufferedDuration);
mMPDDownloaderInstance->SetBufferAvailability((int)videoBufferedDuration);
mMPDDownloaderInstance->SetCurrentPositionDeltaToManifestEnd(CurrentPositionDeltaToManifestEnd);
}
}
Expand Down Expand Up @@ -2184,7 +2187,7 @@ void PrivateInstanceAAMP::ReportProgress(bool sync, bool beginningOfStream)
bps = mpStreamAbstractionAAMP->GetVideoBitrate();
}

ProgressEventPtr evt = std::make_shared<ProgressEvent>(duration, reportFormattedCurrPos, start, end, speed, videoPTS, bufferedDuration, seiTimecode.c_str(), latency, bps, mNetworkBandwidth, currentRate, GetSessionId());
ProgressEventPtr evt = std::make_shared<ProgressEvent>(duration, reportFormattedCurrPos, start, end, speed, videoPTS, videoBufferedDuration, audioBufferedDuration, seiTimecode.c_str(), latency, bps, mNetworkBandwidth, currentRate, GetSessionId());

if (trickStartUTCMS >= 0 && (bProcessEvent || mFirstProgress))
{
Expand All @@ -2198,7 +2201,7 @@ void PrivateInstanceAAMP::ReportProgress(bool sync, bool beginningOfStream)
if(mAampLLDashServiceData.lowLatencyMode && mConfig->GetConfigOwner(eAAMPConfig_InfoLogging) == AAMP_DEFAULT_SETTING)
{
int abrMinBuffer = AAMP_BUFFER_MONITOR_GREEN_THRESHOLD_LLD;
bool bufferBelowMin = bufferedDuration < (abrMinBuffer * 1000);
bool bufferBelowMin = videoBufferedDuration < (abrMinBuffer * 1000);

if (bufferBelowMin && !mIsLoggingNeeded)
{
Expand All @@ -2219,12 +2222,13 @@ void PrivateInstanceAAMP::ReportProgress(bool sync, bool beginningOfStream)
int divisor = GETCONFIGVALUE_PRIV(eAAMPConfig_ProgressLoggingDivisor);
if( divisor==0 || (tick++ % divisor) == 0 )
{
AAMPLOG_MIL("aamp pos: [%ld..%ld..%ld..%lld..%.2f..%.2f..%s..%ld..%ld..%.2f]",
AAMPLOG_MIL("aamp pos: [%ld..%ld..%ld..%lld..%.2f..%.2f..%.2f..%s..%ld..%ld..%.2f]",
(long)(start / 1000),
(long)(reportFormattedCurrPos / 1000),
(long)(end / 1000),
(long long) videoPTS,
(double)(bufferedDuration / 1000.0),
(double)(videoBufferedDuration / 1000.0),
(double)(audioBufferedDuration /1000.0),
(latency / 1000),
seiTimecode.c_str(),
bps,
Expand All @@ -2238,7 +2242,7 @@ void PrivateInstanceAAMP::ReportProgress(bool sync, bool beginningOfStream)
if(mTelemetryInterval > 0 && (diff > mTelemetryInterval))
{
mLastTelemetryTimeMS = currTimeMS;
profiler.SetLatencyParam(latency, (double)(bufferedDuration/1000.0), currentRate, mNetworkBandwidth);
profiler.SetLatencyParam(latency, (double)(videoBufferedDuration/1000.0), currentRate, mNetworkBandwidth);
profiler.GetTelemetryParam();
}

Expand Down Expand Up @@ -13780,15 +13784,16 @@ double PrivateInstanceAAMP::GetStreamPositionMs()
* @param[in] videoPositionMS - video position in milliseconds
* @param[in] audioPositionMS - audio position in milliseconds
* @param[in] timeInStateMS - time in state in milliseconds
* @param[in] droppedFrames - dropped frames count
* @details This function sends a MonitorAVStatusEvent to the event manager.
* It is used to monitor the audio and video status during playback.
* It is called when the playback is enabled (mbPlayEnabled is true).
*/
void PrivateInstanceAAMP::SendMonitorAvEvent(const std::string &status, int64_t videoPositionMS, int64_t audioPositionMS, uint64_t timeInStateMS)
void PrivateInstanceAAMP::SendMonitorAvEvent(const std::string &status, int64_t videoPositionMS, int64_t audioPositionMS, uint64_t timeInStateMS, uint64_t droppedFrames)
{
if(mbPlayEnabled)
{
MonitorAVStatusEventPtr evt = std::make_shared<MonitorAVStatusEvent>(status, videoPositionMS, audioPositionMS, timeInStateMS, GetSessionId());
MonitorAVStatusEventPtr evt = std::make_shared<MonitorAVStatusEvent>(status, videoPositionMS, audioPositionMS, timeInStateMS, GetSessionId(), droppedFrames);
mEventManager->SendEvent(evt, AAMP_EVENT_SYNC_MODE);
}
}
Expand Down
3 changes: 2 additions & 1 deletion priv_aamp.h
Original file line number Diff line number Diff line change
Expand Up @@ -3868,8 +3868,9 @@ class PrivateInstanceAAMP : public DrmCallbacks, public std::enable_shared_from_
* @param[in] videoPositionMS - video position in milliseconds
* @param[in] audioPositionMS - audio position in milliseconds
* @param[in] timeInStateMS - time in state in milliseconds
* @param[in] droppedFrames - dropped frames count
*/
void SendMonitorAvEvent(const std::string &status, int64_t videoPositionMS, int64_t audioPositionMS, uint64_t timeInStateMS);
void SendMonitorAvEvent(const std::string &status, int64_t videoPositionMS, int64_t audioPositionMS, uint64_t timeInStateMS, uint64_t droppedFrames);

/**
* @brief Determines if decrypt should be called on clear samples
Expand Down
Loading