|
|
@@ -215,15 +215,18 @@ int CMediaPlayer::Initialize_Player_Stat(rvc_media_player_param_t* pMedia_Player
|
|
|
return iRet;
|
|
|
}
|
|
|
|
|
|
+ m_hostapi->Debug("%s:%d", __FUNCTION__, __LINE__);
|
|
|
if (NULL != m_player_stat) {
|
|
|
player_deinit(m_player_stat);
|
|
|
}
|
|
|
|
|
|
+ m_hostapi->Debug("%s:%d", __FUNCTION__, __LINE__);
|
|
|
m_player_stat = (player_stat_t*)av_mallocz(sizeof(player_stat_t));
|
|
|
if (NULL == m_player_stat) {
|
|
|
m_hostapi->Debug("player_stat_t struct malloc failed!");
|
|
|
return iRet;
|
|
|
}
|
|
|
+ m_hostapi->Debug("%s:%d", __FUNCTION__, __LINE__);
|
|
|
|
|
|
m_player_stat->rvc_hostapi = m_hostapi;
|
|
|
m_player_stat->prvc_cb = pMedia_Player->cb;
|
|
|
@@ -233,12 +236,12 @@ int CMediaPlayer::Initialize_Player_Stat(rvc_media_player_param_t* pMedia_Player
|
|
|
m_player_stat->piconpath = av_strdup(m_piconpath);
|
|
|
}
|
|
|
m_player_stat->uVolume = m_uvolume;
|
|
|
-
|
|
|
+ m_hostapi->Debug("%s:%d", __FUNCTION__, __LINE__);
|
|
|
m_player_stat->uFilesCount = pMedia_Player->uFilesCount;
|
|
|
for (size_t i = 0; i < pMedia_Player->uFilesCount; i++){
|
|
|
memcpy(m_player_stat->strPlayLists[i], pMedia_Player->strPlayLists[i], strlen(pMedia_Player->strPlayLists[i]));
|
|
|
}
|
|
|
-
|
|
|
+ m_hostapi->Debug("%s:%d", __FUNCTION__, __LINE__);
|
|
|
if (0 == pMedia_Player->uFilesCount || NULL == m_player_stat->rvc_hostapi || NULL == m_player_stat->prvc_cb || NULL == m_player_stat->piconpath) {
|
|
|
player_deinit(m_player_stat);
|
|
|
m_player_stat = NULL;
|
|
|
@@ -247,7 +250,7 @@ int CMediaPlayer::Initialize_Player_Stat(rvc_media_player_param_t* pMedia_Player
|
|
|
else{
|
|
|
iRet = 0;
|
|
|
}
|
|
|
-
|
|
|
+ m_hostapi->Debug("%s:%d", __FUNCTION__, __LINE__);
|
|
|
return iRet;
|
|
|
}
|
|
|
|
|
|
@@ -258,7 +261,7 @@ int CMediaPlayer::Init(rvc_media_player_param_t* pMedia_Player)
|
|
|
if (0 != Initialize_Player_Stat(pMedia_Player)){
|
|
|
return iRet;
|
|
|
}
|
|
|
-
|
|
|
+ m_hostapi->Debug("initialize player stat success.");
|
|
|
/* start video display */
|
|
|
if (frame_queue_init(&m_player_stat->video_frm_queue, &m_player_stat->video_pkt_queue, VIDEO_PICTURE_QUEUE_SIZE, 1) < 0 ||
|
|
|
frame_queue_init(&m_player_stat->audio_frm_queue, &m_player_stat->audio_pkt_queue, SAMPLE_QUEUE_SIZE, 1) < 0)
|
|
|
@@ -268,6 +271,10 @@ int CMediaPlayer::Init(rvc_media_player_param_t* pMedia_Player)
|
|
|
m_player_stat = NULL;
|
|
|
return iRet;
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ m_hostapi->Debug("frame queue init success!");
|
|
|
+ }
|
|
|
|
|
|
/* init packet queue */
|
|
|
if (packet_queue_init(&m_player_stat->video_pkt_queue, m_hostapi) < 0 ||
|
|
|
@@ -278,6 +285,10 @@ int CMediaPlayer::Init(rvc_media_player_param_t* pMedia_Player)
|
|
|
m_player_stat = NULL;
|
|
|
return iRet;
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ m_hostapi->Debug("packet queue init success!");
|
|
|
+ }
|
|
|
|
|
|
/* put end pkt into packet queue */
|
|
|
AVPacket flush_pkt = {0};
|
|
|
@@ -304,6 +315,7 @@ int CMediaPlayer::Init(rvc_media_player_param_t* pMedia_Player)
|
|
|
m_hostapi->Debug("(Did you set the DISPLAY variable?)");
|
|
|
}
|
|
|
else {
|
|
|
+ m_hostapi->Debug("initialize SDL success.");
|
|
|
iRet = 0;
|
|
|
}
|
|
|
|