Skip to content

Commit

Permalink
Merge remote branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
dado483 committed May 27, 2011
2 parents de35923 + 2104f44 commit 2854928
Show file tree
Hide file tree
Showing 48 changed files with 1,082 additions and 866 deletions.
Expand Up @@ -14,4 +14,8 @@
<string id="30010">Wachttijd na kanaal tunen(ms)</string>
<string id="30011">Opnames direct afspelen (niet streamen)</string>
<string id="30012">Mediaportal directory met opnames</string>

<!-- on-screen error messages -->
<string id="30050">Uw TVServerXBMC plugin v%s is te oud. U heeft minimaal versie v%s of nieuwer nodig!</string>
<string id="30050">Uw TVServerXBMC plugin is te oud. U heeft minimaal versie v%s of nieuwer nodig!</string>
</strings>
Expand Up @@ -14,4 +14,8 @@
<string id="30010">Wait time after tuning a channel (ms)</string>
<string id="30011">Play recordings directly (no streaming)</string>
<string id="30012">Mediaportal recordings directory</string>

<!-- on-screen error messages -->
<string id="30050">Your TVServerXBMC version v%s is too old. Please upgrade to v%s or higher!</string>
<string id="30051">Your TVServerXBMC version is too old. Please upgrade to v%s or higher!</string>
</strings>
2 changes: 1 addition & 1 deletion language/Dutch/strings.xml
Expand Up @@ -1478,7 +1478,7 @@
<string id="19070">TV gids scan timeout</string>
<string id="19071">TV gids update timeout</string>
<string id="19072">TV gids niet opslaan in de database</string>
<string id="19073">Kanaal timeout</string>
<string id="19073">Stel wisselen kanaal uit</string>
<string id="19074">Actief:</string>
<string id="19075">Naam:</string>
<string id="19076">Map:</string>
Expand Down
2 changes: 1 addition & 1 deletion language/English/strings.xml
Expand Up @@ -1601,7 +1601,7 @@
<string id="19070">EPG scan timeout</string>
<string id="19071">EPG update interval</string>
<string id="19072">Do not store the EPG in the database</string>
<string id="19073">Switch channels if no stream received within</string>
<string id="19073">Delay channel switch</string>
<string id="19074">Active:</string>
<string id="19075">Name:</string>
<string id="19076">Folder:</string>
Expand Down
3 changes: 1 addition & 2 deletions lib/addons/library.xbmc.addon/libXBMC_addon.cpp
Expand Up @@ -112,8 +112,7 @@ DLLEXPORT const char* XBMC_get_localized_string(int dwCode)
if (m_cb == NULL)
return "";

string buffer = m_cb->GetLocalizedString(m_Handle->addonData, dwCode);
return buffer.c_str();
return m_cb->GetLocalizedString(m_Handle->addonData, dwCode);
}

DLLEXPORT const char* XBMC_get_dvd_menu_language()
Expand Down
5 changes: 2 additions & 3 deletions project/VS2010Express/XBMC.vcxproj
Expand Up @@ -1302,7 +1302,6 @@
<ClInclude Include="..\..\xbmc\FileSystem\UDFDirectory.h" />
<ClInclude Include="..\..\xbmc\FileSystem\VideoDatabaseDirectory\DirectoryNodeCountry.h" />
<ClInclude Include="..\..\xbmc\filesystem\VirtualDirectory.h" />
<ClInclude Include="..\..\xbmc\filesystem\zconf.h" />
<ClInclude Include="..\..\xbmc\filesystem\ZeroconfDirectory.h" />
<ClInclude Include="..\..\xbmc\GUIInfoManager.h" />
<ClInclude Include="..\..\xbmc\GUILargeTextureManager.h" />
Expand Down Expand Up @@ -2150,5 +2149,5 @@
<UserProperties RESOURCE_FILE="XBMC_PC.rc" />
</VisualStudio>
</ProjectExtensions>
<Import Project="$(SolutionDir)\$(ProjectFileName).targets.user" Condition="Exists('$(SolutionDir)\$(ProjectFileName).targets.user')" />
</Project>
<Import Project="$(SolutionDir)\$(ProjectFileName).targets.user" Condition="Exists('$(SolutionDir)\$(ProjectFileName).targets.user')" />
</Project>
11 changes: 1 addition & 10 deletions project/VS2010Express/XBMC.vcxproj.filters
Expand Up @@ -885,9 +885,6 @@
<ClCompile Include="..\..\xbmc\FileSystem\VirtualDirectory.cpp">
<Filter>filesystem</Filter>
</ClCompile>
<ClCompile Include="..\..\xbmc\FileSystem\VirtualPathDirectory.cpp">
<Filter>filesystem</Filter>
</ClCompile>
<ClCompile Include="..\..\xbmc\FileSystem\VTPDirectory.cpp">
<Filter>filesystem</Filter>
</ClCompile>
Expand Down Expand Up @@ -3374,9 +3371,6 @@
<ClInclude Include="..\..\xbmc\FileSystem\VideoDatabaseDirectory.h">
<Filter>filesystem</Filter>
</ClInclude>
<ClInclude Include="..\..\xbmc\FileSystem\VirtualPathDirectory.h">
<Filter>filesystem</Filter>
</ClInclude>
<ClInclude Include="..\..\xbmc\FileSystem\VTPDirectory.h">
<Filter>filesystem</Filter>
</ClInclude>
Expand Down Expand Up @@ -3767,9 +3761,6 @@
<ClInclude Include="..\..\xbmc\filesystem\ILiveTV.h">
<Filter>filesystem</Filter>
</ClInclude>
<ClInclude Include="..\..\xbmc\filesystem\zconf.h">
<Filter>filesystem</Filter>
</ClInclude>
<ClInclude Include="..\..\xbmc\filesystem\ZeroconfDirectory.h">
<Filter>filesystem</Filter>
</ClInclude>
Expand Down Expand Up @@ -5272,4 +5263,4 @@
<Filter>win32</Filter>
</CustomBuild>
</ItemGroup>
</Project>
</Project>
2 changes: 1 addition & 1 deletion xbmc/addons/include/xbmc_pvr_types.h
Expand Up @@ -101,7 +101,7 @@ extern "C" {
typedef enum
{
PVR_ERROR_NO_ERROR = 0,
PVR_ERROR_UNKOWN = -1,
PVR_ERROR_UNKNOWN = -1,
PVR_ERROR_NOT_IMPLEMENTED = -2,
PVR_ERROR_SERVER_ERROR = -3,
PVR_ERROR_SERVER_TIMEOUT = -4,
Expand Down
34 changes: 25 additions & 9 deletions xbmc/cores/dvdplayer/DVDPlayer.cpp
Expand Up @@ -349,6 +349,7 @@ bool CDVDPlayer::OpenFile(const CFileItem& file, const CPlayerOptions &options)
m_item = file;
m_mimetype = file.GetMimeType();
m_filename = file.m_strPath;
m_scanStart = 0;

m_ready.Reset();
Create();
Expand Down Expand Up @@ -950,7 +951,10 @@ void CDVDPlayer::Process()
// make sure all selected stream have data on startup
if (m_pInputStream->IsStreamType(DVDSTREAM_TYPE_PVRMANAGER)
&& !g_PVRManager.IsPlayingRecording())
{
SetCaching(CACHESTATE_PVR);
m_scanStart = CTimeUtils::GetTimeMS();
}
else
SetCaching(CACHESTATE_INIT);

Expand Down Expand Up @@ -1007,8 +1011,9 @@ void CDVDPlayer::Process()
{
m_ChannelEntryTimeOut = 0;
CDVDInputStreamPVRManager* pStream = static_cast<CDVDInputStreamPVRManager*>(m_pInputStream);
CPVRChannel channel;
if(pStream->GetSelectedChannel(&channel) && pStream->SelectChannel(channel))
CFileItem currentFile(g_application.CurrentFileItem());
CPVRChannel *currentChannel = currentFile.GetPVRChannelInfoTag();
if(currentChannel && pStream->SelectChannel(*currentChannel))
{
FlushBuffers(false);
SAFE_DELETE(m_pDemuxer);
Expand Down Expand Up @@ -1106,6 +1111,13 @@ void CDVDPlayer::Process()
else if (m_pInputStream->IsStreamType(DVDSTREAM_TYPE_PVRMANAGER))
{
CDVDInputStreamPVRManager* pStream = static_cast<CDVDInputStreamPVRManager*>(m_pInputStream);
unsigned int iTimeout = (unsigned int) g_guiSettings.GetInt("pvrplayback.scantime");
if (m_scanStart && CTimeUtils::GetTimeMS() - m_scanStart >= iTimeout*1000)
{
CLog::Log(LOGERROR,"CDVDPlayer - %s - no video or audio data available after %i seconds, playback stopped",
__FUNCTION__, iTimeout);
break;
}

if (pStream->IsEOF())
break;
Expand Down Expand Up @@ -2088,17 +2100,17 @@ void CDVDPlayer::HandleMessages()
CDVDInputStream::IChannel* input = dynamic_cast<CDVDInputStream::IChannel*>(m_pInputStream);
if(input)
{
bool result;
bool fastSwitch = g_guiSettings.GetInt("pvrplayback.channelentrytimeout") > 0;
bool bSwitchSuccessful(false);
bool bShowPreview(g_guiSettings.GetInt("pvrplayback.channelentrytimeout") > 0);

if(pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_NEXT))
result = input->NextChannel(fastSwitch);
bSwitchSuccessful = input->NextChannel(bShowPreview);
else
result = input->PrevChannel(fastSwitch);
bSwitchSuccessful = input->PrevChannel(bShowPreview);

if(result)
if(bSwitchSuccessful)
{
if (fastSwitch)
if (bShowPreview)
{
CFileItem item(g_application.CurrentFileItem());
if(input->UpdateItem(item))
Expand All @@ -2113,8 +2125,8 @@ void CDVDPlayer::HandleMessages()
m_ChannelEntryTimeOut = 0;
FlushBuffers(false);
SAFE_DELETE(m_pDemuxer);
SetCaching(CACHESTATE_PVR);
}
SetCaching(CACHESTATE_PVR);
}
}
}
Expand Down Expand Up @@ -2156,6 +2168,9 @@ void CDVDPlayer::SetCaching(ECacheState state)
m_dvdPlayerAudio.SendMessage(new CDVDMsg(CDVDMsg::PLAYER_STARTED), 1);
m_dvdPlayerVideo.SetSpeed(DVD_PLAYSPEED_PAUSE);
m_dvdPlayerVideo.SendMessage(new CDVDMsg(CDVDMsg::PLAYER_STARTED), 1);

if (state == CACHESTATE_PVR)
m_scanStart = CTimeUtils::GetTimeMS();
}

if(state == CACHESTATE_PLAY
Expand All @@ -2164,6 +2179,7 @@ void CDVDPlayer::SetCaching(ECacheState state)
m_clock.SetSpeed(m_playSpeed);
m_dvdPlayerAudio.SetSpeed(m_playSpeed);
m_dvdPlayerVideo.SetSpeed(m_playSpeed);
m_scanStart = 0;
}
m_caching = state;
}
Expand Down
11 changes: 6 additions & 5 deletions xbmc/cores/dvdplayer/DVDPlayer.h
Expand Up @@ -296,11 +296,12 @@ class CDVDPlayer : public IPlayer, public CThread, public IDVDPlayer

bool m_bAbortRequest;

std::string m_filename; // holds the actual filename
std::string m_mimetype; // hold a hint to what content file contains (mime type)
ECacheState m_caching;
CFileItem m_item;
long m_ChannelEntryTimeOut;
std::string m_filename; // holds the actual filename
std::string m_mimetype; // hold a hint to what content file contains (mime type)
ECacheState m_caching;
CFileItem m_item;
unsigned int m_scanStart;
long m_ChannelEntryTimeOut;

CCurrentStream m_CurrentAudio;
CCurrentStream m_CurrentVideo;
Expand Down
28 changes: 18 additions & 10 deletions xbmc/pvr/PVRManager.cpp
Expand Up @@ -311,14 +311,14 @@ bool CPVRManager::ChannelSwitch(unsigned int iChannelNumber)
bool CPVRManager::ChannelUpDown(unsigned int *iNewChannelNumber, bool bPreview, bool bUp)
{
bool bReturn = false;

CPVRChannel currentChannel;
if (m_addons->GetPlayingChannel(&currentChannel))
if (IsPlayingTV() || IsPlayingRadio())
{
const CPVRChannelGroup *group = GetPlayingGroup(currentChannel.IsRadio());
CFileItem currentFile(g_application.CurrentFileItem());
CPVRChannel *currentChannel = currentFile.GetPVRChannelInfoTag();
const CPVRChannelGroup *group = GetPlayingGroup(currentChannel->IsRadio());
if (group)
{
const CPVRChannel *newChannel = bUp ? group->GetByChannelUp(currentChannel) : group->GetByChannelDown(currentChannel);
const CPVRChannel *newChannel = bUp ? group->GetByChannelUp(*currentChannel) : group->GetByChannelDown(*currentChannel);
if (PerformChannelSwitch(*newChannel, bPreview))
{
*iNewChannelNumber = newChannel->ChannelNumber();
Expand Down Expand Up @@ -642,6 +642,9 @@ void CPVRManager::LoadCurrentChannelSettings()
g_settings.m_currentVideoSettings.m_AudioStream = loadedChannelSettings.m_AudioStream;
g_settings.m_currentVideoSettings.m_SubtitleOn = loadedChannelSettings.m_SubtitleOn;
g_settings.m_currentVideoSettings.m_SubtitleDelay = loadedChannelSettings.m_SubtitleDelay;
g_settings.m_currentVideoSettings.m_CustomNonLinStretch = loadedChannelSettings.m_CustomNonLinStretch;
g_settings.m_currentVideoSettings.m_ScalingMethod = loadedChannelSettings.m_ScalingMethod;
g_settings.m_currentVideoSettings.m_PostProcess = loadedChannelSettings.m_PostProcess;

/* only change the view mode if it's different */
if (g_settings.m_currentVideoSettings.m_ViewMode != loadedChannelSettings.m_ViewMode)
Expand Down Expand Up @@ -909,15 +912,16 @@ bool CPVRManager::PerformChannelSwitch(const CPVRChannel &channel, bool bPreview
__FUNCTION__, channel.ChannelName().c_str());

/* make sure that channel settings are persisted */
SaveCurrentChannelSettings();
if (!bPreview)
SaveCurrentChannelSettings();

if (m_currentFile)
{
delete m_currentFile;
m_currentFile = NULL;
}

if (channel.ClientID() < 0 || !m_addons->SwitchChannel(channel))
if (!bPreview && (channel.ClientID() < 0 || !m_addons->SwitchChannel(channel)))
{
CLog::Log(LOGERROR, "PVRManager - %s - failed to switch to channel '%s'",
__FUNCTION__, channel.ChannelName().c_str());
Expand All @@ -926,10 +930,14 @@ bool CPVRManager::PerformChannelSwitch(const CPVRChannel &channel, bool bPreview
}

m_currentFile = new CFileItem(channel);
LoadCurrentChannelSettings();

CLog::Log(LOGNOTICE, "PVRManager - %s - switched to channel '%s'",
__FUNCTION__, channel.ChannelName().c_str());
if (!bPreview)
{
LoadCurrentChannelSettings();

CLog::Log(LOGNOTICE, "PVRManager - %s - switched to channel '%s'",
__FUNCTION__, channel.ChannelName().c_str());
}

return true;
}
Expand Down

0 comments on commit 2854928

Please sign in to comment.