Skip to content

Commit

Permalink
Merge remote branch 'upstream-ro/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
opdenkamp committed Jan 2, 2012
2 parents 957bc3f + 338ae2c commit eb1a717
Show file tree
Hide file tree
Showing 43 changed files with 775 additions and 322 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
<string id="30001">Aktiviere Trailer von HD-Trailers.net</string>
<string id="30002">Bevorzugte Sprache</string>
<string id="30003">Bewertung von IMDb nutzen</string>
<string id="30004">Aktiviere Trailer</string>
<string id="30005">Behalte original Filmtitel bei</string>
</strings>
2 changes: 1 addition & 1 deletion addons/skin.confluence/language/Russian/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<string id="31106">Различные параметры</string>
<string id="31107">Скрыть флаги, полученные из имени видеофайла [COLOR=grey3](BluRray, HDTV)[/COLOR]</string>
<string id="31108">Скрыть кнопки главного меню</string>
<string id="31109">Фон главного экрана</string>
<string id="31109">Фон разделов</string>
<string id="31110">Выбрать фон раздела</string>
<string id="31111">Скрыть</string>
<string id="31112">Параметры</string>
Expand Down
10 changes: 5 additions & 5 deletions language/Russian/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2188,7 +2188,7 @@
<string id="20330">Использовать имена папок для поиска</string>
<string id="20331">Файл</string>
<string id="20332">Использовать имена файлов или папок для поиска?</string>
<string id="20333">Выбрать содержимое</string>
<string id="20333">Выбрать тип содержимого</string>
<string id="20334">Папка</string>
<string id="20335">Просматривать содержимое вложенных папок?</string>
<string id="20336">Разблокировать источники</string>
Expand Down Expand Up @@ -2266,8 +2266,8 @@
<string id="20408">Загрузка сведений о музыкальном клипе…</string>
<string id="20409">Загрузка сведений о сериале…</string>
<string id="20410">Трейлер</string>
<string id="20411">Один уровень</string>
<string id="20412">Один уровень для сериалов</string>
<string id="20411">Без категорий</string>
<string id="20412">Не объединять серии сериалов в сезоны</string>
<string id="20413">Фанарт</string>
<string id="20414">Показывать фанарт в медиатеке</string>
<string id="20415">Сканирование нового содержимого…</string>
Expand All @@ -2290,15 +2290,15 @@
<string id="20431">Перезаписать файлы?</string>
<string id="20432">Исключить путь из обновлений медиатеки</string>
<string id="20433">Извлекать метаданные из медиафайлов</string>
<string id="20434">Циклы</string>
<string id="20434">Киноциклы</string>
<string id="20435">Выбрать эскиз киноцикла</string>
<string id="20436">Экспортировать эскизы актеров?</string>
<string id="20437">Выбрать фанарт</string>
<string id="20438">Локальный фанарт</string>
<string id="20439">Без фанарта</string>
<string id="20440">Текущий фанарт</string>
<string id="20441">Внешний фанарт</string>
<string id="20442">Изменить содержимое</string>
<string id="20442">Изменить тип содержимого</string>
<string id="20443">Обновить сведения для всех</string>
<string id="20444">элементов в данной папке?</string>
<string id="20445">Фанарт</string>
Expand Down
38 changes: 24 additions & 14 deletions project/Win32BuildSetup/extract_git_rev.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,40 @@

REM Batch file output: %GIT_REV% variable, containing the git revision

REM Use tgit.exe of TortoiseGit if available
SET GITEXE="tgit.exe"
%GITEXE% --version > NUL 2>&1
IF errorlevel 1 GOTO :notgit
SET GIT_REV=unknown


REM Try wrapped msysgit - must be in the path
SET GITEXE=git.cmd
CALL %GITEXE% --help > NUL 2>&1
IF errorlevel 1 GOTO nowrapmsysgit
GOTO :extract

:notgit
:nowrapmsysgit

REM Fallback on msysgit - must be in the path
SET GITEXE="git.exe"
REM Fallback on regular msysgit - must be in the path
SET GITEXE=git.exe
%GITEXE% --help > NUL 2>&1
IF errorlevel 1 GOTO :nogit
IF errorlevel 9009 IF NOT errorlevel 9010 GOTO nomsysgit
GOTO :extract

:nogit
:nomsysgit

REM Fallback on tgit.exe of TortoiseGit if available
SET GITEXE=tgit.exe
%GITEXE% --version > NUL 2>&1
IF errorlevel 9009 IF NOT errorlevel 9010 GOTO done
GOTO :extract

REM Failure - no git tool to extract information.
SET GIT_REV=Unknown
GOTO :done

:extract

FOR /F "tokens=1-4 delims=-" %%A IN ('"%GITEXE% log --summary --abbrev=7 -n 1 --date=short --pretty=format:"%%cd-%%h""') DO SET GIT_REV=%%A%%B%%C-%%D
@echo %GIT_REV%
FOR /F "tokens=1-4 delims=-" %%A IN ('"%GITEXE% rev-list HEAD -n 1 --date=short --pretty=format:"%%cd-%%h""') DO (
SET GIT_REV=%%A%%B%%C-%%D
)


echo %GIT_REV%

:done

Expand Down
2 changes: 1 addition & 1 deletion tools/darwin/depends/pcre/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ARCHIVE=$(SOURCE).tar.gz
CONFIGURE=./configure --prefix=$(PREFIX) \
--disable-stack-for-recursion

LIBDYLIB=$(SOURCE)/.libs/(LIBNAME).dylib
LIBDYLIB=$(SOURCE)/.libs/lib$(LIBNAME).dylib

all: $(LIBDYLIB) .installed

Expand Down
9 changes: 9 additions & 0 deletions xbmc/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,9 @@ bool CApplication::OnEvent(XBMC_Event& newEvent)
g_settings.Save();
}
break;
case XBMC_VIDEOMOVE:
g_Windowing.OnMove(newEvent.move.x, newEvent.move.y);
break;
case XBMC_USEREVENT:
g_application.getApplicationMessenger().UserEvent(newEvent.user.code);
break;
Expand Down Expand Up @@ -4262,6 +4265,12 @@ void CApplication::StopPlaying()
}
}

void CApplication::ResetSystemIdleTimer()
{
// reset system idle timer
m_idleTimer.StartZero();
}

void CApplication::ResetScreenSaver()
{
// reset our timers
Expand Down
1 change: 1 addition & 0 deletions xbmc/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ class CApplication : public CXBApplicationEx, public IPlayerCallback, public IMs
int GetSubtitleDelay() const;
int GetAudioDelay() const;
void SetPlaySpeed(int iSpeed);
void ResetSystemIdleTimer();
void ResetScreenSaverTimer();
void StopScreenSaverTimer();
// Wakes up from the screensaver and / or DPMS. Returns true if woken up.
Expand Down
20 changes: 11 additions & 9 deletions xbmc/GUIInfoManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1546,21 +1546,22 @@ CStdString CGUIInfoManager::GetLabel(int info, int contextWindow)
case SYSTEM_USED_MEMORY_PERCENT:
case SYSTEM_TOTAL_MEMORY:
{
MEMORYSTATUS stat;
GlobalMemoryStatus(&stat);
int iMemPercentFree = 100 - ((int)( 100.0f* (stat.dwTotalPhys - stat.dwAvailPhys)/stat.dwTotalPhys + 0.5f ));
MEMORYSTATUSEX stat;
stat.dwLength = sizeof(MEMORYSTATUSEX);
GlobalMemoryStatusEx(&stat);
int iMemPercentFree = 100 - ((int)( 100.0f* (stat.ullTotalPhys - stat.ullAvailPhys)/stat.ullTotalPhys + 0.5f ));
int iMemPercentUsed = 100 - iMemPercentFree;

if (info == SYSTEM_FREE_MEMORY)
strLabel.Format("%luMB", (ULONG)(stat.dwAvailPhys/MB));
strLabel.Format("%luMB", (ULONG)(stat.ullAvailPhys/MB));
else if (info == SYSTEM_FREE_MEMORY_PERCENT)
strLabel.Format("%i%%", iMemPercentFree);
else if (info == SYSTEM_USED_MEMORY)
strLabel.Format("%luMB", (ULONG)((stat.dwTotalPhys - stat.dwAvailPhys)/MB));
strLabel.Format("%luMB", (ULONG)((stat.ullTotalPhys - stat.ullAvailPhys)/MB));
else if (info == SYSTEM_USED_MEMORY_PERCENT)
strLabel.Format("%i%%", iMemPercentUsed);
else if (info == SYSTEM_TOTAL_MEMORY)
strLabel.Format("%luMB", (ULONG)(stat.dwTotalPhys/MB));
strLabel.Format("%luMB", (ULONG)(stat.ullTotalPhys/MB));
}
break;
case SYSTEM_SCREEN_MODE:
Expand Down Expand Up @@ -1860,9 +1861,10 @@ bool CGUIInfoManager::GetInt(int &value, int info, int contextWindow, const CGUI
case SYSTEM_FREE_MEMORY:
case SYSTEM_USED_MEMORY:
{
MEMORYSTATUS stat;
GlobalMemoryStatus(&stat);
int memPercentUsed = (int)( 100.0f* (stat.dwTotalPhys - stat.dwAvailPhys)/stat.dwTotalPhys + 0.5f );
MEMORYSTATUSEX stat;
stat.dwLength = sizeof(MEMORYSTATUSEX);
GlobalMemoryStatusEx(&stat);
int memPercentUsed = (int)( 100.0f* (stat.ullTotalPhys - stat.ullAvailPhys)/stat.ullTotalPhys + 0.5f );
if (info == SYSTEM_FREE_MEMORY)
value = 100 - memPercentUsed;
else
Expand Down
35 changes: 32 additions & 3 deletions xbmc/cores/AudioRenderers/CoreAudioRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
#include <CoreServices/CoreServices.h>

#include "CoreAudioRenderer.h"
#include "Application.h"
#include "guilib/AudioContext.h"
#include "osx/CocoaInterface.h"
#include "settings/GUISettings.h"
#include "settings/Settings.h"
#include "settings/AdvancedSettings.h"
Expand Down Expand Up @@ -425,11 +427,15 @@ CCoreAudioRenderer::CCoreAudioRenderer() :
CLog::Log(LOGERROR, "CoreAudioRenderer::constructor: kAudioHardwarePropertyRunLoop error.");
}
}
AudioHardwareAddPropertyListener(kAudioHardwarePropertyDevices, PropertyListenerProc, this);
AudioHardwareAddPropertyListener(kAudioHardwarePropertyDefaultOutputDevice, PropertyListenerProc, this);
g_Windowing.Register(this);
}

CCoreAudioRenderer::~CCoreAudioRenderer()
{
AudioHardwareRemovePropertyListener(kAudioHardwarePropertyDevices, PropertyListenerProc);
AudioHardwareRemovePropertyListener(kAudioHardwarePropertyDefaultOutputDevice, PropertyListenerProc);
g_Windowing.Unregister(this);
Deinitialize();
}
Expand All @@ -450,6 +456,11 @@ bool CCoreAudioRenderer::Initialize(IAudioCallback* pCallback, const CStdString&
if (m_Initialized)
Deinitialize();

// Reset all the devices to a default 'non-hog' and mixable format.
// If we don't do this we may be unable to find the Default Output device.
// (e.g. if we crashed last time leaving it stuck in AC3/DTS/SPDIF mode)
Cocoa_ResetAudioDevices();

if(bPassthrough)
g_audioContext.SetActiveDevice(CAudioContext::DIRECTSOUND_DEVICE_DIGITAL);
else
Expand Down Expand Up @@ -833,9 +844,8 @@ OSStatus CCoreAudioRenderer::OnRender(AudioUnitRenderActionFlags *ioActionFlags,
}
// Hard mute for formats that do not allow standard volume control. Throw away any actual data to keep the stream moving.
if (m_silence || (!m_EnableVolumeControl && m_CurrentVolume <= VOLUME_MINIMUM))
ioData->mBuffers[m_OutputBufferIndex].mDataByteSize = 0;
else
ioData->mBuffers[m_OutputBufferIndex].mDataByteSize = bytesRead;
memset(ioData->mBuffers[m_OutputBufferIndex].mData, 0x00, bytesRead);
ioData->mBuffers[m_OutputBufferIndex].mDataByteSize = bytesRead;

#ifdef _DEBUG
// Calculate stats and perform a sanity check
Expand Down Expand Up @@ -1173,6 +1183,25 @@ bool CCoreAudioRenderer::InitializeEncoded(AudioDeviceID outputDevice, UInt32 sa
return true;
}

OSStatus CCoreAudioRenderer::PropertyListenerProc(AudioHardwarePropertyID property, void *data)
{
//CCoreAudioRenderer *m = (CCoreAudioRenderer*)data;
switch(property)
{
// the device list changed
case kAudioHardwarePropertyDevices:
CLog::Log(LOGDEBUG, "CCoreAudioRenderer::PropertyListenerProc:kAudioHardwarePropertyDevices");
break;
case kAudioHardwarePropertyDefaultOutputDevice:
CLog::Log(LOGDEBUG, "CCoreAudioRenderer::PropertyListenerProc:kAudioHardwarePropertyDefaultOutputDevice");
break;
default:
break;
}

return 0;
}

void CCoreAudioRenderer::OnLostDevice()
{
if (g_guiSettings.GetBool("videoplayer.adjustrefreshrate"))
Expand Down
2 changes: 2 additions & 0 deletions xbmc/cores/AudioRenderers/CoreAudioRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ class CCoreAudioRenderer : public IAudioRenderer, public ICoreAudioSource, publi

bool CreateMixMap();

static OSStatus PropertyListenerProc(AudioHardwarePropertyID property, void *data);

bool m_Pause;
bool m_Initialized; // Prevent multiple init/deinit

Expand Down
19 changes: 13 additions & 6 deletions xbmc/filesystem/DllLibCurl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ using namespace XCURL;

/* okey this is damn ugly. our dll loader doesn't allow for postload, preunload functions */
static long g_curlReferences = 0;
static unsigned int g_curlTimeout = 0;
//static unsigned int g_curlTimeout = 0;

bool DllLibCurlGlobal::Load()
{
CSingleLock lock(m_critSection);
if(g_curlReferences > 0)
{
g_curlReferences++;
//g_curlReferences++;
return true;
}

Expand All @@ -56,13 +56,16 @@ bool DllLibCurlGlobal::Load()
}

/* check idle will clean up the last one */
g_curlReferences = 2;
//g_curlReferences = 2;
g_curlReferences = 1;

return true;
}

void DllLibCurlGlobal::Unload()
{
return;
/*
CSingleLock lock(m_critSection);
if (--g_curlReferences == 0)
{
Expand All @@ -75,19 +78,22 @@ void DllLibCurlGlobal::Unload()
DllDynamic::Unload();
}

/* CheckIdle will clear this one up */
// CheckIdle will clear this one up
if(g_curlReferences == 1)
g_curlTimeout = XbmcThreads::SystemClockMillis();
*/
}

void DllLibCurlGlobal::CheckIdle()
{
/* avoid locking section here, to avoid stalling gfx thread on loads*/
return;
/*
if(g_curlReferences == 0)
return;

CSingleLock lock(m_critSection);
/* 20 seconds idle time before closing handle */
// 20 seconds idle time before closing handle
const unsigned int idletime = 30000;

VEC_CURLSESSIONS::iterator it = m_sessions.begin();
Expand All @@ -112,9 +118,10 @@ void DllLibCurlGlobal::CheckIdle()
it++;
}

/* check if we should unload the dll */
// check if we should unload the dll
if(g_curlReferences == 1 && XbmcThreads::SystemClockMillis() - g_curlTimeout > idletime)
Unload();
*/
}

void DllLibCurlGlobal::easy_aquire(const char *protocol, const char *hostname, CURL_HANDLE** easy_handle, CURLM** multi_handle)
Expand Down
2 changes: 1 addition & 1 deletion xbmc/guilib/GUIAudioManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void CGUIAudioManager::Initialize(int iDevice)
m_bInitialized = true;
#elif defined(HAS_SDL_AUDIO)
Mix_CloseAudio();
if (Mix_OpenAudio(44100, AUDIO_S16, 2, 4096))
if (Mix_OpenAudio(44100, AUDIO_S16SYS, 2, 4096))
CLog::Log(LOGERROR, "Unable to open audio mixer");
else
Mix_Volume(0, (int)(128.f * (g_settings.m_nVolumeLevel - VOLUME_MINIMUM) / (float)(VOLUME_MAXIMUM - VOLUME_MINIMUM)));
Expand Down
9 changes: 5 additions & 4 deletions xbmc/guilib/TextureBundleXPR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,11 @@ bool CTextureBundleXPR::LoadFile(const CStdString& Filename, CAutoTexBuffer& Unp
if (!buffer || !UnpackedBuf.Set((BYTE*)XPhysicalAlloc(file->second.UnpackedSize, MAXULONG_PTR, 128, PAGE_READWRITE)))
{ // failed due to lack of memory
#ifndef _LINUX
MEMORYSTATUS stat;
GlobalMemoryStatus(&stat);
CLog::Log(LOGERROR, "Out of memory loading texture: %s (need %lu bytes, have %lu bytes)", name.c_str(),
file->second.UnpackedSize + file->second.PackedSize, stat.dwAvailPhys);
MEMORYSTATUSEX stat;
stat.dwLength = sizeof(MEMORYSTATUSEX);
GlobalMemoryStatusEx(&stat);
CLog::Log(LOGERROR, "Out of memory loading texture: %s (need %lu bytes, have %"PRIu64" bytes)", name.c_str(),
file->second.UnpackedSize + file->second.PackedSize, stat.ullAvailPhys);
#elif defined(__APPLE__) || defined(__FreeBSD__)
CLog::Log(LOGERROR, "Out of memory loading texture: %s (need %d bytes)", name.c_str(),
file->second.UnpackedSize + file->second.PackedSize);
Expand Down
3 changes: 3 additions & 0 deletions xbmc/interfaces/json-rpc/InputOperations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include "InputOperations.h"
#include "Application.h"
#include "guilib/GUIAudioManager.h"

using namespace JSONRPC;

Expand All @@ -45,6 +46,8 @@ JSON_STATUS CInputOperations::sendAction(int actionID)
{
if(!handleScreenSaver())
{
g_application.ResetSystemIdleTimer();
g_audioManager.PlayActionSound(actionID);
g_application.getApplicationMessenger().SendAction(CAction(actionID), WINDOW_INVALID, false);
}
return ACK;
Expand Down
Loading

0 comments on commit eb1a717

Please sign in to comment.