Ver Fonte

Z991239-1387 #comment other: 调整linux广告图片路径

陈礼鹏80274480 há 4 anos atrás
pai
commit
5589c5ef2b

+ 1 - 1
Module/mod_localmediaplay/mod_localmediaplay.cpp

@@ -474,7 +474,7 @@ int CLocalMediaPlayEntity::GetPlayerIcoPath(char* strPath, size_t uLen)
 
 	CSimpleStringA szIcoName("rvc_media_player_64px.bmp");
 	szIcoName = csBinPath + csBackslash + szIcoName;
-	Dbg("media player ico full path is %s.", szIcoName.GetData());
+	//Dbg("media player ico full path is %s.", szIcoName.GetData());
 
 	if (uLen > szIcoName.GetLength()) {
 		memcpy(strPath, szIcoName.GetData(), szIcoName.GetLength());

+ 0 - 16
Other/libmediaplayer/audio.cpp

@@ -413,22 +413,6 @@ static int open_audio_playing(void *arg)
 	SDL_CloseAudio();
 
 	return 0;
-
-	//SDL_Event event;
-	//while (true)
-	//{
-	//	SDL_PumpEvents();
-	//	while (!SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT))
-	//	{
-	//		SDL_Delay(100);
-	//		SDL_PumpEvents();
-	//	}
-	//	is->rvc_hostapi->Debug("open_audio_playing event.type = 0x%0x.", event.type);
-	//	if (FF_QUIT_EVENT == event.type) {
-	//		SDL_Delay(2000);
-	//		return 0;
-	//	}
-	//}
 }
 
 // 音频处理回调函数。读队列获取音频包,解码,播放

+ 2 - 1
Other/libmediaplayer/demux.cpp

@@ -105,6 +105,7 @@ static int demux_thread(void *arg)
 
     SDL_mutex *wait_mutex = SDL_CreateMutex();
 
+	is->rvc_hostapi->Debug("begin %s av_read_frame, nFilecount is %d. courrent is->index is %d.", is->strPlayLists[is->index], is->uFilesCount, is->index);
     // 4. 解复用处理
     while (0 == is->abort_request)
     {
@@ -143,7 +144,7 @@ static int demux_thread(void *arg)
                 if (is->audio_idx >= 0){
                     packet_queue_put_nullpacket(&is->audio_pkt_queue, is->audio_idx[is->index], is->rvc_hostapi);
                 }
-				is->rvc_hostapi->Debug("av_read_frame ret is AVERROR_EOF.");
+				//is->rvc_hostapi->Debug("av_read_frame ret is AVERROR_EOF.");
 				if (is->index + 1 < is->uFilesCount){
 					is->index++;
 					ret = 0;

+ 2 - 7
Other/libmediaplayer/libmediaplayer.cpp

@@ -16,10 +16,7 @@ public:
 		m_pHostApi = pHostApi;
 
 		m_Player = new CMediaPlayer(pHostApi);
-		if (NULL != m_Player) {
-			pHostApi->Debug("new MediaPlayer success!");
-		}
-		else{
+		if (NULL == m_Player) {
 			pHostApi->Debug("new MediaPlayer failed!");
 		}
 		memset(&m_stPlayConfig, 0, sizeof(CMediaPlayConfig));
@@ -36,10 +33,8 @@ public:
 
 	static void __cb_play_finished(void* user_data)
 	{
-		//printf("__cb_play_finished \n");
 		libmediaplayer_impl* pthis = static_cast<libmediaplayer_impl*>(user_data);
-		if (NULL != pthis)
-		{
+		if (NULL != pthis){
 			pthis->PlayMediaFinished();
 		}
 	}

+ 0 - 44
Other/libmediaplayer/player.cpp

@@ -190,7 +190,6 @@ CMediaPlayer::CMediaPlayer(CMediaHostApi* pHostApi)
 
 CMediaPlayer::~CMediaPlayer()
 {
-	//printf("~CMediaPlayer()\n");
 	if (NULL != m_player_stat){
 		player_deinit(m_player_stat);
 		m_player_stat = NULL;
@@ -357,49 +356,6 @@ void CMediaPlayer::StartMediaPlay()
 	}
 
 	ExitMediaPlayingThread();
-
-	//SDL_Event event;
-	//while (1)
-	//{
-	//	//printf("************ StartMediaPlay while (1)*************\n");
-	//	SDL_PumpEvents();
-	//	// SDL event队列为空,则在while循环中播放视频帧。否则从队列头部取一个event,退出当前函数,在上级函数中处理event
-	//	while (!SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT))
-	//	{
-	//		av_usleep(100000);
-	//		SDL_PumpEvents();
-	//	}
-
-	//	m_hostapi->Debug("StartMediaPlay event.type = 0x%0x.", event.type);
-	//	switch (event.type) {
-	//	case SDL_KEYDOWN:
-	//		if (event.key.keysym.sym == SDLK_ESCAPE)
-	//		{
-	//			ExitMediaPlayingThread();
-	//			break;
-	//		}
-
-	//		switch (event.key.keysym.sym) {
-	//		case SDLK_SPACE:        // 空格键:暂停
-	//			toggle_pause(m_player_stat);
-	//			break;
-	//		case SDL_WINDOWEVENT:
-	//			toggle_full_screen(m_player_stat);
-	//			break;
-	//		default:
-	//			break;
-	//		}
-	//		break;
-
-	//	case SDL_QUIT:
-	//	case FF_QUIT_EVENT:
-	//		ExitMediaPlayingThread();
-	//		break;
-	//	default:
-	//		break;
-	//	}
-	//}
-
 }
 
 

+ 1 - 4
Other/libpictureplayer/libpictureplayer.cpp

@@ -22,10 +22,7 @@ public:
 		m_pHostApi = pHostApi;
 		memset(&m_stPlayConfig, 0, sizeof(m_stPlayConfig));
 		m_Player = new CPicturePlayer(pHostApi);
-		if (NULL != m_Player) {
-			pHostApi->PicDebug("new PicturePlayer success!");
-		}
-		else {
+		if (NULL == m_Player) {
 			pHostApi->PicDebug("new PicturePlayer failed!");
 		}
 		m_PlayThreadId = 0;

+ 2 - 2
addin/cfg/LocalMediaPlay.ini

@@ -42,7 +42,7 @@ PrimMonitor=false
 ;WndHeight=0
 PlayCount=0
 PlayInterval=5000
-ImageNames=Ad0\0.jpg|Ad0\1.jpg|Ad0\2.jpg|Ad0\3.jpg
+ImageNames=Ad0/0.bmp|Ad0/1.bmp|Ad0/2.bmp|Ad0/3.bmp
 
 [Image1]
 FullScreen=false
@@ -53,4 +53,4 @@ PrimMonitor=true
 ;WndHeight=480
 PlayCount=6
 PlayInterval=1000
-ImageNames=Ad1\0.jpg|Ad1\1.jpg|Ad1\2.jpg|Ad1\3.jpg
+ImageNames=Ad1/0.bmp|Ad1/1.bmp|Ad1/2.bmp|Ad1/3.bmp