fragmentcollector_mpd.cpp
/**
 * @brief Get end time of current period
 *
 * @retval Current period's end time
 */
@brief Get end time of current period
@retval Current period's end time
@brief Get end time of current period @retval Current period ' s end time
uint64_t PrivateStreamAbstractionMPD::GetPeriodEndTime()
{
	uint64_t  periodStartMs = 0;
	uint64_t periodDurationMs = 0;
	uint64_t periodEndTime = 0;
	IPeriod *period = mpd->GetPeriods().at(mCurrentPeriodIdx);
	string statTimeStr = period->GetStart();
	string durationStr = period->GetDuration();
	if(!statTimeStr.empty())
	{
		ParseISO8601Duration(statTimeStr.c_str(), periodStartMs);
	}
	if(!durationStr.empty())
	{
		ParseISO8601Duration(durationStr.c_str(), periodDurationMs);
		periodEndTime =  (periodDurationMs + periodStartMs) / 1000;
	}
	traceprintf("PrivateStreamAbstractionMPD::%s:%d - MPD periodEndTime %lld\n", __FUNCTION__, __LINE__, periodEndTime);
	return periodEndTime;
}
uint64_t PrivateStreamAbstractionMPD :: GetPeriodEndTime ( ) { uint64_t periodStartMs = 0 ; uint64_t periodDurationMs = 0 ; uint64_t periodEndTime = 0 ; IPeriod * period = mpd -> GetPeriods ( ) . at ( mCurrentPeriodIdx ) ; string statTimeStr = period -> GetStart ( ) ; string durationStr = period -> GetDuration ( ) ; if ( ! statTimeStr . empty ( ) ) { ParseISO8601Duration ( statTimeStr . c_str ( ) , periodStartMs ) ; } if ( ! durationStr . empty ( ) ) { ParseISO8601Duration ( durationStr . c_str ( ) , periodDurationMs ) ; periodEndTime = ( periodDurationMs + periodStartMs ) / 1000 ; } traceprintf ( " \n " , __FUNCTION__ , __LINE__ , periodEndTime ) ; return periodEndTime ; }
@brief Get end time of current period
 @retval Current period's end time
@brief Get end time of current period @retval Current period ' s end time
/*uint32_t timeScale = 1000;
		ISegmentTemplate *segmentTemplate = pMediaStreamContext->adaptationSet->GetSegmentTemplate();
		if(segmentTemplate)
		{
			timeScale = segmentTemplate->GetTimescale();
		}
		*/