Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/xbmc/cores/smpplayer/SMPPlayer.cpp b/xbmc/cores/smpplayer/SMPPlayer.cpp
- index 2ca2f23..82b5a0d 100644
- --- a/xbmc/cores/smpplayer/SMPPlayer.cpp
- +++ b/xbmc/cores/smpplayer/SMPPlayer.cpp
- @@ -1560,7 +1560,7 @@ void CSMPPlayer::Process()
- // get our initial status.
- GetAmpStatus();
- -
- +
- // restore system volume setting.
- SetVolume(g_settings.m_nVolumeLevel);
- @@ -1570,48 +1570,11 @@ void CSMPPlayer::Process()
- // drop CGUIDialogBusy dialog and release the hold in OpenFile.
- m_ready.Set();
- - // we are playing but hidden and all stream fields are valid.
- - // check for video in media content
- - GetAmpStatus();
- - if (m_video_count > 0 || m_dvd_mediatype)
- - {
- - // turn on/off subs
- - SetSubtitleVisible(m_subtitle_show);
- - SetSubTitleDelay(g_settings.m_currentVideoSettings.m_SubtitleDelay);
- -
- - // setup renderer for bypass. This tell it to get out of the way as
- - // amp will be doing the actual video rendering in a video plane
- - // that is under the GUI layer.
- - int width = GetPictureWidth();
- - int height = GetPictureHeight();
- - if (m_dvd_mediatype)
- - {
- - // this is not right but seems to work.
- - width = g_graphicsContext.GetWidth();
- - height = g_graphicsContext.GetHeight();
- - }
- - double fFrameRate = GetActualFPS();
- - unsigned int flags = 0;
- -
- - flags |= CONF_FLAGS_FORMAT_BYPASS;
- - flags |= CONF_FLAGS_FULLSCREEN;
- - CStdString formatstr = "BYPASS";
- - CLog::Log(LOGDEBUG,"%s - change configuration. %dx%d. framerate: %4.2f. format: %s",
- - __FUNCTION__, width, height, fFrameRate, formatstr.c_str());
- - g_renderManager.IsConfigured();
- - if(!g_renderManager.Configure(width, height, width, height, fFrameRate, flags, 0))
- - {
- - CLog::Log(LOGERROR, "%s - failed to configure renderer", __FUNCTION__);
- - }
- - if (!g_renderManager.IsStarted())
- - {
- - CLog::Log(LOGERROR, "%s - renderer not started", __FUNCTION__);
- - }
- - }
- -
- if (m_options.identify == false)
- m_callback.OnPlayBackStarted();
- + bool video_configured = false;
- +
- while (!m_bStop && !m_StopPlaying)
- {
- // AMP monitoring loop for automatic playback termination (250ms wait)
- @@ -1621,8 +1584,53 @@ void CSMPPlayer::Process()
- DFBEvent event;
- m_amp_event->GetEvent(m_amp_event, &event);
- - if (GetAmpStatus() && m_amp_media->CheckEOS())
- - break;
- + if (GetAmpStatus())
- + {
- + // we are playing but hidden and all stream fields are valid.
- + // check for video in media content
- + if (!video_configured && (m_video_count > 0 || m_dvd_mediatype))
- + {
- + // turn on/off subs
- + SetSubtitleVisible(m_subtitle_show);
- + SetSubTitleDelay(g_settings.m_currentVideoSettings.m_SubtitleDelay);
- +
- + // setup renderer for bypass. This tell it to get out of the way as
- + // amp will be doing the actual video rendering in a video plane
- + // that is under the GUI layer.
- + int width = GetPictureWidth();
- + int height = GetPictureHeight();
- + if (m_dvd_mediatype)
- + {
- + // this is not right but seems to work.
- + width = g_graphicsContext.GetWidth();
- + height = g_graphicsContext.GetHeight();
- + }
- + double fFrameRate = GetActualFPS();
- + unsigned int flags = 0;
- +
- + flags |= CONF_FLAGS_FORMAT_BYPASS;
- + flags |= CONF_FLAGS_FULLSCREEN;
- + CStdString formatstr = "BYPASS";
- + CLog::Log(LOGDEBUG,"%s - change configuration. %dx%d. framerate: %4.2f. format: %s",
- + __FUNCTION__, width, height, fFrameRate, formatstr.c_str());
- + g_renderManager.IsConfigured();
- + if(!g_renderManager.Configure(width, height, width, height, fFrameRate, flags, 0))
- + {
- + CLog::Log(LOGERROR, "%s - failed to configure renderer", __FUNCTION__);
- + }
- + if (!g_renderManager.IsStarted())
- + {
- + CLog::Log(LOGERROR, "%s - renderer not started", __FUNCTION__);
- + }
- +
- + video_configured = true;
- + }
- +
- + // Check for EOS
- + if (m_amp_media->CheckEOS())
- + break;
- + }
- +
- }
- else
- {
- @@ -1630,7 +1638,7 @@ void CSMPPlayer::Process()
- Sleep(250);
- }
- }
- -
- +
- // have to stop if playing before CloseMedia or bad things happen.
- if (m_amp_media->GetStatusState() != SMP_STOPPED)
- {
Add Comment
Please, Sign In to add comment