Skip to content
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
1 change: 1 addition & 0 deletions aampgstplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ static void InitializePlayerConfigs(AAMPGstPlayer *_this, void *playerInstance)
interfacePlayer->m_gstConfigParam->audioOnlyMode = _this->aamp->mAudioOnlyPb;
interfacePlayer->m_gstConfigParam->gstreamerSubsEnabled = _this->aamp->IsGstreamerSubsEnabled();
interfacePlayer->m_gstConfigParam->media = _this->aamp->GetMediaFormatTypeEnum();
interfacePlayer->m_gstConfigParam->isNewTune = _this->aamp->mIsNewTune;
}
Comment thread
Gnanesha marked this conversation as resolved.

/*
Expand Down
1 change: 1 addition & 0 deletions middleware/InterfacePlayerPriv.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ struct GstPlayerPriv
int NumberOfTracks; /**< Indicates the number of tracks */
GstPlaybackQualityStruct playbackQuality; /**< video playback quality info */
bool isMp4DemuxPlayback; /**< flag to denote mp4demux path needs BMFF-like semantics */
long long mFirstFrameTimeInMS; /**< Steady-clock timestamp (ms) when first video frame was received; 0 if unset */
Comment thread
Gnanesha marked this conversation as resolved.
struct CallbackData
Comment thread
Gnanesha marked this conversation as resolved.
{
gpointer instance;
Expand Down
17 changes: 16 additions & 1 deletion middleware/InterfacePlayerRDK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ void InterfacePlayerRDK::ConfigurePipeline(int format, int audioFormat, int subF
GstStreamOutputFormat newFormat[GST_TRACK_COUNT];
newFormat[eGST_MEDIATYPE_VIDEO] = gstFormat;
newFormat[eGST_MEDIATYPE_AUDIO] = gstAudioFormat;
interfacePlayerPriv->gstPrivateContext->mFirstFrameTimeInMS = 0;

bool newClosedCaptionsControl = false;

Expand Down Expand Up @@ -3726,6 +3727,7 @@ void InterfacePlayerRDK::NotifyFirstFrame(int mediaType)

if (eGST_MEDIATYPE_VIDEO == mediaType)
{
interfacePlayerPriv->gstPrivateContext->mFirstFrameTimeInMS = NOW_STEADY_TS_MS;
MW_LOG_MIL("OnFirstVideoFrame. got First Video Frame");

if (!interfacePlayerPriv->gstPrivateContext->decoderHandleNotified)
Expand Down Expand Up @@ -4275,7 +4277,20 @@ static gboolean bus_message(GstBus * bus, GstMessage * msg, InterfacePlayerRDK *
busEvent.msg = srcName ? srcName : "Unknown source";
busEvent.dbg_info = "N/A";
busEvent.msgType = MESSAGE_STATE_CHANGE;


std::string oldState(gst_element_state_get_name(old_state));
std::string newState(gst_element_state_get_name(new_state));
if(isPlaybinStateChangeEvent && oldState == "PAUSED" && newState == "PLAYING")
{
Comment thread
Gnanesha marked this conversation as resolved.
Comment thread
Gnanesha marked this conversation as resolved.
if(privatePlayer->gstPrivateContext->mFirstFrameTimeInMS > 0 && pInterfacePlayerRDK->m_gstConfigParam->isNewTune)
{
const long long timeToPlayingMs = NOW_STEADY_TS_MS - privatePlayer->gstPrivateContext->mFirstFrameTimeInMS;
MW_LOG_WARN("Time taken from First Frame to PLAYING state %.3f seconds", (static_cast<double>(timeToPlayingMs) / 1000.0));
Comment thread
Gnanesha marked this conversation as resolved.
}
privatePlayer->gstPrivateContext->mFirstFrameTimeInMS = 0;
pInterfacePlayerRDK->m_gstConfigParam->isNewTune = false;
}

if(isPlaybinStateChangeEvent && privatePlayer->gstPrivateContext->pauseOnStartPlayback && (new_state == GST_STATE_PAUSED))
{
GstElement *video_sink = privatePlayer->gstPrivateContext->video_sink;
Expand Down
1 change: 1 addition & 0 deletions middleware/InterfacePlayerRDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ struct Configs
int monitorAvsyncThresholdPositiveMs;
int monitorAvsyncThresholdNegativeMs;
int monitorAvJumpThresholdMs;
bool isNewTune;
};


Expand Down
4 changes: 4 additions & 0 deletions priv_aamp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1824,6 +1824,7 @@ PrivateInstanceAAMP::PrivateInstanceAAMP(AampConfig *config) : mReportProgressPo
, mLastSleThumbnailInfo()
, mLatencyMonitor(std::make_unique<AampLatencyMonitor>(this))
, mTuneTimeMetricData()
, mIsNewTune(false)
{
Comment thread
Gnanesha marked this conversation as resolved.
AAMPLOG_MIL("Create Private Player %d", mPlayerId);
mAampCacheHandler = new AampCacheHandler(mPlayerId);
Expand Down Expand Up @@ -3912,6 +3913,7 @@ void PrivateInstanceAAMP::TuneFail(bool fail)
// Send the tune time metrics event as the progress event will not fire here.
SendTuneMetricsEvent();
}
mIsNewTune = false;
AdditionalTuneFailLogEntries();
}

Expand All @@ -3920,6 +3922,7 @@ void PrivateInstanceAAMP::TuneFail(bool fail)
*/
void PrivateInstanceAAMP::LogTuneComplete(void)
{
mIsNewTune = false;
TuneEndMetrics mTuneMetrics = {0, 0, 0,0,0,0,0,0,0,(ContentType)0};

mTuneMetrics.success = true;
Expand Down Expand Up @@ -6928,6 +6931,7 @@ void PrivateInstanceAAMP::Tune(const char *mainManifestUrl,
{
char tuneStrPrefix[64] = {};
mTsbSessionRequestUrl.clear();
mIsNewTune = true;
if (!mAppName.empty())
{
snprintf(tuneStrPrefix, sizeof(tuneStrPrefix), "%s PLAYER[%d] APP: %s",(mbPlayEnabled?STRFGPLAYER:STRBGPLAYER), mPlayerId, mAppName.c_str());
Expand Down
1 change: 1 addition & 0 deletions priv_aamp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,7 @@ class PrivateInstanceAAMP : public DrmCallbacks, public std::enable_shared_from_

bool mIsFlushFdsInCurlStore; /**< Mark to clear curl store instance in case of playback stopped due to download Error */
bool mIsFlushOperationInProgress; /**< Flag to indicate pipeline flush operation is going on */
bool mIsNewTune; /**< Flag to indicate it is new tune */
Comment thread
Gnanesha marked this conversation as resolved.

/**
* @fn ProcessID3Metadata
Comment thread
Gnanesha marked this conversation as resolved.
Expand Down
Loading