aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/Lircmap.xml6
-rw-r--r--xbmc/cores/VideoRenderers/RenderManager.cpp4
-rw-r--r--xbmc/cores/dvdplayer/DVDPlayer.cpp2
-rw-r--r--xbmc/cores/dvdplayer/DVDPlayerVideo.cpp6
-rw-r--r--xbmc/guilib/GUIButtonControl.cpp11
-rw-r--r--xbmc/guilib/GUIControlFactory.cpp3
-rw-r--r--xbmc/guilib/GUIDialog.cpp14
-rw-r--r--xbmc/guilib/GUIToggleButtonControl.cpp6
-rw-r--r--xbmc/guilib/GUIToggleButtonControl.h2
-rw-r--r--xbmc/osx/CocoaInterface.mm66
10 files changed, 54 insertions, 66 deletions
diff --git a/system/Lircmap.xml b/system/Lircmap.xml
index 9808d8c007..5d55be11ea 100644
--- a/system/Lircmap.xml
+++ b/system/Lircmap.xml
@@ -86,7 +86,7 @@
<power>KEY_POWER</power>
<myvideo>KEY_VIDEO</myvideo>
<mymusic>KEY_AUDIO</mymusic>
- <mytv>LiveTV</mytv>
+ <livetv>LiveTV</livetv>
<guide>KEY_EPG</guide>
<one>KEY_1</one>
<two>KEY_2</two>
@@ -456,7 +456,7 @@
<mypictures>KEY_CAMERA</mypictures>
<mytv>KEY_TV</mytv>
<liveradio>KEY_RADIO</liveradio>
- <mytv>KEY_TUNER</mytv>
+ <livetv>KEY_TUNER</livetv>
<one>KEY_1</one>
<two>KEY_2</two>
<three>KEY_3</three>
@@ -574,7 +574,7 @@
<myvideo>KEY_VIDEO</myvideo>
<mymusic>KEY_AUDIO</mymusic>
<mypictures>KEY_CAMERA</mypictures>
- <mytv>KEY_TUNER</mytv>
+ <livetv>KEY_TUNER</livetv>
<mytv>KEY_TV</mytv>
<teletext>KEY_TEXT</teletext>
<one>KEY_NUMERIC_1</one>
diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp
index 018a24061c..8039e5e001 100644
--- a/xbmc/cores/VideoRenderers/RenderManager.cpp
+++ b/xbmc/cores/VideoRenderers/RenderManager.cpp
@@ -1221,8 +1221,10 @@ void CXBMCRenderManager::DiscardBuffer()
while(!m_queued.empty())
requeue(m_discard, m_queued);
+ m_Queue[m_presentsource].timestamp = GetPresentTime();
+
if(m_presentstep == PRESENT_READY)
- m_presentstep = PRESENT_IDLE;
+ m_presentstep = PRESENT_IDLE;
m_presentevent.notifyAll();
}
diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp
index 53817291fd..75ff036df4 100644
--- a/xbmc/cores/dvdplayer/DVDPlayer.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp
@@ -1828,7 +1828,7 @@ void CDVDPlayer::HandlePlaySpeed()
check = false;
// skip if frame on screen has not changed
else if (m_SpeedState.lastpts == m_dvdPlayerVideo->GetCurrentPts() &&
- fabs(m_SpeedState.lastabstime - CDVDClock::GetAbsoluteClock()) < DVD_MSEC_TO_TIME(1000))
+ (m_SpeedState.lastpts > m_State.dts || m_playSpeed > 0))
check = false;
if (check)
diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
index 49ef73107a..4ddd7a99b6 100644
--- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
@@ -1120,6 +1120,10 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts)
}
return result | EOS_DROPPED;
}
+ else if (pts_org < (renderPts - DVD_MSEC_TO_TIME(-1500 * m_speed)))
+ {
+ return result | EOS_DROPPED;
+ }
if (iSleepTime > DVD_MSEC_TO_TIME(20))
iSleepTime = DVD_MSEC_TO_TIME(20);
@@ -1179,7 +1183,7 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts)
int maxWaitTime = std::max(DVD_TIME_TO_MSEC(iSleepTime) + 500, 50);
// don't wait when going ff
if (m_speed > DVD_PLAYSPEED_NORMAL)
- maxWaitTime = 0;
+ maxWaitTime = std::max(DVD_TIME_TO_MSEC(iSleepTime), 0);
int buffer = g_renderManager.WaitForBuffer(m_bStop, maxWaitTime);
if (buffer < 0)
{
diff --git a/xbmc/guilib/GUIButtonControl.cpp b/xbmc/guilib/GUIButtonControl.cpp
index 9f0092e502..b401d67396 100644
--- a/xbmc/guilib/GUIButtonControl.cpp
+++ b/xbmc/guilib/GUIButtonControl.cpp
@@ -146,13 +146,16 @@ void CGUIButtonControl::ProcessText(unsigned int currentTime)
changed |= m_label.SetText(m_info.GetLabel(m_parentID));
changed |= m_label.SetScrolling(HasFocus());
+ // text changed - images need resizing
+ if (m_minWidth && (m_label.GetRenderRect() != labelRenderRect))
+ SetInvalid();
+
// render the second label if it exists
- std::string label2(m_info2.GetLabel(m_parentID));
- changed |= m_label2.SetMaxRect(m_posX, m_posY, GetWidth(), m_height);
- changed |= m_label2.SetText(label2);
- if (!label2.empty())
+ if (!m_info2.GetLabel(m_parentID).empty())
{
changed |= m_label2.SetAlign(XBFONT_RIGHT | (m_label.GetLabelInfo().align & XBFONT_CENTER_Y) | XBFONT_TRUNCATED);
+ changed |= m_label2.SetMaxRect(m_posX, m_posY, GetWidth(), m_height);
+ changed |= m_label2.SetText(m_info2.GetLabel(m_parentID));
changed |= m_label2.SetScrolling(HasFocus());
// If overlapping was corrected - compare render rects to determine
diff --git a/xbmc/guilib/GUIControlFactory.cpp b/xbmc/guilib/GUIControlFactory.cpp
index 8f56b1caba..c041f8b0c3 100644
--- a/xbmc/guilib/GUIControlFactory.cpp
+++ b/xbmc/guilib/GUIControlFactory.cpp
@@ -1215,7 +1215,8 @@ CGUIControl* CGUIControlFactory::Create(int parentID, const CRect &rect, TiXmlEl
control = new CGUIToggleButtonControl(
parentID, id, posX, posY, width, height,
textureFocus, textureNoFocus,
- textureAltFocus, textureAltNoFocus, labelInfo);
+ textureAltFocus, textureAltNoFocus,
+ labelInfo, wrapMultiLine);
((CGUIToggleButtonControl *)control)->SetLabel(strLabel);
((CGUIToggleButtonControl *)control)->SetAltLabel(altLabel);
diff --git a/xbmc/guilib/GUIDialog.cpp b/xbmc/guilib/GUIDialog.cpp
index 15947d182c..d0116dbcef 100644
--- a/xbmc/guilib/GUIDialog.cpp
+++ b/xbmc/guilib/GUIDialog.cpp
@@ -190,15 +190,15 @@ void CGUIDialog::Open_Internal(bool bProcessRenderLoop)
// process render loop
if (bProcessRenderLoop)
{
- if (!m_windowLoaded)
- Close(true);
+ if (!m_windowLoaded)
+ Close(true);
- lock.Leave();
+ lock.Leave();
- while (m_active && !g_application.m_bStop)
- {
- g_windowManager.ProcessRenderLoop();
- }
+ while (m_active && !g_application.m_bStop)
+ {
+ g_windowManager.ProcessRenderLoop();
+ }
}
}
diff --git a/xbmc/guilib/GUIToggleButtonControl.cpp b/xbmc/guilib/GUIToggleButtonControl.cpp
index 551b8ecd5c..af6c3bdb28 100644
--- a/xbmc/guilib/GUIToggleButtonControl.cpp
+++ b/xbmc/guilib/GUIToggleButtonControl.cpp
@@ -26,9 +26,9 @@
using namespace std;
-CGUIToggleButtonControl::CGUIToggleButtonControl(int parentID, int controlID, float posX, float posY, float width, float height, const CTextureInfo& textureFocus, const CTextureInfo& textureNoFocus, const CTextureInfo& altTextureFocus, const CTextureInfo& altTextureNoFocus, const CLabelInfo &labelInfo)
- : CGUIButtonControl(parentID, controlID, posX, posY, width, height, textureFocus, textureNoFocus, labelInfo)
- , m_selectButton(parentID, controlID, posX, posY, width, height, altTextureFocus, altTextureNoFocus, labelInfo)
+CGUIToggleButtonControl::CGUIToggleButtonControl(int parentID, int controlID, float posX, float posY, float width, float height, const CTextureInfo& textureFocus, const CTextureInfo& textureNoFocus, const CTextureInfo& altTextureFocus, const CTextureInfo& altTextureNoFocus, const CLabelInfo &labelInfo, bool wrapMultiLine)
+ : CGUIButtonControl(parentID, controlID, posX, posY, width, height, textureFocus, textureNoFocus, labelInfo, wrapMultiLine)
+ , m_selectButton(parentID, controlID, posX, posY, width, height, altTextureFocus, altTextureNoFocus, labelInfo, wrapMultiLine)
{
ControlType = GUICONTROL_TOGGLEBUTTON;
}
diff --git a/xbmc/guilib/GUIToggleButtonControl.h b/xbmc/guilib/GUIToggleButtonControl.h
index 9f1dcefe54..a8248f0a13 100644
--- a/xbmc/guilib/GUIToggleButtonControl.h
+++ b/xbmc/guilib/GUIToggleButtonControl.h
@@ -37,7 +37,7 @@
class CGUIToggleButtonControl : public CGUIButtonControl
{
public:
- CGUIToggleButtonControl(int parentID, int controlID, float posX, float posY, float width, float height, const CTextureInfo& textureFocus, const CTextureInfo& textureNoFocus, const CTextureInfo& altTextureFocus, const CTextureInfo& altTextureNoFocus, const CLabelInfo &labelInfo);
+ CGUIToggleButtonControl(int parentID, int controlID, float posX, float posY, float width, float height, const CTextureInfo& textureFocus, const CTextureInfo& textureNoFocus, const CTextureInfo& altTextureFocus, const CTextureInfo& altTextureNoFocus, const CLabelInfo &labelInfo, bool wrapMultiline = false);
virtual ~CGUIToggleButtonControl(void);
virtual CGUIToggleButtonControl *Clone() const { return new CGUIToggleButtonControl(*this); };
diff --git a/xbmc/osx/CocoaInterface.mm b/xbmc/osx/CocoaInterface.mm
index a827af9827..252d9d385e 100644
--- a/xbmc/osx/CocoaInterface.mm
+++ b/xbmc/osx/CocoaInterface.mm
@@ -286,54 +286,32 @@ char* Cocoa_MountPoint2DeviceName(char *path)
bool Cocoa_GetVolumeNameFromMountPoint(const std::string &mountPoint, std::string &volumeName)
{
CCocoaAutoPool pool;
- unsigned i, count = 0;
- struct statfs *buf = NULL;
- std::string mountpoint, devicepath;
-
- count = getmntinfo(&buf, 0);
- for (i=0; i<count; i++)
+ NSFileManager *fm = [NSFileManager defaultManager];
+ NSArray *mountedVolumeUrls = [fm mountedVolumeURLsIncludingResourceValuesForKeys:@[ NSURLVolumeNameKey, NSURLPathKey ] options:0];
+ bool resolved = false;
+
+ for (NSURL *volumeURL in mountedVolumeUrls)
{
- mountpoint = buf[i].f_mntonname;
- if (mountpoint == mountPoint)
+ NSString *path;
+ BOOL success = [volumeURL getResourceValue:&path forKey:NSURLPathKey error:nil];
+
+ if (success && path != nil)
{
- devicepath = buf[i].f_mntfromname;
- break;
+ std::string mountpoint = [path UTF8String];
+ if (mountpoint == mountPoint)
+ {
+ NSString *name;
+ success = [volumeURL getResourceValue:&name forKey:NSURLVolumeNameKey error:nil];
+ if (success && name != nil)
+ {
+ volumeName = [name UTF8String];
+ resolved = true;
+ break;
+ }
+ }
}
}
- if (devicepath.empty())
- {
- return false;
- }
-
- DASessionRef session = DASessionCreate(kCFAllocatorDefault);
- if (!session)
- {
- return false;
- }
-
- DADiskRef disk = DADiskCreateFromBSDName(kCFAllocatorDefault, session, devicepath.c_str());
- if (!disk)
- {
- CFRelease(session);
- return false;
- }
-
- NSDictionary *dd = (NSDictionary*) DADiskCopyDescription(disk);
- if (!dd)
- {
- CFRelease(session);
- CFRelease(disk);
- return false;
- }
-
- NSString *volumename = [dd objectForKey:(NSString*)kDADiskDescriptionVolumeNameKey];
- volumeName = [volumename UTF8String];
-
- CFRelease(session);
- CFRelease(disk);
- [dd release];
-
- return true ;
+ return resolved;
}
/*