Skip to content
44 changes: 24 additions & 20 deletions priv_aamp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2695,15 +2695,6 @@ void PrivateInstanceAAMP::MonitorProgress(bool sync, bool beginningOfStream)
end -= offset;
}

// If tsb is not available for linear send -1 for start and end
// so that xre detect this as tsbless playback
// Override above logic if mEnableSeekableRange is set, used by third-party apps
if (!ISCONFIGSET_PRIV(eAAMPConfig_EnableSeekRange) && (mContentType == ContentType_LINEAR && !mFogTSBEnabled && !IsLocalAAMPTsb()))
{
start = -1;
end = -1;
}

if(IsLiveStream())
{
if(eMEDIAFORMAT_DASH == mMediaFormat)
Expand Down Expand Up @@ -2737,6 +2728,15 @@ void PrivateInstanceAAMP::MonitorProgress(bool sync, bool beginningOfStream)
}
}

// If tsb is not available for linear send -1 for start and end
// so that xre detect this as tsbless playback
// Override above logic if mEnableSeekableRange is set, used by third-party apps
Comment thread
psiva01 marked this conversation as resolved.
Outdated
if (!ISCONFIGSET_PRIV(eAAMPConfig_EnableSeekRange) && (mContentType == ContentType_LINEAR && !mFogTSBEnabled && !IsLocalAAMPTsb()))
{
start = -1;
end = -1;
}
Comment thread
psiva01 marked this conversation as resolved.
Outdated

const BitsPerSecond availableBandwidth = mhAbrManager.GetCurrentlyAvailableBandwidth();
const BitsPerSecond networkBandwidth = mhAbrManager.GetNetworkBandwidth();

Expand Down Expand Up @@ -2803,24 +2803,28 @@ void PrivateInstanceAAMP::MonitorProgress(bool sync, bool beginningOfStream)
SETCONFIGVALUE_PRIV(AAMP_STREAM_SETTING, eAAMPConfig_ProgressLogging, false);
}
}

if (ISCONFIGSET_PRIV(eAAMPConfig_ProgressLogging))
{
static int tick;
int divisor = GETCONFIGVALUE_PRIV(eAAMPConfig_ProgressLoggingDivisor);
if( divisor==0 || (tick++ % divisor) == 0 )
{
auto format_pos = [](double val) -> long {
return (val == -1.0) ? -1 : (long)(val / 1000);
};
Comment thread
psiva01 marked this conversation as resolved.
Outdated
AAMPLOG_MIL("aamp pos: [%ld..%ld..%ld..%lld..%.2f..%.2f..%.2f..%s..%" BITSPERSECOND_FORMAT "..%" BITSPERSECOND_FORMAT "..%.2f]",
(long)(start / 1000),
(long)(reportFormattedCurrPos / 1000),
(long)(end / 1000),
(long long) videoPTS,
(double)(videoBufferedDuration / 1000.0),
(double)(audioBufferedDuration /1000.0),
(double)(latency / 1000.0),
seiTimecode.c_str(),
bps,
networkBandwidth,
currentRate);
format_pos(start),
(long)(reportFormattedCurrPos / 1000),
format_pos(end),
(long long) videoPTS,
(double)(videoBufferedDuration / 1000.0),
(double)(audioBufferedDuration /1000.0),
(double)(latency / 1000.0),
seiTimecode.c_str(),
bps,
networkBandwidth,
currentRate);
}
}

Expand Down
Loading