kodi: update to kodi-14-2d88a9a, update RPi support patch, update FM support patch

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2014-11-09 00:38:19 +01:00
parent f107fee66f
commit 4a3bd93539
5 changed files with 2017 additions and 892 deletions

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="kodi-theme-Confluence" PKG_NAME="kodi-theme-Confluence"
PKG_VERSION="14-6acca80" PKG_VERSION="14-2d88a9a"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="kodi" PKG_NAME="kodi"
PKG_VERSION="14-6acca80" PKG_VERSION="14-2d88a9a"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -1,18 +1,18 @@
From 48428057ad993372a2ab509c5b24fd82976130db Mon Sep 17 00:00:00 2001 From 30460a1c4259c3b3591349a894dc51ccbd22fd2b Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de> From: xbmc <fernetmenta@online.de>
Date: Mon, 28 May 2012 10:34:39 +0200 Date: Mon, 28 May 2012 10:34:39 +0200
Subject: [PATCH 01/23] videoplayer: adapt lateness detection and dropping to Subject: [PATCH 01/24] videoplayer: adapt lateness detection and dropping to
buffering buffering
--- ---
xbmc/cores/VideoRenderers/RenderManager.cpp | 16 +- xbmc/cores/VideoRenderers/RenderManager.cpp | 16 +-
xbmc/cores/VideoRenderers/RenderManager.h | 12 +- xbmc/cores/VideoRenderers/RenderManager.h | 12 +-
.../dvdplayer/DVDCodecs/Video/DVDVideoCodec.h | 38 +++- .../dvdplayer/DVDCodecs/Video/DVDVideoCodec.h | 40 ++++-
.../DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 41 +++++ .../DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 41 +++++
.../DVDCodecs/Video/DVDVideoCodecFFmpeg.h | 7 + .../DVDCodecs/Video/DVDVideoCodecFFmpeg.h | 7 +
xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 199 ++++++++++++++++----- xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 199 ++++++++++++++++-----
xbmc/cores/dvdplayer/DVDPlayerVideo.h | 23 ++- xbmc/cores/dvdplayer/DVDPlayerVideo.h | 23 ++-
7 files changed, 288 insertions(+), 48 deletions(-) 7 files changed, 290 insertions(+), 48 deletions(-)
diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp
index 529f62f..1ecdc16 100644 index 529f62f..1ecdc16 100644
@ -114,16 +114,16 @@ index c438651..d3c2f1d 100644
double m_presenterr; double m_presenterr;
double m_errorbuff[ERRORBUFFSIZE]; double m_errorbuff[ERRORBUFFSIZE];
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h
index 0386abb..e80358f 100644 index 0386abb..1dd7590 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h
@@ -149,6 +149,10 @@ struct DVDVideoUserData @@ -149,6 +149,10 @@ struct DVDVideoUserData
#define DVP_FLAG_NOSKIP 0x00000010 // indicate this picture should never be dropped #define DVP_FLAG_NOSKIP 0x00000010 // indicate this picture should never be dropped
#define DVP_FLAG_DROPPED 0x00000020 // indicate that this picture has been dropped in decoder stage, will have no data #define DVP_FLAG_DROPPED 0x00000020 // indicate that this picture has been dropped in decoder stage, will have no data
+#define DVP_FLAG_DROPDEINT 0x00000040 // indicate that this picture was requested to have been dropped in deint stage +#define DVD_CODEC_CTRL_SKIPDEINT 0x01000000 // indicate that this picture was requested to have been dropped in deint stage
+#define DVP_FLAG_NO_POSTPROC 0x00000100 // see GetCodecStats +#define DVD_CODEC_CTRL_NO_POSTPROC 0x02000000 // see GetCodecStats
+#define DVP_FLAG_DRAIN 0x00000200 // see GetCodecStats +#define DVD_CODEC_CTRL_DRAIN 0x04000000 // see GetCodecStats
+ +
// DVP_FLAG 0x00000100 - 0x00000f00 is in use by libmpeg2! // DVP_FLAG 0x00000100 - 0x00000f00 is in use by libmpeg2!
@ -145,7 +145,7 @@ index 0386abb..e80358f 100644
/** /**
* Number of references to old pictures that are allowed to * Number of references to old pictures that are allowed to
* be retained when calling decode on the next demux packet * be retained when calling decode on the next demux packet
@@ -300,4 +305,35 @@ class CDVDVideoCodec @@ -300,4 +305,37 @@ class CDVDVideoCodec
* Interact with user settings so that user disabled codecs are disabled * Interact with user settings so that user disabled codecs are disabled
*/ */
static bool IsCodecDisabled(DVDCodecAvailableType* map, unsigned int size, AVCodecID id); static bool IsCodecDisabled(DVDCodecAvailableType* map, unsigned int size, AVCodecID id);
@ -169,10 +169,12 @@ index 0386abb..e80358f 100644
+ /** + /**
+ * Codec can be informed by player with the following flags: + * Codec can be informed by player with the following flags:
+ * + *
+ * DVP_FLAG_NO_POSTPROC : if speed is not normal the codec can switch off + * DVD_CODEC_CTRL_NO_POSTPROC :
+ * postprocessing and de-interlacing + * if speed is not normal the codec can switch off
+ * postprocessing and de-interlacing
+ * + *
+ * DVP_FLAG_DRAIN : codecs may do postprocessing and de-interlacing. + * DVD_CODEC_CTRL_DRAIN :
+ * codecs may do postprocessing and de-interlacing.
+ * If video buffers in RenderManager are about to run dry, + * If video buffers in RenderManager are about to run dry,
+ * this is signaled to codec. Codec can wait for post-proc + * this is signaled to codec. Codec can wait for post-proc
+ * to be finished instead of returning empty and getting another + * to be finished instead of returning empty and getting another
@ -182,7 +184,7 @@ index 0386abb..e80358f 100644
+ virtual void SetCodecControl(int flags) {} + virtual void SetCodecControl(int flags) {}
}; };
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
index 0c4f0e5..2d955c2 100644 index 0c4f0e5..84b1eff 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
@@ -173,6 +173,7 @@ CDVDVideoCodecFFmpeg::CDVDVideoCodecFFmpeg() : CDVDVideoCodec() @@ -173,6 +173,7 @@ CDVDVideoCodecFFmpeg::CDVDVideoCodecFFmpeg() : CDVDVideoCodec()
@ -227,7 +229,7 @@ index 0c4f0e5..2d955c2 100644
+ +
+ if (m_requestSkipDeint) + if (m_requestSkipDeint)
+ { + {
+ pDvdVideoPicture->iFlags |= DVP_FLAG_DROPDEINT; + pDvdVideoPicture->iFlags |= DVD_CODEC_CTRL_SKIPDEINT;
+ m_skippedDeint = 1; + m_skippedDeint = 1;
+ } + }
+ else + else
@ -289,7 +291,7 @@ index 1f564bb..48564d1 100644
+ int m_codecControlFlags; + int m_codecControlFlags;
}; };
diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
index 5a758ab..e0bb4d0 100644 index 5a758ab..c3db6ba 100644
--- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
@@ -38,6 +38,7 @@ @@ -38,6 +38,7 @@
@ -367,9 +369,9 @@ index 5a758ab..e0bb4d0 100644
+ } + }
+ int codecControl = 0; + int codecControl = 0;
+ if (iDropDirective & EOS_BUFFER_LEVEL) + if (iDropDirective & EOS_BUFFER_LEVEL)
+ codecControl |= DVP_FLAG_DRAIN; + codecControl |= DVD_CODEC_CTRL_DRAIN;
+ if (m_speed > DVD_PLAYSPEED_NORMAL) + if (m_speed > DVD_PLAYSPEED_NORMAL)
+ codecControl |= DVP_FLAG_NO_POSTPROC; + codecControl |= DVD_CODEC_CTRL_NO_POSTPROC;
+ m_pVideoCodec->SetCodecControl(codecControl); + m_pVideoCodec->SetCodecControl(codecControl);
+ if (iDropDirective & EOS_DROPPED) + if (iDropDirective & EOS_DROPPED)
+ { + {
@ -510,7 +512,7 @@ index 5a758ab..e0bb4d0 100644
+ m_droppingStats.m_dropRequests = 0; + m_droppingStats.m_dropRequests = 0;
+ CLog::Log(LOGDEBUG,"CDVDPlayerVideo::CalcDropRequirement - dropped pictures, Sleeptime: %f, Bufferlevel: %d, Gain: %f", iSleepTime, iBufferLevel, iGain); + CLog::Log(LOGDEBUG,"CDVDPlayerVideo::CalcDropRequirement - dropped pictures, Sleeptime: %f, Bufferlevel: %d, Gain: %f", iSleepTime, iBufferLevel, iGain);
+ } + }
+ else if (iDroppedPics < 0 && iGain > 1/m_fFrameRate) + else if (iDroppedPics < 0 && iGain > (1/m_fFrameRate + 0.001))
+ { + {
+ CDroppingStats::CGain gain; + CDroppingStats::CGain gain;
+ gain.gain = iGain; + gain.gain = iGain;
@ -643,10 +645,10 @@ index dcd0ffd..1f0e661 100644
}; };
From d3979dfb41485a01d35de62105b2b9544f19f113 Mon Sep 17 00:00:00 2001 From 2d14428010383f68e60acdfff79ed9fcba1030af Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de> From: xbmc <fernetmenta@online.de>
Date: Sun, 2 Sep 2012 16:05:21 +0200 Date: Sun, 2 Sep 2012 16:05:21 +0200
Subject: [PATCH 02/23] video player: present correct pts to user for a/v sync Subject: [PATCH 02/24] video player: present correct pts to user for a/v sync
(after buffering in renderer) (after buffering in renderer)
--- ---
@ -655,7 +657,7 @@ Subject: [PATCH 02/23] video player: present correct pts to user for a/v sync
2 files changed, 17 insertions(+), 1 deletion(-) 2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
index e0bb4d0..43382b5 100644 index c3db6ba..48f8f60 100644
--- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
@@ -1451,6 +1451,22 @@ void CDVDPlayerVideo::ResetFrameRateCalc() @@ -1451,6 +1451,22 @@ void CDVDPlayerVideo::ResetFrameRateCalc()
@ -695,10 +697,10 @@ index 1f0e661..a38a9c3 100644
double GetOutputDelay(); /* returns the expected delay, from that a packet is put in queue */ double GetOutputDelay(); /* returns the expected delay, from that a packet is put in queue */
int GetDecoderFreeSpace() { return 0; } int GetDecoderFreeSpace() { return 0; }
From e766dcceb4930978a72f0119198c4bc872e988c9 Mon Sep 17 00:00:00 2001 From 47b6e876f00601c7b15712be16a3e2f13e7aca91 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de> From: xbmc <fernetmenta@online.de>
Date: Mon, 28 May 2012 10:41:31 +0200 Date: Mon, 28 May 2012 10:41:31 +0200
Subject: [PATCH 03/23] videoplayer: update frametime, it might change due to Subject: [PATCH 03/24] videoplayer: update frametime, it might change due to
fps detection fps detection
--- ---
@ -706,7 +708,7 @@ Subject: [PATCH 03/23] videoplayer: update frametime, it might change due to
1 file changed, 2 insertions(+) 1 file changed, 2 insertions(+)
diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
index 43382b5..ec0c0eb 100644 index 48f8f60..4f35e3a 100644
--- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
@@ -705,6 +705,8 @@ void CDVDPlayerVideo::Process() @@ -705,6 +705,8 @@ void CDVDPlayerVideo::Process()
@ -719,34 +721,10 @@ index 43382b5..ec0c0eb 100644
{ {
m_codecname = m_pVideoCodec->GetName(); m_codecname = m_pVideoCodec->GetName();
From 37e14f9e3bf28721741d43f7e31a46cf2d9ab0bc Mon Sep 17 00:00:00 2001 From 5acb9e7a7c70dc38ca18799d4908b96f242551dc Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Mon, 28 May 2012 10:43:06 +0200
Subject: [PATCH 04/23] videoplayer: give streams with invalid fps a chance for
fps detection
---
xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
index ec0c0eb..b2ee525 100644
--- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
@@ -1495,7 +1495,7 @@ void CDVDPlayerVideo::CalcFrameRate()
frameduration = m_pullupCorrection.GetMinFrameDuration();
if ((frameduration==DVD_NOPTS_VALUE) ||
- ((g_advancedSettings.m_videoFpsDetect == 1) && ((m_pullupCorrection.GetPatternLength() > 1) && !m_pullupCorrection.VFRDetection())))
+ ((g_advancedSettings.m_videoFpsDetect == 1) && ((m_pullupCorrection.GetPatternLength() > 1) && !m_pullupCorrection.VFRDetection() && !m_bFpsInvalid)))
{
//reset the stored framerates if no good framerate was detected
m_fStableFrameRate = 0.0;
From aa89c7ec1c7108cfec60b2804f3297fa5043a480 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de> From: xbmc <fernetmenta@online.de>
Date: Mon, 28 May 2012 10:49:05 +0200 Date: Mon, 28 May 2012 10:49:05 +0200
Subject: [PATCH 05/23] dvdplayer: allow rewinding at end of stream, do a seek Subject: [PATCH 04/24] dvdplayer: allow rewinding at end of stream, do a seek
after rewind after rewind
--- ---
@ -780,10 +758,10 @@ index 63cbe66..f5f697e 100644
// audioplayer, stops outputing audio to audiorendere, but still tries to // audioplayer, stops outputing audio to audiorendere, but still tries to
// sleep an correct amount for each packet // sleep an correct amount for each packet
From 782c60b53a253d348b68ac74e3596820e673f431 Mon Sep 17 00:00:00 2001 From 35a6e814939d4e4f900595f2b1efd5a2aa131ab0 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de> From: xbmc <fernetmenta@online.de>
Date: Mon, 20 Aug 2012 16:06:39 +0200 Date: Mon, 20 Aug 2012 16:06:39 +0200
Subject: [PATCH 06/23] dvdplayer: observe pts counter overflow Subject: [PATCH 05/24] dvdplayer: observe pts counter overflow
--- ---
.../cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp | 197 ++++++++++++++++++++- .../cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp | 197 ++++++++++++++++++++-
@ -791,7 +769,7 @@ Subject: [PATCH 06/23] dvdplayer: observe pts counter overflow
2 files changed, 199 insertions(+), 1 deletion(-) 2 files changed, 199 insertions(+), 1 deletion(-)
diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
index 81a511e..9626dae 100644 index a9a8f0a..368de0e 100644
--- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp --- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp +++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
@@ -18,7 +18,6 @@ @@ -18,7 +18,6 @@
@ -810,8 +788,8 @@ index 81a511e..9626dae 100644
#include "stdint.h" #include "stdint.h"
#endif #endif
#include "DVDDemuxFFmpeg.h" #include "DVDDemuxFFmpeg.h"
@@ -476,6 +476,9 @@ bool CDVDDemuxFFmpeg::Open(CDVDInputStream* pInput, bool streaminfo, bool filein @@ -477,6 +477,9 @@ bool CDVDDemuxFFmpeg::Open(CDVDInputStream* pInput, bool streaminfo, bool filein
if (isMpegts && GetNrOfStreams() == 0) if (skipCreateStreams && GetNrOfStreams() == 0)
m_program = 0; m_program = 0;
+ m_bPtsWrapChecked = false; + m_bPtsWrapChecked = false;
@ -820,7 +798,7 @@ index 81a511e..9626dae 100644
return true; return true;
} }
@@ -616,6 +619,12 @@ double CDVDDemuxFFmpeg::ConvertTimestamp(int64_t pts, int den, int num) @@ -617,6 +620,12 @@ double CDVDDemuxFFmpeg::ConvertTimestamp(int64_t pts, int den, int num)
if (pts == (int64_t)AV_NOPTS_VALUE) if (pts == (int64_t)AV_NOPTS_VALUE)
return DVD_NOPTS_VALUE; return DVD_NOPTS_VALUE;
@ -833,7 +811,7 @@ index 81a511e..9626dae 100644
// do calculations in floats as they can easily overflow otherwise // do calculations in floats as they can easily overflow otherwise
// we don't care for having a completly exact timestamp anyway // we don't care for having a completly exact timestamp anyway
double timestamp = (double)pts * num / den; double timestamp = (double)pts * num / den;
@@ -762,6 +771,24 @@ DemuxPacket* CDVDDemuxFFmpeg::Read() @@ -763,6 +772,24 @@ DemuxPacket* CDVDDemuxFFmpeg::Read()
m_pkt.pkt.pts = AV_NOPTS_VALUE; m_pkt.pkt.pts = AV_NOPTS_VALUE;
} }
@ -858,7 +836,7 @@ index 81a511e..9626dae 100644
// copy contents into our own packet // copy contents into our own packet
pPacket->iSize = m_pkt.pkt.size; pPacket->iSize = m_pkt.pkt.size;
@@ -895,7 +922,16 @@ bool CDVDDemuxFFmpeg::SeekTime(int time, bool backwords, double *startpts) @@ -896,7 +923,16 @@ bool CDVDDemuxFFmpeg::SeekTime(int time, bool backwords, double *startpts)
ret = av_seek_frame(m_pFormatContext, -1, seek_pts, backwords ? AVSEEK_FLAG_BACKWARD : 0); ret = av_seek_frame(m_pFormatContext, -1, seek_pts, backwords ? AVSEEK_FLAG_BACKWARD : 0);
if(ret >= 0) if(ret >= 0)
@ -874,8 +852,8 @@ index 81a511e..9626dae 100644
+ } + }
} }
if(m_iCurrentPts == DVD_NOPTS_VALUE) if(m_currentPts == DVD_NOPTS_VALUE)
@@ -914,6 +950,165 @@ bool CDVDDemuxFFmpeg::SeekTime(int time, bool backwords, double *startpts) @@ -915,6 +951,165 @@ bool CDVDDemuxFFmpeg::SeekTime(int time, bool backwords, double *startpts)
return (ret >= 0); return (ret >= 0);
} }
@ -1042,7 +1020,7 @@ index 81a511e..9626dae 100644
{ {
CSingleLock lock(m_critSection); CSingleLock lock(m_critSection);
diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.h b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.h diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.h b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.h
index 48f0a69..bdc84b2 100644 index c2f607d..b7daa34 100644
--- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.h --- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.h
+++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.h +++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.h
@@ -102,6 +102,7 @@ class CDVDDemuxFFmpeg : public CDVDDemux @@ -102,6 +102,7 @@ class CDVDDemuxFFmpeg : public CDVDDemux
@ -1062,10 +1040,10 @@ index 48f0a69..bdc84b2 100644
}; };
From f2d82a63baea6ab7324eeca1a3161318db7abbf4 Mon Sep 17 00:00:00 2001 From eb6c9ab05b9e11f9fba0ec2187102dbf50b48e47 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de> From: xbmc <fernetmenta@online.de>
Date: Tue, 2 Oct 2012 13:02:10 +0200 Date: Tue, 2 Oct 2012 13:02:10 +0200
Subject: [PATCH 07/23] dvdplayer: avoid short screen flicker caused by Subject: [PATCH 06/24] dvdplayer: avoid short screen flicker caused by
unnecessary reconfigure of renderer unnecessary reconfigure of renderer
--- ---
@ -1073,7 +1051,7 @@ Subject: [PATCH 07/23] dvdplayer: avoid short screen flicker caused by
1 file changed, 4 insertions(+), 1 deletion(-) 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
index b2ee525..aef2635 100644 index 4f35e3a..4c0551d 100644
--- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
@@ -1052,13 +1052,16 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts) @@ -1052,13 +1052,16 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts)
@ -1095,10 +1073,10 @@ index b2ee525..aef2635 100644
|| ( m_output.extended_format != pPicture->extended_format ) || ( m_output.extended_format != pPicture->extended_format )
|| ( m_output.color_matrix != pPicture->color_matrix && pPicture->color_matrix != 0 ) // don't reconfigure on unspecified || ( m_output.color_matrix != pPicture->color_matrix && pPicture->color_matrix != 0 ) // don't reconfigure on unspecified
From 28a8600a537cdb87495baf7f7b98dbdd97e57d97 Mon Sep 17 00:00:00 2001 From 8a105d14b71c550128a2bb45a2e620992161ea28 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de> From: xbmc <fernetmenta@online.de>
Date: Thu, 11 Oct 2012 12:05:50 +0200 Date: Thu, 11 Oct 2012 12:05:50 +0200
Subject: [PATCH 08/23] vdpau: advanced settings for auto deinterlacing Subject: [PATCH 07/24] vdpau: advanced settings for auto deinterlacing
--- ---
xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 8 ++++---- xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 8 ++++----
@ -1161,18 +1139,18 @@ index 7df586e..eccd25c 100644
bool m_videoVDPAUdeintSkipChromaHD; bool m_videoVDPAUdeintSkipChromaHD;
bool m_musicUseTimeSeeking; bool m_musicUseTimeSeeking;
From 3b3bdcac20a65cea8bed5de0a90cae5d8c13edf5 Mon Sep 17 00:00:00 2001 From 399576b60dda39f175c8e06b7f53be5a61e6417f Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de> From: xbmc <fernetmenta@online.de>
Date: Fri, 2 Nov 2012 13:20:03 +0100 Date: Fri, 2 Nov 2012 13:20:03 +0100
Subject: [PATCH 09/23] player: fix rewind Subject: [PATCH 08/24] player: fix rewind
--- ---
xbmc/cores/dvdplayer/DVDMessage.h | 5 ++++- xbmc/cores/dvdplayer/DVDMessage.h | 5 +++-
xbmc/cores/dvdplayer/DVDPlayer.cpp | 30 +++++++++++++++++++----------- xbmc/cores/dvdplayer/DVDPlayer.cpp | 41 ++++++++++++++++++++++-----------
xbmc/cores/dvdplayer/DVDPlayer.h | 7 ++++--- xbmc/cores/dvdplayer/DVDPlayer.h | 8 ++++---
xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 4 +++- xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 18 ++++++++++++++-
xbmc/cores/dvdplayer/DVDPlayerVideo.h | 1 + xbmc/cores/dvdplayer/DVDPlayerVideo.h | 1 +
5 files changed, 31 insertions(+), 16 deletions(-) 5 files changed, 55 insertions(+), 18 deletions(-)
diff --git a/xbmc/cores/dvdplayer/DVDMessage.h b/xbmc/cores/dvdplayer/DVDMessage.h diff --git a/xbmc/cores/dvdplayer/DVDMessage.h b/xbmc/cores/dvdplayer/DVDMessage.h
index a365821..07366df 100644 index a365821..07366df 100644
@ -1212,10 +1190,18 @@ index a365821..07366df 100644
class CDVDMsgPlayerSeekChapter : public CDVDMsg class CDVDMsgPlayerSeekChapter : public CDVDMsg
diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp
index f5f697e..7eb564a 100644 index f5f697e..60dab1f 100644
--- a/xbmc/cores/dvdplayer/DVDPlayer.cpp --- a/xbmc/cores/dvdplayer/DVDPlayer.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp
@@ -1794,11 +1794,13 @@ void CDVDPlayer::HandlePlaySpeed() @@ -590,6 +590,7 @@ bool CDVDPlayer::OpenFile(const CFileItem& file, const CPlayerOptions &options)
SetPlaySpeed(DVD_PLAYSPEED_NORMAL);
m_State.Clear();
+ memset(&m_SpeedState, 0, sizeof(m_SpeedState));
m_UpdateApplication = 0;
m_offset_pts = 0;
m_CurrentAudio.originaldts = DVD_NOPTS_VALUE;
@@ -1794,11 +1795,13 @@ void CDVDPlayer::HandlePlaySpeed()
} }
else if (m_CurrentVideo.id >= 0 else if (m_CurrentVideo.id >= 0
&& (m_CurrentVideo.inited == true || GetPlaySpeed() < 0) // allow rewind at end of file && (m_CurrentVideo.inited == true || GetPlaySpeed() < 0) // allow rewind at end of file
@ -1230,16 +1216,26 @@ index f5f697e..7eb564a 100644
// check how much off clock video is when ff/rw:ing // check how much off clock video is when ff/rw:ing
// a problem here is that seeking isn't very accurate // a problem here is that seeking isn't very accurate
// and since the clock will be resynced after seek // and since the clock will be resynced after seek
@@ -1817,7 +1819,7 @@ void CDVDPlayer::HandlePlaySpeed() @@ -1815,9 +1818,15 @@ void CDVDPlayer::HandlePlaySpeed()
if(error > DVD_MSEC_TO_TIME(1000))
{ {
CLog::Log(LOGDEBUG, "CDVDPlayer::Process - Seeking to catch up"); - CLog::Log(LOGDEBUG, "CDVDPlayer::Process - Seeking to catch up");
int64_t iTime = (int64_t)DVD_TIME_TO_MSEC(m_clock.GetClock() + m_State.time_offset + 500000.0 * m_playSpeed / DVD_PLAYSPEED_NORMAL); - int64_t iTime = (int64_t)DVD_TIME_TO_MSEC(m_clock.GetClock() + m_State.time_offset + 500000.0 * m_playSpeed / DVD_PLAYSPEED_NORMAL);
- m_messenger.Put(new CDVDMsgPlayerSeek((int) iTime, (GetPlaySpeed() < 0), true, false, false, true)); - m_messenger.Put(new CDVDMsgPlayerSeek((int) iTime, (GetPlaySpeed() < 0), true, false, false, true));
+ m_messenger.Put(new CDVDMsgPlayerSeek((int) iTime, (GetPlaySpeed() < 0), true, false, false, true, false)); + error = (int)DVD_TIME_TO_MSEC(m_clock.GetClock()) - m_SpeedState.lastseekpts;
+
+ if(abs(error) > 1000)
+ {
+ CLog::Log(LOGDEBUG, "CDVDPlayer::Process - Seeking to catch up");
+ m_SpeedState.lastseekpts = (int)DVD_TIME_TO_MSEC(m_clock.GetClock());
+ int iTime = DVD_TIME_TO_MSEC(m_clock.GetClock() + m_State.time_offset + 500000.0 * m_playSpeed / DVD_PLAYSPEED_NORMAL);
+ m_messenger.Put(new CDVDMsgPlayerSeek(iTime, (GetPlaySpeed() < 0), true, false, false, true, false));
+ }
} }
} }
} }
@@ -2289,7 +2291,7 @@ void CDVDPlayer::HandleMessages() @@ -2289,7 +2298,7 @@ void CDVDPlayer::HandleMessages()
else else
m_StateInput.dts = start; m_StateInput.dts = start;
@ -1248,7 +1244,7 @@ index f5f697e..7eb564a 100644
} }
else else
CLog::Log(LOGWARNING, "error while seeking"); CLog::Log(LOGWARNING, "error while seeking");
@@ -2425,9 +2427,10 @@ void CDVDPlayer::HandleMessages() @@ -2425,9 +2434,10 @@ void CDVDPlayer::HandleMessages()
double offset; double offset;
offset = CDVDClock::GetAbsoluteClock() - m_State.timestamp; offset = CDVDClock::GetAbsoluteClock() - m_State.timestamp;
offset *= m_playSpeed / DVD_PLAYSPEED_NORMAL; offset *= m_playSpeed / DVD_PLAYSPEED_NORMAL;
@ -1260,7 +1256,7 @@ index f5f697e..7eb564a 100644
m_State.timestamp = CDVDClock::GetAbsoluteClock(); m_State.timestamp = CDVDClock::GetAbsoluteClock();
} }
@@ -2443,7 +2446,8 @@ void CDVDPlayer::HandleMessages() @@ -2443,7 +2453,8 @@ void CDVDPlayer::HandleMessages()
// do a seek after rewind, clock is not in sync with current pts // do a seek after rewind, clock is not in sync with current pts
if (m_playSpeed < 0 && speed >= 0) if (m_playSpeed < 0 && speed >= 0)
{ {
@ -1270,7 +1266,7 @@ index f5f697e..7eb564a 100644
} }
// if playspeed is different then DVD_PLAYSPEED_NORMAL or DVD_PLAYSPEED_PAUSE // if playspeed is different then DVD_PLAYSPEED_NORMAL or DVD_PLAYSPEED_PAUSE
@@ -3414,7 +3418,7 @@ void CDVDPlayer::UpdateClockMaster() @@ -3414,7 +3425,7 @@ void CDVDPlayer::UpdateClockMaster()
} }
} }
@ -1279,7 +1275,7 @@ index f5f697e..7eb564a 100644
{ {
double startpts; double startpts;
if(accurate && !m_omxplayer_mode) if(accurate && !m_omxplayer_mode)
@@ -3426,19 +3430,23 @@ void CDVDPlayer::FlushBuffers(bool queued, double pts, bool accurate) @@ -3426,19 +3437,23 @@ void CDVDPlayer::FlushBuffers(bool queued, double pts, bool accurate)
if(startpts != DVD_NOPTS_VALUE) if(startpts != DVD_NOPTS_VALUE)
startpts -= m_offset_pts; startpts -= m_offset_pts;
@ -1307,7 +1303,7 @@ index f5f697e..7eb564a 100644
m_CurrentTeletext.dts = DVD_NOPTS_VALUE; m_CurrentTeletext.dts = DVD_NOPTS_VALUE;
m_CurrentTeletext.startpts = startpts; m_CurrentTeletext.startpts = startpts;
@@ -3482,7 +3490,7 @@ void CDVDPlayer::FlushBuffers(bool queued, double pts, bool accurate) @@ -3482,7 +3497,7 @@ void CDVDPlayer::FlushBuffers(bool queued, double pts, bool accurate)
m_CurrentTeletext.started = false; m_CurrentTeletext.started = false;
} }
@ -1317,7 +1313,7 @@ index f5f697e..7eb564a 100644
UpdatePlayState(0); UpdatePlayState(0);
diff --git a/xbmc/cores/dvdplayer/DVDPlayer.h b/xbmc/cores/dvdplayer/DVDPlayer.h diff --git a/xbmc/cores/dvdplayer/DVDPlayer.h b/xbmc/cores/dvdplayer/DVDPlayer.h
index dac00e9..9bcfc02 100644 index dac00e9..dbce0a0 100644
--- a/xbmc/cores/dvdplayer/DVDPlayer.h --- a/xbmc/cores/dvdplayer/DVDPlayer.h
+++ b/xbmc/cores/dvdplayer/DVDPlayer.h +++ b/xbmc/cores/dvdplayer/DVDPlayer.h
@@ -339,7 +339,7 @@ class CDVDPlayer : public IPlayer, public CThread, public IDVDPlayer @@ -339,7 +339,7 @@ class CDVDPlayer : public IPlayer, public CThread, public IDVDPlayer
@ -1329,7 +1325,7 @@ index dac00e9..9bcfc02 100644
void HandleMessages(); void HandleMessages();
void HandlePlaySpeed(); void HandlePlaySpeed();
@@ -393,8 +393,9 @@ class CDVDPlayer : public IPlayer, public CThread, public IDVDPlayer @@ -393,8 +393,10 @@ class CDVDPlayer : public IPlayer, public CThread, public IDVDPlayer
int m_playSpeed; int m_playSpeed;
struct SSpeedState struct SSpeedState
{ {
@ -1337,15 +1333,37 @@ index dac00e9..9bcfc02 100644
- double lasttime; - double lasttime;
+ double lastpts; // holds last display pts during ff/rw operations + double lastpts; // holds last display pts during ff/rw operations
+ int64_t lasttime; + int64_t lasttime;
+ int lastseekpts;
+ double lastabstime; + double lastabstime;
} m_SpeedState; } m_SpeedState;
int m_errorCount; int m_errorCount;
diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
index aef2635..bd97d62 100644 index 4c0551d..0a4de2c 100644
--- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
@@ -1466,7 +1466,7 @@ double CDVDPlayerVideo::GetCurrentPts() @@ -1160,6 +1160,20 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts)
pts += m_iVideoDelay - DVD_SEC_TO_TIME(g_renderManager.GetDisplayLatency());
}
+ if (m_speed < 0)
+ {
+ double inputPts = m_droppingStats.m_lastPts;
+ double renderPts = m_droppingStats.m_lastRenderPts;
+ if (pts > renderPts)
+ {
+ if (inputPts >= renderPts)
+ {
+ Sleep(50);
+ }
+ return result | EOS_DROPPED;
+ }
+ }
+
// calculate the time we need to delay this picture before displaying
double iSleepTime, iClockSleep, iFrameSleep, iPlayingClock, iCurrentClock;
@@ -1466,7 +1480,7 @@ double CDVDPlayerVideo::GetCurrentPts()
if( m_stalled ) if( m_stalled )
iRenderPts = DVD_NOPTS_VALUE; iRenderPts = DVD_NOPTS_VALUE;
@ -1354,7 +1372,7 @@ index aef2635..bd97d62 100644
iRenderPts = iRenderPts - max(0.0, iSleepTime); iRenderPts = iRenderPts - max(0.0, iSleepTime);
return iRenderPts; return iRenderPts;
@@ -1567,6 +1567,8 @@ int CDVDPlayerVideo::CalcDropRequirement(double pts) @@ -1567,6 +1581,8 @@ int CDVDPlayerVideo::CalcDropRequirement(double pts)
int iDroppedPics = -1; int iDroppedPics = -1;
int iBufferLevel; int iBufferLevel;
@ -1376,17 +1394,17 @@ index a38a9c3..4e1b3d6 100644
unsigned int m_dropRequests; unsigned int m_dropRequests;
}; };
From 3a6811a6f1672382882081e4a73961d69620ee71 Mon Sep 17 00:00:00 2001 From 48438ffa62caf266c82ef33dcd10d58d914de8ae Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de> From: xbmc <fernetmenta@online.de>
Date: Thu, 28 Mar 2013 20:50:59 +0100 Date: Thu, 28 Mar 2013 20:50:59 +0100
Subject: [PATCH 10/23] fix incorrect display of fps when dr kicks in Subject: [PATCH 09/24] fix incorrect display of fps when dr kicks in
--- ---
xbmc/Application.cpp | 3 ++- xbmc/Application.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-) 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index d5604dc..1d7990d 100644 index ee59549..338039e 100644
--- a/xbmc/Application.cpp --- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp +++ b/xbmc/Application.cpp
@@ -2326,10 +2326,11 @@ void CApplication::Render() @@ -2326,10 +2326,11 @@ void CApplication::Render()
@ -1403,10 +1421,10 @@ index d5604dc..1d7990d 100644
g_renderManager.UpdateResolution(); g_renderManager.UpdateResolution();
From e3368368565f4266876bba560bfedaa5dcb978cd Mon Sep 17 00:00:00 2001 From 47eea9d903f1bc98d4fb81365f40dcce508a3ae5 Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de> From: Rainer Hochecker <fernetmenta@online.de>
Date: Thu, 25 Jul 2013 17:18:13 +0200 Date: Thu, 25 Jul 2013 17:18:13 +0200
Subject: [PATCH 11/23] ActiveAE: slightly reduce buffer size Subject: [PATCH 10/24] ActiveAE: slightly reduce buffer size
--- ---
xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 4 ++-- xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 4 ++--
@ -1428,10 +1446,10 @@ index 0e4d8da..99538dc 100644
void CEngineStats::Reset(unsigned int sampleRate) void CEngineStats::Reset(unsigned int sampleRate)
From 52caa1299bb91e7807d24c28cdeb26b53186ca90 Mon Sep 17 00:00:00 2001 From 55ccc433a49843001e8c2120aca2bc5ae245f521 Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de> From: Rainer Hochecker <fernetmenta@online.de>
Date: Sun, 4 Aug 2013 10:11:16 +0200 Date: Sun, 4 Aug 2013 10:11:16 +0200
Subject: [PATCH 12/23] Revert "vdpau: comment some features that will be added Subject: [PATCH 11/24] Revert "vdpau: comment some features that will be added
later" later"
This reverts commit e00b4f65864d623ab4d2e9e5c06db138e661f1cf. This reverts commit e00b4f65864d623ab4d2e9e5c06db138e661f1cf.
@ -1484,17 +1502,17 @@ index 8c353af..33ec1f4 100644
m_mixersteps = 1; m_mixersteps = 1;
} }
From 562200d01eaaf57f307a228b06360a5a3aa969fc Mon Sep 17 00:00:00 2001 From e41a871e824620d5b2d7f59cec4bcabba66d75ec Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de> From: Rainer Hochecker <fernetmenta@online.de>
Date: Tue, 28 Jan 2014 10:05:26 +0100 Date: Tue, 28 Jan 2014 10:05:26 +0100
Subject: [PATCH 13/23] xbmc pr 3080 Subject: [PATCH 12/24] xbmc pr 3080
--- ---
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 8 ++++++++ xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 8 ++++++++
1 file changed, 8 insertions(+) 1 file changed, 8 insertions(+)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
index 2d955c2..245ef50 100644 index 84b1eff..67f0e80 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
@@ -475,6 +475,14 @@ int CDVDVideoCodecFFmpeg::Decode(uint8_t* pData, int iSize, double dts, double p @@ -475,6 +475,14 @@ int CDVDVideoCodecFFmpeg::Decode(uint8_t* pData, int iSize, double dts, double p
@ -1513,10 +1531,10 @@ index 2d955c2..245ef50 100644
* Setting it correctly would allow CorePNG decoding. */ * Setting it correctly would allow CorePNG decoding. */
avpkt.flags = AV_PKT_FLAG_KEY; avpkt.flags = AV_PKT_FLAG_KEY;
From aad64950df2c09264bff2b96de02be539b3c4be0 Mon Sep 17 00:00:00 2001 From 2c55fb28f8287d6fdc6dbca4b2f9dd2aea9fabe2 Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de> From: Rainer Hochecker <fernetmenta@online.de>
Date: Tue, 11 Feb 2014 18:15:06 +0100 Date: Tue, 11 Feb 2014 18:15:06 +0100
Subject: [PATCH 14/23] ActiveAE: add some debug logging Subject: [PATCH 13/24] ActiveAE: add some debug logging
--- ---
xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp | 6 ++++++ xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp | 6 ++++++
@ -1541,64 +1559,15 @@ index 96bce12..7bd9c9b 100644
return copied; return copied;
} }
From ec7b7635467812012195d432588068198e5afca9 Mon Sep 17 00:00:00 2001 From 6c08bfc1b52f13e5a28aab3cf59bc780470c9fb8 Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de> From: Rainer Hochecker <fernetmenta@online.de>
Date: Sat, 23 Aug 2014 11:42:31 +0200 Date: Sat, 23 Aug 2014 11:42:31 +0200
Subject: [PATCH 15/23] dvdplayer: rename codec ctrl flags Subject: [PATCH 14/24] dvdplayer: rename codec ctrl flags
--- ---
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h | 14 ++++++++------ xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 8 ++++----
.../dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 2 +- 1 file changed, 4 insertions(+), 4 deletions(-)
xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 8 ++++----
xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 4 ++--
4 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h
index e80358f..1dd7590 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h
@@ -149,9 +149,9 @@ struct DVDVideoUserData
#define DVP_FLAG_NOSKIP 0x00000010 // indicate this picture should never be dropped
#define DVP_FLAG_DROPPED 0x00000020 // indicate that this picture has been dropped in decoder stage, will have no data
-#define DVP_FLAG_DROPDEINT 0x00000040 // indicate that this picture was requested to have been dropped in deint stage
-#define DVP_FLAG_NO_POSTPROC 0x00000100 // see GetCodecStats
-#define DVP_FLAG_DRAIN 0x00000200 // see GetCodecStats
+#define DVD_CODEC_CTRL_SKIPDEINT 0x01000000 // indicate that this picture was requested to have been dropped in deint stage
+#define DVD_CODEC_CTRL_NO_POSTPROC 0x02000000 // see GetCodecStats
+#define DVD_CODEC_CTRL_DRAIN 0x04000000 // see GetCodecStats
// DVP_FLAG 0x00000100 - 0x00000f00 is in use by libmpeg2!
@@ -325,10 +325,12 @@ class CDVDVideoCodec
/**
* Codec can be informed by player with the following flags:
*
- * DVP_FLAG_NO_POSTPROC : if speed is not normal the codec can switch off
- * postprocessing and de-interlacing
+ * DVD_CODEC_CTRL_NO_POSTPROC :
+ * if speed is not normal the codec can switch off
+ * postprocessing and de-interlacing
*
- * DVP_FLAG_DRAIN : codecs may do postprocessing and de-interlacing.
+ * DVD_CODEC_CTRL_DRAIN :
+ * codecs may do postprocessing and de-interlacing.
* If video buffers in RenderManager are about to run dry,
* this is signaled to codec. Codec can wait for post-proc
* to be finished instead of returning empty and getting another
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
index 245ef50..67f0e80 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
@@ -665,7 +665,7 @@ bool CDVDVideoCodecFFmpeg::GetPictureCommon(DVDVideoPicture* pDvdVideoPicture)
if (m_requestSkipDeint)
{
- pDvdVideoPicture->iFlags |= DVP_FLAG_DROPDEINT;
+ pDvdVideoPicture->iFlags |= DVD_CODEC_CTRL_SKIPDEINT;
m_skippedDeint = 1;
}
else
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
index 33ec1f4..300b901 100644 index 33ec1f4..300b901 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
@ -1639,27 +1608,11 @@ index 33ec1f4..300b901 100644
{ {
m_mixersteps = 1; m_mixersteps = 1;
} }
diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
index bd97d62..d30a0ad 100644
--- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
@@ -523,9 +523,9 @@ void CDVDPlayerVideo::Process()
}
int codecControl = 0;
if (iDropDirective & EOS_BUFFER_LEVEL)
- codecControl |= DVP_FLAG_DRAIN;
+ codecControl |= DVD_CODEC_CTRL_DRAIN;
if (m_speed > DVD_PLAYSPEED_NORMAL)
- codecControl |= DVP_FLAG_NO_POSTPROC;
+ codecControl |= DVD_CODEC_CTRL_NO_POSTPROC;
m_pVideoCodec->SetCodecControl(codecControl);
if (iDropDirective & EOS_DROPPED)
{
From a10235c233e6033b0aa684fe4089871a703b5746 Mon Sep 17 00:00:00 2001 From dcf0b4a0d5a8786f31eac6ee0693ab83d9f27cbc Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de> From: Rainer Hochecker <fernetmenta@online.de>
Date: Fri, 13 Jun 2014 14:37:16 +0200 Date: Fri, 13 Jun 2014 14:37:16 +0200
Subject: [PATCH 16/23] VAAPI: implement codec control flags Subject: [PATCH 15/24] VAAPI: implement codec control flags
--- ---
.../DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 21 ++++++++++++++++++--- .../DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 21 ++++++++++++++++++---
@ -1707,7 +1660,7 @@ index 67f0e80..2984847 100644
pDvdVideoPicture->pts = DVD_NOPTS_VALUE; pDvdVideoPicture->pts = DVD_NOPTS_VALUE;
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
index 87e66fe..732e92b 100644 index 707d609..e0709226 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
@@ -739,6 +739,8 @@ int CDecoder::Decode(AVCodecContext* avctx, AVFrame* pFrame) @@ -739,6 +739,8 @@ int CDecoder::Decode(AVCodecContext* avctx, AVFrame* pFrame)
@ -1763,56 +1716,54 @@ index 87e66fe..732e92b 100644
VAProcFilterParameterBufferDeinterlacing *filterParams; VAProcFilterParameterBufferDeinterlacing *filterParams;
VABufferID pipelineBuf; VABufferID pipelineBuf;
From ebcd73d2e432a07f5b6a9730fb947ce3c09c3846 Mon Sep 17 00:00:00 2001 From 8a0a138bad535b58fb0d485540c21b08888cecb1 Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de> From: Rainer Hochecker <fernetmenta@online.de>
Date: Thu, 4 Sep 2014 09:25:48 +0200 Date: Sun, 28 Sep 2014 13:52:11 +0200
Subject: [PATCH 17/23] consider rounding errors in dropping control Subject: [PATCH 16/24] pthreads: use mutex protocol PTHREAD_PRIO_INHERIT
--- ---
xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 2 +- xbmc/threads/platform/pthreads/Implementation.cpp | 1 +
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+)
diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp diff --git a/xbmc/threads/platform/pthreads/Implementation.cpp b/xbmc/threads/platform/pthreads/Implementation.cpp
index d30a0ad..c2d4b31 100644 index 628db54..123526d 100644
--- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp --- a/xbmc/threads/platform/pthreads/Implementation.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/threads/platform/pthreads/Implementation.cpp
@@ -1606,7 +1606,7 @@ int CDVDPlayerVideo::CalcDropRequirement(double pts) @@ -38,6 +38,7 @@ namespace XbmcThreads
m_droppingStats.m_dropRequests = 0; {
CLog::Log(LOGDEBUG,"CDVDPlayerVideo::CalcDropRequirement - dropped pictures, Sleeptime: %f, Bufferlevel: %d, Gain: %f", iSleepTime, iBufferLevel, iGain); pthread_mutexattr_init(&recursiveAttr);
} pthread_mutexattr_settype(&recursiveAttr,PTHREAD_MUTEX_RECURSIVE);
- else if (iDroppedPics < 0 && iGain > 1/m_fFrameRate) + pthread_mutexattr_setprotocol(&recursiveAttr,PTHREAD_PRIO_INHERIT);
+ else if (iDroppedPics < 0 && iGain > (1/m_fFrameRate + 0.001)) alreadyCalled = true;
{ }
CDroppingStats::CGain gain; return true; // note, we never call destroy.
gain.gain = iGain;
From 0d3311557fe32505770ed28bcb8fbcde7c751399 Mon Sep 17 00:00:00 2001
From c71b09b5a21b5ff95527e33ba4ad921ff64a64f3 Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de> From: Rainer Hochecker <fernetmenta@online.de>
Date: Sat, 4 Oct 2014 21:25:31 +0200 Date: Sat, 4 Oct 2014 21:25:31 +0200
Subject: [PATCH 19/23] vaapi: lock gfx context on pre-cleanup Subject: [PATCH 17/24] vaapi: lock gfx context on pre-cleanup
--- ---
xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp | 1 + xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp | 1 +
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
index 732e92b..849e26a 100644 index e0709226..a086d13 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
@@ -618,6 +618,7 @@ long CDecoder::Release() @@ -618,6 +618,7 @@ long CDecoder::Release()
CSingleLock lock(m_DecoderSection); CSingleLock lock(m_DecoderSection);
CLog::Log(LOGNOTICE,"VAAPI::Release pre-cleanup"); CLog::Log(LOGDEBUG,"VAAPI::Release pre-cleanup");
+ CSingleLock lock1(g_graphicsContext); + CSingleLock lock1(g_graphicsContext);
Message *reply; Message *reply;
if (m_vaapiOutput.m_controlPort.SendOutMessageSync(COutputControlProtocol::PRECLEANUP, if (m_vaapiOutput.m_controlPort.SendOutMessageSync(COutputControlProtocol::PRECLEANUP,
&reply, &reply,
From 7aea148f78db91c4a2e75c280972e98735791a28 Mon Sep 17 00:00:00 2001 From 42bff6329800ba57459d135f54d0ca7d8eef1b79 Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi@xbmc.org> From: Anssi Hannula <anssi@xbmc.org>
Date: Sun, 19 Oct 2014 21:34:47 +0300 Date: Sun, 19 Oct 2014 21:34:47 +0300
Subject: [PATCH 20/23] [linux] Add FDEventMonitor for monitoring file Subject: [PATCH 18/24] [linux] Add FDEventMonitor for monitoring file
descriptors descriptors
Add FDEventMonitor helper thread for monitoring file descriptors for Add FDEventMonitor helper thread for monitoring file descriptors for
@ -2192,10 +2143,10 @@ index c147d8f..744fd06 100644
SRCS += LinuxTimezone.cpp SRCS += LinuxTimezone.cpp
SRCS += PosixMountProvider.cpp SRCS += PosixMountProvider.cpp
From b465939ca69cc2e02190a815d7b3e7291e14ca87 Mon Sep 17 00:00:00 2001 From a7369e2f95722730f22ebd72e1d22bbf3d0fabe5 Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi@xbmc.org> From: Anssi Hannula <anssi@xbmc.org>
Date: Sun, 19 Oct 2014 21:36:44 +0300 Date: Sun, 19 Oct 2014 21:36:44 +0300
Subject: [PATCH 21/23] [AE] ALSA: Add ALSADeviceMonitor for monitoring card Subject: [PATCH 19/24] [AE] ALSA: Add ALSADeviceMonitor for monitoring card
removals/additions removals/additions
--- ---
@ -2471,10 +2422,10 @@ index 0000000..f9e2f26
+#endif +#endif
+ +
From f5555b53d7886387a624f011e7a58ec5cd247635 Mon Sep 17 00:00:00 2001 From 51947c5716e52af108d701b6fb573e8ca145f132 Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi@xbmc.org> From: Anssi Hannula <anssi@xbmc.org>
Date: Sun, 19 Oct 2014 21:37:49 +0300 Date: Sun, 19 Oct 2014 21:37:49 +0300
Subject: [PATCH 22/23] [AE] ALSA: Add ALSADeviceMonitor for monitoring ELD Subject: [PATCH 20/24] [AE] ALSA: Add ALSADeviceMonitor for monitoring ELD
changes changes
ELD changes can happen e.g. when the connected HDMI sink is changed. ELD changes can happen e.g. when the connected HDMI sink is changed.
@ -2815,17 +2766,120 @@ index 0000000..56dfd50
+#endif +#endif
+ +
From 09b1724482fd9666e976c831976e30afe33537ab Mon Sep 17 00:00:00 2001 From 1800cdd76ee8224dce93b7cea3e96d2c3df9ee49 Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi@xbmc.org>
Date: Sun, 2 Nov 2014 21:10:51 +0200
Subject: [PATCH 21/24] [AE] ALSA: Add more logging to device change triggers
---
xbmc/cores/AudioEngine/Sinks/alsa/ALSADeviceMonitor.cpp | 13 +++++++++++--
xbmc/cores/AudioEngine/Sinks/alsa/ALSAHControlMonitor.cpp | 2 ++
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/xbmc/cores/AudioEngine/Sinks/alsa/ALSADeviceMonitor.cpp b/xbmc/cores/AudioEngine/Sinks/alsa/ALSADeviceMonitor.cpp
index e3269ad..b0243b9 100644
--- a/xbmc/cores/AudioEngine/Sinks/alsa/ALSADeviceMonitor.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/alsa/ALSADeviceMonitor.cpp
@@ -113,12 +113,21 @@ void CALSADeviceMonitor::FDEventCallback(int id, int fd, short revents, void *da
const char* action = udev_device_get_action(device);
const char* soundInitialized = udev_device_get_property_value(device, "SOUND_INITIALIZED");
+ if (!action || !soundInitialized)
+ continue;
+
/* cardX devices emit a "change" event when ready (i.e. all subdevices added) */
- if (action && soundInitialized &&
- (strcmp(action, "change") == 0 || strcmp(action, "remove") == 0))
+ if (strcmp(action, "change") == 0)
{
+ CLog::Log(LOGDEBUG, "CALSADeviceMonitor - ALSA card added (\"%s\", \"%s\")", udev_device_get_syspath(device), udev_device_get_devpath(device));
audioDevicesChanged = true;
}
+ else if (strcmp(action, "remove") == 0)
+ {
+ CLog::Log(LOGDEBUG, "CALSADeviceMonitor - ALSA card removed");
+ audioDevicesChanged = true;
+ }
+
udev_device_unref(device);
}
diff --git a/xbmc/cores/AudioEngine/Sinks/alsa/ALSAHControlMonitor.cpp b/xbmc/cores/AudioEngine/Sinks/alsa/ALSAHControlMonitor.cpp
index 9b595ee..f9ca9ae 100644
--- a/xbmc/cores/AudioEngine/Sinks/alsa/ALSAHControlMonitor.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/alsa/ALSAHControlMonitor.cpp
@@ -120,6 +120,8 @@ int CALSAHControlMonitor::HCTLCallback(snd_hctl_elem_t *elem, unsigned int mask)
*/
if (mask & SND_CTL_EVENT_MASK_VALUE)
{
+ CLog::Log(LOGDEBUG, "CALSAHControlMonitor - Monitored ALSA hctl value changed");
+
CAEFactory::DeviceChange();
}
From f8baf30230b7db45865e13260298830313481263 Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi@xbmc.org>
Date: Tue, 4 Nov 2014 19:22:03 +0200
Subject: [PATCH 22/24] [AE] ALSA: Fix DeviceChange event triggered by
enumeration
All hctl elements get an SND_CTL_EVENT_MASK_REMOVE event when the ctl
file descriptor is closed, which is done e.g. when re-enumerating
devices.
(SND_CTL_EVENT_MASK_REMOVE & SND_CTL_EVENT_MASK_VALUE) is true, and
therefore we re-triggered enumeration (depending a bit on timing).
Fix that by checking for the special _REMOVE value first and ignoring
those events.
---
.../cores/AudioEngine/Sinks/alsa/ALSAHControlMonitor.cpp | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/xbmc/cores/AudioEngine/Sinks/alsa/ALSAHControlMonitor.cpp b/xbmc/cores/AudioEngine/Sinks/alsa/ALSAHControlMonitor.cpp
index f9ca9ae..89a7585 100644
--- a/xbmc/cores/AudioEngine/Sinks/alsa/ALSAHControlMonitor.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/alsa/ALSAHControlMonitor.cpp
@@ -114,14 +114,22 @@ void CALSAHControlMonitor::Stop()
int CALSAHControlMonitor::HCTLCallback(snd_hctl_elem_t *elem, unsigned int mask)
{
- /*
- * Currently we just re-enumerate on any change.
- * Custom callbacks for handling other control monitoring may be implemented when needed.
- */
+ /* _REMOVE is a special value instead of a bit and must be checked first */
+ if (mask == SND_CTL_EVENT_MASK_REMOVE)
+ {
+ /* Either the device was removed (which is handled in ALSADeviceMonitor instead)
+ * or snd_hctl_close() got called. */
+ return 0;
+ }
+
if (mask & SND_CTL_EVENT_MASK_VALUE)
{
CLog::Log(LOGDEBUG, "CALSAHControlMonitor - Monitored ALSA hctl value changed");
+ /*
+ * Currently we just re-enumerate on any change.
+ * Custom callbacks for handling other control monitoring may be implemented when needed.
+ */
CAEFactory::DeviceChange();
}
From 8d85a4aec9e17f8ddb7e26e01df83f50b7c53eb2 Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de> From: Rainer Hochecker <fernetmenta@online.de>
Date: Sat, 1 Nov 2014 07:47:16 +0100 Date: Sat, 1 Nov 2014 07:47:16 +0100
Subject: [PATCH 23/23] videorefclock: use videosync DRM on AMD systems Subject: [PATCH 23/24] videorefclock: use videosync DRM on AMD systems
--- ---
xbmc/video/VideoReferenceClock.cpp | 3 ++- xbmc/video/VideoReferenceClock.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-) 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xbmc/video/VideoReferenceClock.cpp b/xbmc/video/VideoReferenceClock.cpp diff --git a/xbmc/video/VideoReferenceClock.cpp b/xbmc/video/VideoReferenceClock.cpp
index 03f8bf3..1d403bd 100644 index be6be5f..2b506ad 100644
--- a/xbmc/video/VideoReferenceClock.cpp --- a/xbmc/video/VideoReferenceClock.cpp
+++ b/xbmc/video/VideoReferenceClock.cpp +++ b/xbmc/video/VideoReferenceClock.cpp
@@ -99,7 +99,8 @@ void CVideoReferenceClock::Process() @@ -99,7 +99,8 @@ void CVideoReferenceClock::Process()
@ -2838,3 +2892,44 @@ index 03f8bf3..1d403bd 100644
m_pVideoSync = new CVideoSyncDRM(); m_pVideoSync = new CVideoSyncDRM();
#if defined(HAS_GLX) #if defined(HAS_GLX)
else else
From f5211d149c7af1b3f9273ed64c08a4af76fbc066 Mon Sep 17 00:00:00 2001
From: fritsch <Peter.Fruehberger@gmail.com>
Date: Fri, 7 Nov 2014 14:56:49 +0100
Subject: [PATCH 24/24] DVDVideoCodecFFmpeg: Squash me to: 2551ee3a
---
xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
index 368de0e..e9edd0c 100644
--- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
@@ -928,7 +928,7 @@ bool CDVDDemuxFFmpeg::SeekTime(int time, bool backwords, double *startpts)
// seek may fail silently on streams which allow discontinuity
// if current timestamp is way off asume a pts overflow and try bisect seek
- if (m_bPtsWrap && fabs(time - m_iCurrentPts/1000) > 10000)
+ if (m_bPtsWrap && fabs(time - m_currentPts/1000) > 10000)
{
ret = SeekTimeDiscont(seek_pts, backwords) ? 1 : -1;
}
@@ -1026,7 +1026,7 @@ bool CDVDDemuxFFmpeg::SeekTimeDiscont(int64_t pts, bool backwards)
bool ret = SeekByte(pos_max);
if (ret)
{
- m_iCurrentPts = ConvertTimestamp(ts_max, m_pFormatContext->streams[defaultStream]->time_base.den,
+ m_currentPts = ConvertTimestamp(ts_max, m_pFormatContext->streams[defaultStream]->time_base.den,
m_pFormatContext->streams[defaultStream]->time_base.num);
}
return ret;
@@ -1103,7 +1103,7 @@ bool CDVDDemuxFFmpeg::SeekTimeDiscont(int64_t pts, bool backwards)
bool ret = SeekByte(pos);
if (ret)
{
- m_iCurrentPts = ConvertTimestamp(ts, m_pFormatContext->streams[defaultStream]->time_base.den,
+ m_currentPts = ConvertTimestamp(ts, m_pFormatContext->streams[defaultStream]->time_base.den,
m_pFormatContext->streams[defaultStream]->time_base.num);
}

View File

@ -1,43 +0,0 @@
From 65342cfaebe4fcbea2e44bb61791b82197772ca1 Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi@xbmc.org>
Date: Tue, 4 Nov 2014 19:22:03 +0200
Subject: [PATCH] [AE] ALSA: Fix DeviceChange event triggered by enumeration
All hctl elements get an SND_CTL_EVENT_MASK_REMOVE event when the ctl
file descriptor is closed, which is done e.g. when re-enumerating
devices.
(SND_CTL_EVENT_MASK_REMOVE & SND_CTL_EVENT_MASK_VALUE) is true, and
therefore we re-triggered enumeration (depending a bit on timing).
Fix that by checking for the special _REMOVE value first and ignoring
those events.
---
diff -Naur kodi-14-d6947be/xbmc/cores/AudioEngine/Sinks/alsa/ALSAHControlMonitor.cpp kodi-14-d6947be.patch/xbmc/cores/AudioEngine/Sinks/alsa/ALSAHControlMonitor.cpp
--- kodi-14-d6947be/xbmc/cores/AudioEngine/Sinks/alsa/ALSAHControlMonitor.cpp 2014-11-05 09:22:22.494136199 +0100
+++ kodi-14-d6947be.patch/xbmc/cores/AudioEngine/Sinks/alsa/ALSAHControlMonitor.cpp 2014-11-05 09:25:41.754440039 +0100
@@ -114,12 +114,20 @@
int CALSAHControlMonitor::HCTLCallback(snd_hctl_elem_t *elem, unsigned int mask)
{
- /*
- * Currently we just re-enumerate on any change.
- * Custom callbacks for handling other control monitoring may be implemented when needed.
- */
+ /* _REMOVE is a special value instead of a bit and must be checked first */
+ if (mask == SND_CTL_EVENT_MASK_REMOVE)
+ {
+ /* Either the device was removed (which is handled in ALSADeviceMonitor instead)
+ * or snd_hctl_close() got called. */
+ return 0;
+ }
+
if (mask & SND_CTL_EVENT_MASK_VALUE)
{
+ /*
+ * Currently we just re-enumerate on any change.
+ * Custom callbacks for handling other control monitoring may be implemented when needed.
+ */
CAEFactory::DeviceChange();
}

File diff suppressed because it is too large Load Diff