diff --git a/projects/RPi/patches/kodi/kodi-001-newclock4.patch b/projects/RPi/patches/kodi/kodi-001-newclock4.patch index db3dfe1b23..0a4c23bdf0 100644 --- a/projects/RPi/patches/kodi/kodi-001-newclock4.patch +++ b/projects/RPi/patches/kodi/kodi-001-newclock4.patch @@ -1,7 +1,7 @@ -From db43b90d932355a33f96d1a72fe453b2be7aa515 Mon Sep 17 00:00:00 2001 +From a95b561674e3a6581326d059f785ab40d6cef1f2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 7 Apr 2014 18:19:32 +0100 -Subject: [PATCH 01/97] [rbp/omxplayer] When opening a stream don't try to +Subject: [PATCH 01/92] [rbp/omxplayer] When opening a stream don't try to update gui so often --- @@ -25,10 +25,10 @@ index e7cfcdd..20b99ad 100644 g_windowManager.ProcessRenderLoop(false); if (allowCancel && dialog->IsCanceled()) -From f20a96ee9b19c9e14b5d66a331feed74db39145a Mon Sep 17 00:00:00 2001 +From e7a9379bc4aca2a5a687230966400c9759359668 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 29 Apr 2014 15:23:22 +0100 -Subject: [PATCH 02/97] [ffmpeg] Speed up wtv index creation +Subject: [PATCH 02/92] [ffmpeg] Speed up wtv index creation The index creation is O(N^2) with number of entries (typically thousands). On a Pi this can take more than 60 seconds to execute for a recording of a few hours. @@ -114,10 +114,10 @@ index 0000000..4ac5636 + } + } -From df98d8034fad30e5995f3c45b12f27027ba421ea Mon Sep 17 00:00:00 2001 +From 9a566fa5584ed7eada1d4daaa0d6b555733313c1 Mon Sep 17 00:00:00 2001 From: Jonathan Marshall Date: Sat, 2 Nov 2013 23:49:17 +1300 -Subject: [PATCH 03/97] adds GetTvShowSeasons +Subject: [PATCH 03/92] adds GetTvShowSeasons --- xbmc/video/VideoDatabase.cpp | 30 ++++++++++++++++++++++++------ @@ -193,10 +193,10 @@ index 78259ed..cbb26b7 100644 bool GetArtTypes(const MediaType &mediaType, std::vector &artTypes); -From e88b6dcf0b5cfd5a4e57071100fc973ff886df76 Mon Sep 17 00:00:00 2001 +From 155611d52e8060bea3e7e7ab3c7f85421e2f80d4 Mon Sep 17 00:00:00 2001 From: Jonathan Marshall Date: Sat, 2 Nov 2013 23:50:10 +1300 -Subject: [PATCH 04/97] move AddSeason() public. +Subject: [PATCH 04/92] move AddSeason() public. --- xbmc/video/VideoDatabase.h | 2 +- @@ -223,10 +223,10 @@ index cbb26b7..1a79c00 100644 /*! \brief Adds a path to the tvshow link table. \param idShow the id of the show. -From fa469ae1473966b1ebd79d00fe2c942232f15add Mon Sep 17 00:00:00 2001 +From a32329719c0a8fcbeb4de57159dbbcee913e4f93 Mon Sep 17 00:00:00 2001 From: Jonathan Marshall Date: Sat, 2 Nov 2013 23:48:24 +1300 -Subject: [PATCH 05/97] adds GetArt function to (video) scraper, allowing art +Subject: [PATCH 05/92] adds GetArt function to (video) scraper, allowing art to be fetched given the video identifier. --- @@ -341,10 +341,10 @@ index 22ac229..75bc341 100644 enum LOOKUP_STATE { DO_NOTHING = 0, FIND_MOVIE = 1, -From 81a93e90587fcea04ead2d41fa92612da9b110cb Mon Sep 17 00:00:00 2001 +From 15dda702e7a7bb7d4be718a0071db38eba96a75f Mon Sep 17 00:00:00 2001 From: Jonathan Marshall Date: Sat, 2 Nov 2013 23:53:14 +1300 -Subject: [PATCH 06/97] refresh season art if a new season is found that isn't +Subject: [PATCH 06/92] refresh season art if a new season is found that isn't recorded in the database yet. Fixes #14339 --- @@ -448,10 +448,10 @@ index 92883e7..47d5ed4 100644 bool ProcessItemByVideoInfoTag(const CFileItem *item, EPISODELIST &episodeList); -From da76402a3bb4e1ea0be4fa1d08a5a8570c13f8ba Mon Sep 17 00:00:00 2001 +From a90d635e9e42ff2c075e2b7234fd6a723822f93e Mon Sep 17 00:00:00 2001 From: Jonathan Marshall Date: Sat, 2 Nov 2013 23:53:34 +1300 -Subject: [PATCH 07/97] REMOVEME: updated thetvdb.com scraper to support art +Subject: [PATCH 07/92] REMOVEME: updated thetvdb.com scraper to support art updates --- @@ -559,10 +559,10 @@ index f27e4fc..bdf329f 100644 -From d86ee1de0277fcf87ed9a59a6361cd5b3b829f89 Mon Sep 17 00:00:00 2001 +From 3222366568ca4d2349deec2778d0b3640587d50b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 2 Aug 2014 17:48:04 +0100 -Subject: [PATCH 08/97] [omx] Report decoded image name +Subject: [PATCH 08/92] [omx] Report decoded image name --- xbmc/cores/omxplayer/OMXImage.cpp | 1 + @@ -581,10 +581,10 @@ index aa413b9..22ec3f0 100644 else { -From 15733ea7d73ef9d09c526aff3b77d0612cf71837 Mon Sep 17 00:00:00 2001 +From 9f3437f332408ebce8317c6a5d40f031bf1c0436 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 14 Dec 2013 16:55:05 +0000 -Subject: [PATCH 09/97] logging: Add microsecond timer to log messages +Subject: [PATCH 09/92] logging: Add microsecond timer to log messages --- xbmc/utils/log.cpp | 17 +++++++++++++++-- @@ -637,10 +637,10 @@ index 3443f12..31c4a99 100644 levelNames[logLevel]) + strData; -From 7b84ea0c30c95bce668fb349963f89180fe86c6c Mon Sep 17 00:00:00 2001 +From b17c65fccb51569283f0daeee430d9cd6bc42d7b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 8 Mar 2014 15:36:06 +0000 -Subject: [PATCH 10/97] [hifiberry] Hack: force it to be recognised as IEC958 +Subject: [PATCH 10/92] [hifiberry] Hack: force it to be recognised as IEC958 capable to enable passthrough options --- @@ -663,10 +663,10 @@ index d30cbab..b268819 100644 info.m_displayName.substr(info.m_displayName.size()-5) == " HDMI") { -From 7a7e6b52a2465c34611b6248f306250bad36cdd5 Mon Sep 17 00:00:00 2001 +From ad917549f6ab25734da1d8834ed59665d6aa9ee9 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 11 Dec 2013 17:21:54 +0000 -Subject: [PATCH 11/97] Move the reference-counting of Begin and End calls from +Subject: [PATCH 11/92] Move the reference-counting of Begin and End calls from DX and GL source files into GUIFontTTF.cpp. --- @@ -1054,10 +1054,10 @@ index c0bb53a..735fb3a 100644 protected: virtual CBaseTexture* ReallocTexture(unsigned int& newHeight); -From 82990b71445c43f371c5e8a923c2bd89c649a1b5 Mon Sep 17 00:00:00 2001 +From c6401d999b1b233851eac770d46abe178028eeda Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 11 Dec 2013 18:47:54 +0000 -Subject: [PATCH 12/97] Convert CGUIFontTTFBase::m_vertex to be managed as a +Subject: [PATCH 12/92] Convert CGUIFontTTFBase::m_vertex to be managed as a std::vector. Also retired CGUIFontTTFBase::m_vertex_count and @@ -1237,10 +1237,10 @@ index 97853fd..b76c6a5 100644 *vertices++ = m_vertex[i]; *vertices++ = m_vertex[i+1]; -From c8a8f05d19ce2027e60feb434644b6b803dbbf71 Mon Sep 17 00:00:00 2001 +From 8204ffaea71234b462e4ef7c46687a3f0ea03f5d Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Mon, 16 Dec 2013 18:58:12 +0000 -Subject: [PATCH 13/97] CGUIFontTTFBase::RenderCharacter can now append to +Subject: [PATCH 13/92] CGUIFontTTFBase::RenderCharacter can now append to arbitrary vectors of vertices rather than only CGUIFontTTFBase::m_vertex --- @@ -1313,10 +1313,10 @@ index 5675725..a5d44f4 100644 virtual CBaseTexture* ReallocTexture(unsigned int& newHeight) = 0; -From 2135d9fb5e89833a729418e96266623cf41f0d0a Mon Sep 17 00:00:00 2001 +From 880332f62ec7150f8ef72f95f287f23b7c2f49cd Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 15 Jan 2014 17:18:38 +0000 -Subject: [PATCH 14/97] Add a cache of font glyph bounding box vertices. +Subject: [PATCH 14/92] Add a cache of font glyph bounding box vertices. This is implemented as a template because ultimately we will key on different parameters and store values of different types, depending upon whether we @@ -2076,10 +2076,10 @@ index f351c99..9036ba9 100644 + return !operator==(a, b); +} -From b4803102fbd67bc28867e5a1e1198b043cbfcb6d Mon Sep 17 00:00:00 2001 +From 19e0034245d86c35ce0dc93b6533b9fe37d2831e Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Thu, 23 Jan 2014 22:24:17 +0000 -Subject: [PATCH 15/97] Lay the groundwork for hardware clipping. +Subject: [PATCH 15/92] Lay the groundwork for hardware clipping. For glScissor() to replace CGraphicContext::ClipRect, a necessary condition is that no shear or rotation is introduced between the coordinate systems @@ -2341,10 +2341,10 @@ index 98e398a..81ee49e 100644 virtual void ResetScissors(); -From eabb40c7324e43aeaffb044023499d247025ec1e Mon Sep 17 00:00:00 2001 +From fb75fe8403e7d9d1ada5c17c14bcad0e0da5ff44 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Thu, 23 Jan 2014 16:42:22 +0000 -Subject: [PATCH 16/97] Increase font cache hit rate by keying on the +Subject: [PATCH 16/92] Increase font cache hit rate by keying on the fractional part of m_originX and m_originY *after* they have been through the graphics context's transformation matrix, plus the scale/rotation elements of the matrix, rather than the origin in the original frame of reference plus @@ -2545,10 +2545,10 @@ index 3b93672..258dffa 100644 private: virtual bool FirstBegin() = 0; -From e8ebfc6d1f1313edaf507c3f23865e88a28fa55b Mon Sep 17 00:00:00 2001 +From d05b5268aac43edd8a018bb4d0006d0680ae8328 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 8 Jan 2014 12:16:33 +0000 -Subject: [PATCH 17/97] Rewrite of scrolling text code. +Subject: [PATCH 17/92] Rewrite of scrolling text code. No longer shuffles the string round to minimise the number of characters before the clipping rectangle; this doesn't save much on rendering time but @@ -2864,10 +2864,10 @@ index 2cda726..fbc579e 100644 private: void Process(); -From 5517f1f78848b1ee013c788283ad2e34e5649fd9 Mon Sep 17 00:00:00 2001 +From 0cfaac1afce5068a81cc55da1540180c0e753c4f Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Mon, 27 Jan 2014 23:21:10 +0000 -Subject: [PATCH 18/97] Move the application of the translation offsets into +Subject: [PATCH 18/92] Move the application of the translation offsets into the GLES code. Still all pure software at this stage. Main change is in the data types at @@ -3061,10 +3061,10 @@ index 9935ea4..18c9358 100644 memset(newTexture->GetPixels(), 0, m_textureHeight * newTexture->GetPitch()); if (m_texture) -From af0b6fb0fc83e4e616880aa50c487fb9ef41977d Mon Sep 17 00:00:00 2001 +From fd3e88118a5070a7dac82b3d6b7b33f311543e15 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 15 Jan 2014 15:28:06 +0000 -Subject: [PATCH 19/97] Rather than applying the translation offsets to the +Subject: [PATCH 19/92] Rather than applying the translation offsets to the vertices, now applies them to the model view matrix from the top of the matrix stack and pushes it over to OpenGL. The vertices themselves are still all held client-side. @@ -3208,10 +3208,10 @@ index 81ee49e..d2f9cd1 100644 protected: virtual void SetVSyncImpl(bool enable) = 0; -From 8d032c71701ebcab83662bc9eb09c03e787817f7 Mon Sep 17 00:00:00 2001 +From bdbd453ceef0b03a95f008a1a0ca5525cec2adf1 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 29 Jan 2014 13:21:19 +0000 -Subject: [PATCH 20/97] Enable hardware clipping. +Subject: [PATCH 20/92] Enable hardware clipping. --- xbmc/guilib/GUIFontTTF.cpp | 4 ++-- @@ -3283,10 +3283,10 @@ index ea08bf4..b63e337 100644 glUniformMatrix4fv(modelLoc, 1, GL_FALSE, g_matrices.GetMatrix(MM_MODELVIEW)); } -From 46dd8722df5f5d122909ed1524890ff687a870f3 Mon Sep 17 00:00:00 2001 +From 377e7c63ffc913635be2a2c2ebe510729a3ae1b1 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 15 Jan 2014 15:32:51 +0000 -Subject: [PATCH 21/97] Move the vertex data across to a vertex buffer object +Subject: [PATCH 21/92] Move the vertex data across to a vertex buffer object just prior to drawing. --- @@ -3337,10 +3337,10 @@ index b63e337..b00055d 100644 // Disable the attributes used by this shader -From 3f6090f37f07436896eafad815b178d3e4ec5d71 Mon Sep 17 00:00:00 2001 +From dc7c4f6c26204e60309b11b54ef889c54bfd320e Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Wed, 15 Jan 2014 16:04:04 +0000 -Subject: [PATCH 22/97] Move vertex data into an OpenGL VBO when the font cache +Subject: [PATCH 22/92] Move vertex data into an OpenGL VBO when the font cache entry is populated. The font cache now stores the "name" (handle) of the VBO, rather than a vector @@ -3613,10 +3613,10 @@ index 735fb3a..6102c90 100644 protected: virtual CBaseTexture* ReallocTexture(unsigned int& newHeight); -From 20335c7814616395986e82dcfc4fe39b85632b7e Mon Sep 17 00:00:00 2001 +From 02b12be17511f262f71482cea86932e1242cea4e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 1 Nov 2014 22:15:13 +0000 -Subject: [PATCH 23/97] Switch from glDrawArrays() to glDrawElements(). +Subject: [PATCH 23/92] Switch from glDrawArrays() to glDrawElements(). This involves setting up a static VBO containing the indexes necessary to convert from quads to triangles on the fly in the GPU. @@ -3837,10 +3837,10 @@ index d2a94c9..7b6097a 100644 if (m_display != EGL_NO_DISPLAY) -From 29fea8db3a318cc0d95e37a1f755c5f9ba1cf301 Mon Sep 17 00:00:00 2001 +From 13c777aca3442418427e9e4f73518d12e3934089 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Thu, 1 May 2014 16:28:39 +0100 -Subject: [PATCH 24/97] Improved file buffering in CArchive +Subject: [PATCH 24/92] Improved file buffering in CArchive Even though memcpy is typically inlined by the compiler into byte/word loads and stores (at least for release builds), the frequency with which 1, 2 and 4 @@ -3900,10 +3900,10 @@ index 6ed0f8f..8506d95 100644 } else -From 9ebf3ad56008927947c08fc44f5c4a4280883ec6 Mon Sep 17 00:00:00 2001 +From ecde1494d0c6b84a4c4f4828bd143451007b805c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 10 Sep 2014 22:07:21 +0100 -Subject: [PATCH 25/97] [mmal] Allow mmal codec for dvd stills +Subject: [PATCH 25/92] [mmal] Allow mmal codec for dvd stills --- xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp | 4 ++++ @@ -3925,58 +3925,115 @@ index f139433..4183a2b 100644 { // If dvd is an mpeg2 and hint.stills -From 072bc273a95b87b8187ffc86c39a90aa3d0d0d0d Mon Sep 17 00:00:00 2001 +From 00e5297210142b52baf68ce2283f6eff2afb503d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 12 Aug 2014 00:31:36 +0100 -Subject: [PATCH 26/97] [omxcodec] Fix for stills with hardware codec +Subject: [PATCH 26/92] [omxcodec] Don't force software codec with dvds -Hardware codecs typically run asynchronously to the decoded frames. -The reason that hardware codecs don't work when hint.stills is true -is because DVDPlayerVideo stops calling Decode/GetPicture when there -are no more decoded frames. - -This means the still frames never get read out. -The solution is to also call Decode/GetPicture with the timeout messages -when hint.stills is true. --- - xbmc/cores/dvdplayer/DVDPlayer.cpp | 2 +- - xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 568 ++++++++++++++++---------------- - xbmc/cores/dvdplayer/DVDPlayerVideo.h | 1 + - 3 files changed, 292 insertions(+), 279 deletions(-) + xbmc/cores/dvdplayer/DVDPlayer.cpp | 2 ++ + 1 file changed, 2 insertions(+) diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp -index f586933..2a2202f 100644 +index 8b3a75a..e9126cd 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp -@@ -3190,7 +3190,7 @@ bool CDVDPlayer::OpenVideoStream(CDVDStreamInfo& hint, bool reset) +@@ -3209,7 +3209,9 @@ bool CDVDPlayer::OpenVideoStream(CDVDStreamInfo& hint, bool reset) hint.aspect = aspect; hint.forced_aspect = true; } -- hint.software = true; -+ //hint.software = true; ++#ifndef TARGET_RASPBERRY_PI + hint.software = true; ++#endif } CDVDInputStream::IMenus* pMenus = dynamic_cast(m_pInputStream); + +From ed48da2bd0de6f6f1707f578ae9c4888358c2621 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Sun, 2 Nov 2014 20:10:08 +0000 +Subject: [PATCH 27/92] [dvdplayervideo] Make variables more local + +--- + xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index 9eacad2..ccf307e 100644 +index e47f85c..e42f8ff 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -@@ -300,15 +300,298 @@ void CDVDPlayerVideo::OnStartup() +@@ -305,10 +305,6 @@ void CDVDPlayerVideo::Process() + CLog::Log(LOGNOTICE, "running thread: video_thread"); + + DVDVideoPicture picture; +- CPulldownCorrection pulldown; +- CDVDVideoPPFFmpeg mPostProcess(""); +- std::string sPostProcessType; +- bool bPostProcessDeint = false; + + memset(&picture, 0, sizeof(DVDVideoPicture)); + +@@ -316,8 +312,6 @@ void CDVDPlayerVideo::Process() + double frametime = (double)DVD_TIME_BASE / m_fFrameRate; + + int iDropped = 0; //frames dropped in a row +- bool bRequestDrop = false; +- int iDropDirective; + + m_videoStats.Start(); + m_droppingStats.Reset(); +@@ -496,6 +490,12 @@ void CDVDPlayerVideo::Process() + DemuxPacket* pPacket = ((CDVDMsgDemuxerPacket*)pMsg)->GetPacket(); + bool bPacketDrop = ((CDVDMsgDemuxerPacket*)pMsg)->GetPacketDrop(); + ++ CPulldownCorrection pulldown; ++ CDVDVideoPPFFmpeg mPostProcess(""); ++ std::string sPostProcessType; ++ bool bPostProcessDeint = false; ++ bool bRequestDrop = false; ++ + if (m_stalled) + { + CLog::Log(LOGINFO, "CDVDPlayerVideo - Stillframe left, switching to normal playback"); +@@ -512,7 +512,7 @@ void CDVDPlayerVideo::Process() + } + + bRequestDrop = false; +- iDropDirective = CalcDropRequirement(pts); ++ int iDropDirective = CalcDropRequirement(pts); + if (iDropDirective & EOS_VERYLATE) + { + if (m_bAllowDrop) + +From f9b750d76f7f39dc1020c3ab6d589cc7b5b447bf Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Mon, 3 Nov 2014 16:44:52 +0000 +Subject: [PATCH 28/92] [dvdplayervideo] Move packet handling into separate + function + +--- + xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 530 ++++++++++++++++---------------- + xbmc/cores/dvdplayer/DVDPlayerVideo.h | 1 + + 2 files changed, 269 insertions(+), 262 deletions(-) + +diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +index e42f8ff..7ee8638 100644 +--- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp ++++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +@@ -300,6 +300,273 @@ void CDVDPlayerVideo::OnStartup() m_FlipTimePts = 0.0; } --void CDVDPlayerVideo::Process() +void CDVDPlayerVideo::HandleDemuxerPacket(DemuxPacket* pPacket, bool bPacketDrop, int &iDropped, double &pts, CDVDMsg* pMsg, DVDVideoPicture &picture) - { -- CLog::Log(LOGNOTICE, "running thread: video_thread"); -- -- DVDVideoPicture picture; ++{ + double frametime = (double)DVD_TIME_BASE / m_fFrameRate; + int iPriority = (m_speed == DVD_PLAYSPEED_PAUSE && m_started) ? 1 : 0; - CPulldownCorrection pulldown; - CDVDVideoPPFFmpeg mPostProcess(""); - std::string sPostProcessType; - bool bPostProcessDeint = false; ++ CPulldownCorrection pulldown; ++ CDVDVideoPPFFmpeg mPostProcess(""); ++ std::string sPostProcessType; ++ bool bPostProcessDeint = false; ++ bool bRequestDrop = false; ++ + if (m_stalled) + { + CLog::Log(LOGINFO, "CDVDPlayerVideo - Stillframe left, switching to normal playback"); @@ -3992,7 +4049,7 @@ index 9eacad2..ccf307e 100644 + m_iNrOfPicturesNotToSkip = 1; + } + -+ bool bRequestDrop = false; ++ bRequestDrop = false; + int iDropDirective = CalcDropRequirement(pts); + if (iDropDirective & EOS_VERYLATE) + { @@ -4054,16 +4111,7 @@ index 9eacad2..ccf307e 100644 + + mFilters = m_pVideoCodec->SetFilters(mFilters); + -+ int iDecoderState; -+ if (pPacket) -+ { -+ iDecoderState = m_pVideoCodec->Decode(pPacket->pData, pPacket->iSize, pPacket->dts, pPacket->pts); -+ m_videoStats.AddSampleBytes(pPacket->iSize); -+ } -+ else -+ { -+ iDecoderState = m_pVideoCodec->Decode(NULL, 0, DVD_NOPTS_VALUE, DVD_NOPTS_VALUE); -+ } ++ int iDecoderState = m_pVideoCodec->Decode(pPacket->pData, pPacket->iSize, pPacket->dts, pPacket->pts); + + // buffer packets so we can recover should decoder flush for some reason + if(m_pVideoCodec->GetConvergeCount() > 0) @@ -4074,6 +4122,8 @@ index 9eacad2..ccf307e 100644 + m_packets.pop_front(); + } + ++ m_videoStats.AddSampleBytes(pPacket->iSize); ++ + // reset the request, the following while loop may break before + // setting the flag to a new value + bRequestDrop = false; @@ -4223,8 +4273,6 @@ index 9eacad2..ccf307e 100644 + } + else + iDropped = 0; -+ -+ bRequestDrop = (iResult & EOS_VERYLATE) == EOS_VERYLATE; + } + else + { @@ -4233,19 +4281,6 @@ index 9eacad2..ccf307e 100644 + } + } + -+ /* -+ if (iDecoderState & VC_USERDATA) -+ { -+ // found some userdata while decoding a frame -+ // could be closed captioning -+ DVDVideoUserData videoUserData; -+ if (m_pVideoCodec->GetUserData(&videoUserData)) -+ { -+ ProcessVideoUserData(&videoUserData, pts); -+ } -+ } -+ */ -+ + // if the decoder needs more data, we just break this loop + // and try to get more data from the videoQueue + if (iDecoderState & VC_BUFFER) @@ -4256,38 +4291,20 @@ index 9eacad2..ccf307e 100644 + } +} + -+void CDVDPlayerVideo::Process() -+{ -+ CLog::Log(LOGNOTICE, "running thread: video_thread"); -+ -+ DVDVideoPicture picture; - - memset(&picture, 0, sizeof(DVDVideoPicture)); - -@@ -316,8 +599,6 @@ void CDVDPlayerVideo::Process() - double frametime = (double)DVD_TIME_BASE / m_fFrameRate; - - int iDropped = 0; //frames dropped in a row -- bool bRequestDrop = false; -- int iDropDirective; - - m_videoStats.Start(); - m_droppingStats.Reset(); -@@ -360,7 +641,8 @@ void CDVDPlayerVideo::Process() - OutputPicture(&picture, pts); - pts+= frametime; - } -- -+ if (m_hints.stills) -+ HandleDemuxerPacket(NULL, 0, iDropped, pts, pMsg, picture); - continue; - } - -@@ -495,277 +777,7 @@ void CDVDPlayerVideo::Process() + void CDVDPlayerVideo::Process() + { + CLog::Log(LOGNOTICE, "running thread: video_thread"); +@@ -489,268 +756,7 @@ void CDVDPlayerVideo::Process() { DemuxPacket* pPacket = ((CDVDMsgDemuxerPacket*)pMsg)->GetPacket(); bool bPacketDrop = ((CDVDMsgDemuxerPacket*)pMsg)->GetPacketDrop(); - +- CPulldownCorrection pulldown; +- CDVDVideoPPFFmpeg mPostProcess(""); +- std::string sPostProcessType; +- bool bPostProcessDeint = false; +- bool bRequestDrop = false; +- - if (m_stalled) - { - CLog::Log(LOGINFO, "CDVDPlayerVideo - Stillframe left, switching to normal playback"); @@ -4304,7 +4321,7 @@ index 9eacad2..ccf307e 100644 - } - - bRequestDrop = false; -- iDropDirective = CalcDropRequirement(pts); +- int iDropDirective = CalcDropRequirement(pts); - if (iDropDirective & EOS_VERYLATE) - { - if (m_bAllowDrop) @@ -4527,8 +4544,6 @@ index 9eacad2..ccf307e 100644 - } - else - iDropped = 0; -- -- bRequestDrop = (iResult & EOS_VERYLATE) == EOS_VERYLATE; - } - else - { @@ -4537,19 +4552,6 @@ index 9eacad2..ccf307e 100644 - } - } - -- /* -- if (iDecoderState & VC_USERDATA) -- { -- // found some userdata while decoding a frame -- // could be closed captioning -- DVDVideoUserData videoUserData; -- if (m_pVideoCodec->GetUserData(&videoUserData)) -- { -- ProcessVideoUserData(&videoUserData, pts); -- } -- } -- */ -- - // if the decoder needs more data, we just break this loop - // and try to get more data from the videoQueue - if (iDecoderState & VC_BUFFER) @@ -4563,10 +4565,10 @@ index 9eacad2..ccf307e 100644 // all data is used by the decoder, we can safely free it now diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.h b/xbmc/cores/dvdplayer/DVDPlayerVideo.h -index a38a9c3..70b86e6 100644 +index 4e1b3d6..a1606f7 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerVideo.h +++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.h -@@ -133,6 +133,7 @@ class CDVDPlayerVideo : public CThread, public IDVDStreamPlayerVideo +@@ -134,6 +134,7 @@ class CDVDPlayerVideo : public CThread, public IDVDStreamPlayerVideo #endif void ProcessVideoUserData(DVDVideoUserData* pVideoUserData, double pts); void OpenStream(CDVDStreamInfo &hint, CDVDVideoCodec* codec); @@ -4575,10 +4577,35 @@ index a38a9c3..70b86e6 100644 CDVDMessageQueue m_messageQueue; CDVDMessageQueue& m_messageParent; -From cbc634d65498419ce67d02d2866d4d0160b16923 Mon Sep 17 00:00:00 2001 +From f3f2a175e159d89f6439efbf3b92621c49dbd619 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Mon, 3 Nov 2014 16:49:48 +0000 +Subject: [PATCH 29/92] [dvdplayervideo] Prod decoder when in stills mode + +An asynchronous hardware decoder doesn't only produce output pictures when new packets arrive. +In dvd stills mode give it a chance to return pictures that weren't ready when frame was decoded. +--- + xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +index 7ee8638..c22ea9f 100644 +--- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp ++++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +@@ -621,6 +621,8 @@ void CDVDPlayerVideo::Process() + OutputPicture(&picture, pts); + pts+= frametime; + } ++ if (m_hints.stills) ++ HandleDemuxerPacket(NULL, 0, iDropped, pts, pMsg, picture); + + continue; + } + +From 3ba02548cb829f0924169c1f621037358c418561 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 16 Apr 2014 21:18:06 +0100 -Subject: [PATCH 27/97] [omxplayer] Don't propagate 3d flags based on supported +Subject: [PATCH 30/92] [omxplayer] Don't propagate 3d flags based on supported 3d modes --- @@ -4631,10 +4658,10 @@ index ac838ce..605318c9 100644 unsigned int iDisplayWidth = width; unsigned int iDisplayHeight = height; -From 4f9be3b67d09d0931da50661bd6df739162906bc Mon Sep 17 00:00:00 2001 +From 136cf80921ec687484c7635a328f138620c86a12 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 17 Apr 2014 13:00:52 +0100 -Subject: [PATCH 28/97] [graphics] Don't set stereo mode based on resolution +Subject: [PATCH 31/92] [graphics] Don't set stereo mode based on resolution The resolution change should follow stereo mode --- @@ -4692,10 +4719,10 @@ index 3cb5587..fe6ebf4 100644 m_iScreenWidth = info_mod.iWidth; -From 771bd680b42a97581e8c60128e03fd04d3048a8b Mon Sep 17 00:00:00 2001 +From aa38a302d4833466154b7408d72205a320d9f2a3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 17 Apr 2014 13:01:51 +0100 -Subject: [PATCH 29/97] [graphics] Allow switching to a more suitable 3D +Subject: [PATCH 32/92] [graphics] Allow switching to a more suitable 3D resolution --- @@ -4781,10 +4808,10 @@ index 2904c1b..8d3774f 100644 void ResetOverscan(RESOLUTION_INFO &resinfo); void ResetScreenParameters(RESOLUTION res); -From 3fe528280ece69edc36e9706b4c7baa9cb92210a Mon Sep 17 00:00:00 2001 +From 27254a7b7760b94bd5e632ce8956e62f920f49df Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 17 Apr 2014 13:38:55 +0100 -Subject: [PATCH 30/97] [3D] Support switching to 3D resolutions +Subject: [PATCH 33/92] [3D] Support switching to 3D resolutions Include matching 3D flags (SBS/TAB) in the score of a resolution to switch to, to enable switching to 3d modes. Also remove the old code that treated 3D modes differently when assigning a score. @@ -4866,10 +4893,10 @@ index 83c3adb..8076e76 100644 return current; } -From cb207aa215bf8aa5698c6118efd3b1d1db615ec4 Mon Sep 17 00:00:00 2001 +From 66038eb39cf383dbdc58acfed411c889dbf60b21 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 23 Apr 2014 00:05:07 +0100 -Subject: [PATCH 31/97] [graphics] Make pixel ratio for 3d modes consistent +Subject: [PATCH 34/92] [graphics] Make pixel ratio for 3d modes consistent Note: Use the stored stereo flags from lists of resolutions. Use current stereo mode for current resolution. @@ -5072,10 +5099,10 @@ index c58c28a..bf1e589 100644 AddUniqueResolution(res2, resolutions); -From 2b59f6bec07a067b3e949d5e84f474fa27e6cc34 Mon Sep 17 00:00:00 2001 +From 3d6c7f4f6bf91588d0d7e960a3dd47281d1ccd39 Mon Sep 17 00:00:00 2001 From: da-anda Date: Sun, 17 Aug 2014 21:09:59 +0200 -Subject: [PATCH 32/97] handle stereoscopic mode of videos in mixed playlists +Subject: [PATCH 35/92] handle stereoscopic mode of videos in mixed playlists --- language/English/strings.po | 2 +- @@ -5083,10 +5110,10 @@ Subject: [PATCH 32/97] handle stereoscopic mode of videos in mixed playlists 2 files changed, 49 insertions(+), 29 deletions(-) diff --git a/language/English/strings.po b/language/English/strings.po -index 8d8f4a1..132a2ce 100755 +index 388aa9f..d9a263d 100755 --- a/language/English/strings.po +++ b/language/English/strings.po -@@ -15756,7 +15756,7 @@ msgstr "" +@@ -15780,7 +15780,7 @@ msgstr "" #. Description of setting "Videos -> Playback -> Disable stereoscopic mode when playback is stopped" with label #36526 #: system/settings/settings.xml msgctxt "#36538" @@ -5243,10 +5270,10 @@ index 35ba597..b013942 100644 case 2: // Mono SetStereoMode( RENDER_STEREO_MODE_MONO ); -From f5d2fbc6423c688dc1263e1365eb8d9d138efbba Mon Sep 17 00:00:00 2001 +From aa9ea613e2799a53ead2566e3809a5823163f156 Mon Sep 17 00:00:00 2001 From: da-anda Date: Sat, 16 Aug 2014 11:20:54 +0200 -Subject: [PATCH 33/97] remember user selected 3D modes between videos until +Subject: [PATCH 36/92] remember user selected 3D modes between videos until playback ended --- @@ -5463,10 +5490,10 @@ index c1dfb93..cb54bd0 100644 -From 99535729730a3dc6ae8a2aca45cff439c342fbed Mon Sep 17 00:00:00 2001 +From 0eec309960904cfe9074232060f213027dcb88dd Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 10 Aug 2014 16:45:16 +0100 -Subject: [PATCH 34/97] filesystem: Make support of browsing into archives +Subject: [PATCH 37/92] filesystem: Make support of browsing into archives optional The ability to browse, scan and play content in archives can cause problems on low powered/low memory devices. @@ -5482,10 +5509,10 @@ Add a settings option to enable this feature and default to disabled on Pi 4 files changed, 28 insertions(+) diff --git a/language/English/strings.po b/language/English/strings.po -index 132a2ce..c31a07c 100755 +index d9a263d..fcfa70e 100755 --- a/language/English/strings.po +++ b/language/English/strings.po -@@ -16087,4 +16087,13 @@ msgstr "" +@@ -16111,4 +16111,13 @@ msgstr "" #: system/settings/rbp.xml msgctxt "#38010" msgid "GPU accelerated" @@ -5565,11 +5592,10 @@ index 2fd8777..3b294cd 100644 { // XBMC Smart playlist - just XML renamed to XSP // read the name of the playlist in - -From a107e9e081a26ec4d69a2f6dc0a817575b5b3d96 Mon Sep 17 00:00:00 2001 +From 2f8babbf784a0cd47e86a95638e34eb28d5bccca Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 27 Oct 2014 13:06:57 +0000 -Subject: [PATCH 36/97] [rbp] Make cachemembuffersize default depend on memory +Subject: [PATCH 39/92] [rbp] Make cachemembuffersize default depend on memory size --- @@ -5626,10 +5652,10 @@ index f4c309b..bf78194 100644 // as multiply of the default data read rate -From 8dbe33baf117ec2512bfb7f790ef3d7780c9d822 Mon Sep 17 00:00:00 2001 +From 1802b040aa4f73c645d98e93069676660808413e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 16 Jun 2014 19:06:00 +0100 -Subject: [PATCH 38/97] [experimental] Disable quiet-noise generation +Subject: [PATCH 41/92] [experimental] Disable quiet-noise generation --- xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp | 2 ++ @@ -5656,10 +5682,10 @@ index b391ff3..463a89c 100644 void CActiveAESink::SetSilenceTimer() -From 6afc25970719769c1fad8364b70fb509cc67f235 Mon Sep 17 00:00:00 2001 +From a13ac4f97871b482dd060eea06bdf1c5c673c5c9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 30 May 2014 14:58:43 +0100 -Subject: [PATCH 39/97] [settings] Experiment: Report DESKTOP resolution in +Subject: [PATCH 42/92] [settings] Experiment: Report DESKTOP resolution in video settings --- @@ -5681,10 +5707,10 @@ index 6902f83..50c5f97 100644 StringUtils::Format("%dx%d%s", resolution->width, resolution->height, ModeFlagsToString(resolution->flags, false).c_str()), -From b49767fd92a6d0fb19a12836b97b06cc08afd240 Mon Sep 17 00:00:00 2001 +From cfa8df6ff66b6b7409f0332c8bcba80eea4f44d0 Mon Sep 17 00:00:00 2001 From: macrule Date: Thu, 11 Apr 2013 18:24:42 +0200 -Subject: [PATCH 40/97] Added some vc_tv_* functions that were missing in +Subject: [PATCH 43/92] Added some vc_tv_* functions that were missing in DllBCM. --- @@ -5719,10 +5745,10 @@ index b92fdb8..9c7e293 100644 HDMI_INTERLACED_T scan_mode, EDID_MODE_MATCH_FLAG_T match_flags) { return ::vc_tv_hdmi_power_on_best(width, height, frame_rate, scan_mode, match_flags); }; -From 65c3f187853790f701016263a6ac8c404949df11 Mon Sep 17 00:00:00 2001 +From 607621d6f1f1b168a50d3dce60f078ffc53260b5 Mon Sep 17 00:00:00 2001 From: macrule Date: Thu, 11 Apr 2013 18:29:03 +0200 -Subject: [PATCH 41/97] Added private utility function to map a float display +Subject: [PATCH 44/92] Added private utility function to map a float display aspect, to the respective SDTV_ASPECT_* enum value. --- @@ -5760,10 +5786,10 @@ index bf1e589..518a87d 100644 bool CEGLNativeTypeRaspberryPI::ProbeResolutions(std::vector &resolutions) -From 7da42db7608a24a5fb60b4c8042ea27ceb08e506 Mon Sep 17 00:00:00 2001 +From fe96123239c3262fe83856272b4aeafc7e92c0f5 Mon Sep 17 00:00:00 2001 From: macrule Date: Thu, 11 Apr 2013 19:50:58 +0200 -Subject: [PATCH 42/97] Changed SDTV resolutions to be treated similarly to +Subject: [PATCH 45/92] Changed SDTV resolutions to be treated similarly to HDMI resolutions in SetNativeResolution. This means that the SDTV interface is powered up and set to the right mode. @@ -5860,10 +5886,10 @@ index 59401f5..a0acb1a 100644 int m_width; int m_height; -From ab28e4eaefbdf6efaa73afd8a147d4e82ab5cf93 Mon Sep 17 00:00:00 2001 +From 1e72ab144e56bc5ce073b6828386ac06d0acdf9f Mon Sep 17 00:00:00 2001 From: macrule Date: Thu, 11 Apr 2013 19:54:59 +0200 -Subject: [PATCH 43/97] Added methods SuspendVideoOutput() and +Subject: [PATCH 46/92] Added methods SuspendVideoOutput() and ResumeVideoOutput() to CRBP class, which can be used to power down the Raspberry PI's video interface, and restore it at a later point. @@ -5927,10 +5953,10 @@ index 9dc39d5..ca36082 100644 CEGLNativeTypeRaspberryPI::CEGLNativeTypeRaspberryPI() { -From 3b04cefa9ef6051aa3e9385f2778f932895ed886 Mon Sep 17 00:00:00 2001 +From f29ad22884050ef43525374939871ad464dfbf97 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 11 Aug 2013 15:03:36 +0100 -Subject: [PATCH 44/97] PowerManager (and its IPowerSyscall instance) now gets +Subject: [PATCH 47/92] PowerManager (and its IPowerSyscall instance) now gets called from CApplication::OnKey() and can process and suppress key presses. This is a requirement to implement a virtual sleep state. @@ -5985,7 +6011,7 @@ index 7f9e7ed..711abea 100644 class CPowerSyscallWithoutEvents : public IPowerSyscall diff --git a/xbmc/powermanagement/PowerManager.cpp b/xbmc/powermanagement/PowerManager.cpp -index 5900f98..6e819d9 100644 +index 27948b5..f572931 100644 --- a/xbmc/powermanagement/PowerManager.cpp +++ b/xbmc/powermanagement/PowerManager.cpp @@ -225,6 +225,12 @@ void CPowerManager::ProcessEvents() @@ -6023,10 +6049,10 @@ index 0b1f10a..e42b143 100644 void OnSleep(); void OnWake(); -From 09f07b374f36e6ada72b5bff2ae5bf7974a73ac2 Mon Sep 17 00:00:00 2001 +From e8fa9391f99fff7852d1f3b9ad6e1c1b55d7ba46 Mon Sep 17 00:00:00 2001 From: macrule Date: Wed, 17 Apr 2013 13:23:01 +0200 -Subject: [PATCH 45/97] Added CPowerSyscallVirtualSleep class, which acts as a +Subject: [PATCH 48/92] Added CPowerSyscallVirtualSleep class, which acts as a base class for devices that have no native standby mode, and need to fake it in some way. @@ -6202,10 +6228,10 @@ index 0000000..ef6e682 + +#endif // _POWER_SYSCALL_VIRTUAL_SLEEP_H_ -From 59ff43eac68010ee149d5eb72737ce2f855015cf Mon Sep 17 00:00:00 2001 +From 6ab00ee904e8d590a4ad79b0d07b516b292a147d Mon Sep 17 00:00:00 2001 From: macrule Date: Wed, 17 Apr 2013 13:24:22 +0200 -Subject: [PATCH 46/97] Added power management support for the Raspberry Pi. +Subject: [PATCH 49/92] Added power management support for the Raspberry Pi. Since it doesn't support true standby, we fake it by turning video on or off, and ignoring remote inputs during the standby phase. @@ -6219,7 +6245,7 @@ Subject: [PATCH 46/97] Added power management support for the Raspberry Pi. create mode 100644 xbmc/powermanagement/linux/RaspberryPIPowerSyscall.h diff --git a/xbmc/powermanagement/PowerManager.cpp b/xbmc/powermanagement/PowerManager.cpp -index 6e819d9..2d8c750 100644 +index f572931..df8ba06 100644 --- a/xbmc/powermanagement/PowerManager.cpp +++ b/xbmc/powermanagement/PowerManager.cpp @@ -38,6 +38,8 @@ @@ -6351,10 +6377,10 @@ index 0000000..fd1d67c + +#endif // _RASPBERRY_PI_POWER_SYSCALL_H_ -From dd500f8f7be62fc0fe5e871c31235101e4cb9568 Mon Sep 17 00:00:00 2001 +From 9ab26f5b85f7b83e0bd338ccd9e577220e579651 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Mar 2014 16:16:29 +0000 -Subject: [PATCH 47/97] [power] hack - don't kill lirc or cec +Subject: [PATCH 50/92] [power] hack - don't kill lirc or cec --- xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 37 +++++++++++++++++++++++ @@ -6416,7 +6442,7 @@ index 1a8fd59..495d58a 100644 else if (flag == System && !strcmp(sender, "xbmc") && !strcmp(message, "OnWake")) { diff --git a/xbmc/powermanagement/PowerManager.cpp b/xbmc/powermanagement/PowerManager.cpp -index 2d8c750..901f449 100644 +index df8ba06..b99eb44 100644 --- a/xbmc/powermanagement/PowerManager.cpp +++ b/xbmc/powermanagement/PowerManager.cpp @@ -241,7 +241,7 @@ void CPowerManager::OnSleep() @@ -6438,10 +6464,10 @@ index 2d8c750..901f449 100644 CBuiltins::Execute("LIRC.Start"); #endif -From 7b20a7bfadd6eaf3aa91ab2540a8b9197c91a9ed Mon Sep 17 00:00:00 2001 +From 5512a602d89fd557f4e35abf0e57811329a6d213 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Mar 2014 16:47:54 +0000 -Subject: [PATCH 48/97] [power] hack - wake on any action +Subject: [PATCH 51/92] [power] hack - wake on any action --- xbmc/powermanagement/PowerSyscallVirtualSleep.cpp | 6 +++--- @@ -6470,10 +6496,10 @@ index 6a1e47b..a717a09 100644 if(VirtualWake()) { -From c8dc689f3bebf5afd761827efc337023439450c6 Mon Sep 17 00:00:00 2001 +From c758ed8ab1b9c0bc3f4ce09280bc5203fa64610e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Mar 2014 17:30:07 +0000 -Subject: [PATCH 49/97] [power] hack - Make suspend toggle suspend state +Subject: [PATCH 52/92] [power] hack - Make suspend toggle suspend state --- xbmc/powermanagement/PowerSyscallVirtualSleep.cpp | 5 +++++ @@ -6496,10 +6522,10 @@ index a717a09..d39c3ed 100644 return false; } -From 02af21c2fae2006f4cf3a4cc579027a87029ff2d Mon Sep 17 00:00:00 2001 +From 6670154d475c813702e69eadfef844219d690007 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 4 Mar 2014 19:33:44 +0000 -Subject: [PATCH 50/97] [power] Add back in powerdown and reboot +Subject: [PATCH 53/92] [power] Add back in powerdown and reboot --- .../linux/RaspberryPIPowerSyscall.cpp | 34 ++++++++++++++++++++++ @@ -6577,11 +6603,34 @@ index fd1d67c..062132e 100644 virtual bool CanReboot() { return true; } +From 3d71c210a9b943f2e6a5f8cdf52ce0fbe565e39e Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Sat, 26 Apr 2014 17:27:52 +0100 +Subject: [PATCH 54/92] [cec] Don't suspend pi on tv switch off - it can't wake + up -From aa44888a3d20db36c0b12f57bc07c8d1bd6d1ae6 Mon Sep 17 00:00:00 2001 +--- + system/peripherals.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/system/peripherals.xml b/system/peripherals.xml +index a67dc2f..680863e 100644 +--- a/system/peripherals.xml ++++ b/system/peripherals.xml +@@ -16,7 +16,7 @@ + + + +- ++ + + + + +From 863d7d14c55d290d27b73301cb02dde1266be4af Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 27 Jun 2014 00:01:05 +0100 -Subject: [PATCH 52/97] [rbp] Resume video output on startup +Subject: [PATCH 55/92] [rbp] Resume video output on startup --- xbmc/linux/RBP.cpp | 3 +++ @@ -6602,10 +6651,10 @@ index cb87b77..34866f6 100644 m_omx_image_init = true; return true; -From 90c162c4fcf3df7ea3313d17bd1bfdb96271d118 Mon Sep 17 00:00:00 2001 +From 9896d6fd34e46ad074dfc7f58598653b83f2b2e7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 16 Aug 2014 21:01:42 +0100 -Subject: [PATCH 53/97] omxrender: Hacks to reduce GUI rendering rate when +Subject: [PATCH 56/92] omxrender: Hacks to reduce GUI rendering rate when playing video --- @@ -6615,10 +6664,10 @@ Subject: [PATCH 53/97] omxrender: Hacks to reduce GUI rendering rate when 3 files changed, 60 insertions(+) diff --git a/language/English/strings.po b/language/English/strings.po -index c31a07c..7f1f001 100755 +index fcfa70e..5a5ae4a 100755 --- a/language/English/strings.po +++ b/language/English/strings.po -@@ -16097,3 +16097,30 @@ msgstr "" +@@ -16121,3 +16121,30 @@ msgstr "" msgctxt "#38021" msgid "Allow viewing and playing files in archives (e.g. zip, rar)" msgstr "" @@ -6705,10 +6754,10 @@ index d1b304b..3a5e045 100644 int vsync_mode = CSettings::Get().GetInt("videoscreen.vsync"); -From 55ac0ff8865c9720e541c98e800626d848e983cf Mon Sep 17 00:00:00 2001 +From 5382dbe2c3860bceb8ba5152201ebed8ed55bc0e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 9 Sep 2014 12:04:26 +0100 -Subject: [PATCH 54/97] egl: Treat unknown display aspect ratio as square pixel +Subject: [PATCH 57/92] egl: Treat unknown display aspect ratio as square pixel --- xbmc/windowing/egl/EGLNativeTypeRaspberryPI.cpp | 4 ++-- @@ -6737,10 +6786,10 @@ index ca36082..1529045 100644 SetResolutionString(m_desktopRes); -From 6bc47b56b259a3e122607d5f6269711dc7a6a187 Mon Sep 17 00:00:00 2001 +From a664d8d9b957d560c84946310a63f55c2cbe0312 Mon Sep 17 00:00:00 2001 From: anaconda Date: Thu, 11 Sep 2014 21:30:43 +0200 -Subject: [PATCH 55/97] Disable textbox autoscrolling while on screensaver. +Subject: [PATCH 58/92] Disable textbox autoscrolling while on screensaver. SQUASH: only if dim or black --- @@ -6801,10 +6850,10 @@ index b7ef051..e149418 100644 if (m_lastRenderTime) m_autoScrollDelayTime += currentTime - m_lastRenderTime; -From 722fcb8e4c357d641bd084b6059dfc41dd389d0b Mon Sep 17 00:00:00 2001 +From 490ab5546de00a08816e5c85d894f837bdfff074 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 18 Sep 2014 14:24:56 +0100 -Subject: [PATCH 56/97] [omxplayer] Only enable audio clock master when A/V +Subject: [PATCH 59/92] [omxplayer] Only enable audio clock master when A/V sync method is set to audio clock --- @@ -6835,10 +6884,10 @@ index 549700c..db0886e 100644 OMX_CONFIG_BOOLEANTYPE configBool; OMX_INIT_STRUCTURE(configBool); -From eaa3083364c697af2acf6f1c53a12e946c674f5d Mon Sep 17 00:00:00 2001 +From 2db05884b1c05d7f4bd598bc54e1dd4bd88198b2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 19 Sep 2014 11:54:49 +0100 -Subject: [PATCH 57/97] [dvdplayer/rbp] Add pi specific option to maintain +Subject: [PATCH 60/92] [dvdplayer/rbp] Add pi specific option to maintain vsync with pll adjustment New A/V sync option in settings/video/playback to do "Adjust PLL". @@ -6857,10 +6906,10 @@ Needed updated firmware 7 files changed, 76 insertions(+), 3 deletions(-) diff --git a/language/English/strings.po b/language/English/strings.po -index 7f1f001..194b22f 100755 +index 5a5ae4a..d067367 100755 --- a/language/English/strings.po +++ b/language/English/strings.po -@@ -16124,3 +16124,8 @@ msgstr "" +@@ -16148,3 +16148,8 @@ msgstr "" msgctxt "#38005" msgid "24 fps" msgstr "" @@ -7036,33 +7085,10 @@ index f947acc..606c24f 100644 void SuspendVideoOutput(); void ResumeVideoOutput(); -From 0d39b1280cb607bb5cf0ae0749628d6fb2968123 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Sun, 21 Sep 2014 18:31:31 +0100 -Subject: [PATCH 58/97] hack: revert squash: don't update originaldts when - marked as invalid - ---- - xbmc/cores/dvdplayer/DVDPlayer.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp -index 2a2202f..3ab62c2 100644 ---- a/xbmc/cores/dvdplayer/DVDPlayer.cpp -+++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp -@@ -1959,6 +1959,7 @@ void CDVDPlayer::CheckContinuity(CCurrentStream& current, DemuxPacket* pPacket) - // not sure yet - flags the packets as unknown until we get confirmation on another audio/video packet - pPacket->dts = DVD_NOPTS_VALUE; - pPacket->pts = DVD_NOPTS_VALUE; -+ current.originaldts = pPacket->dts; - } - } - else - -From 3d3cbcf03b3a846ebcfd34be339d847d9328e239 Mon Sep 17 00:00:00 2001 +From 7fc2cd40b43150b50a880cbe6503ce27351857a6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 27 Sep 2014 15:27:04 +0100 -Subject: [PATCH 59/97] [omxplayer] Don't sync up to passthrough audio packets +Subject: [PATCH 61/92] [omxplayer] Don't sync up to passthrough audio packets - let GPU handle it This code was just broken. @@ -7320,10 +7346,10 @@ index 7cf10ad..f014364 100644 OMX_AUDIO_CODINGTYPE m_eEncoding; uint8_t *m_extradata; -From e9a054e544da279aeaf103840f573044fe407aee Mon Sep 17 00:00:00 2001 +From dee99933dc9a03427a1262e081cc2a7581ee8862 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 27 Sep 2014 15:32:37 +0100 -Subject: [PATCH 60/97] [dvdplayer] exerimental: don't raise priority of audio +Subject: [PATCH 62/92] [dvdplayer] exerimental: don't raise priority of audio thread --- @@ -7331,10 +7357,10 @@ Subject: [PATCH 60/97] [dvdplayer] exerimental: don't raise priority of audio 1 file changed, 4 insertions(+) diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp -index 3ab62c2..6bb9ede 100644 +index e9126cd..55729eb 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp -@@ -3176,7 +3176,11 @@ bool CDVDPlayer::OpenAudioStream(CDVDStreamInfo& hint, bool reset) +@@ -3194,7 +3194,11 @@ bool CDVDPlayer::OpenAudioStream(CDVDStreamInfo& hint, bool reset) m_dvdPlayerAudio->SendMessage(new CDVDMsg(CDVDMsg::PLAYER_STARTED), 1); /* audio normally won't consume full cpu, so let it have prio */ @@ -7347,10 +7373,10 @@ index 3ab62c2..6bb9ede 100644 } -From f7657c8f64a8b5153ed6b5488b1796face750a71 Mon Sep 17 00:00:00 2001 +From 1ed7f9b43fb4000bd3b36d4ace034c99e53aab93 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 28 Sep 2014 19:28:17 +0100 -Subject: [PATCH 61/97] [mmalcodec] Introduce a preroll period to buffer up +Subject: [PATCH 63/92] [mmalcodec] Introduce a preroll period to buffer up frames on startup --- @@ -7387,7 +7413,7 @@ index 67aa505..a768e70 100644 protected: MMALVideoPtr m_decoder; diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.cpp -index 6a1f70a..42886b3 100644 +index 664376c..c9c3839 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.cpp @@ -136,6 +136,8 @@ CMMALVideo::CMMALVideo() @@ -7399,7 +7425,7 @@ index 6a1f70a..42886b3 100644 } CMMALVideo::~CMMALVideo() -@@ -699,6 +701,8 @@ bool CMMALVideo::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options, MMALVide +@@ -702,6 +704,8 @@ bool CMMALVideo::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options, MMALVide m_drop_state = false; m_startframe = false; @@ -7408,7 +7434,7 @@ index 6a1f70a..42886b3 100644 return true; } -@@ -910,24 +914,30 @@ int CMMALVideo::Decode(uint8_t* pData, int iSize, double dts, double pts) +@@ -913,24 +917,30 @@ int CMMALVideo::Decode(uint8_t* pData, int iSize, double dts, double pts) break; } int ret = 0; @@ -7447,7 +7473,7 @@ index 6a1f70a..42886b3 100644 Sleep(10); // otherwise we busy spin } return ret; -@@ -971,8 +981,17 @@ void CMMALVideo::Reset(void) +@@ -974,8 +984,17 @@ void CMMALVideo::Reset(void) m_decoderPts = DVD_NOPTS_VALUE; m_droppedPics = 0; m_decode_frame_number = 1; @@ -7487,10 +7513,10 @@ index b4aa571..4f81bbd 100644 MMAL_COMPONENT_T *m_dec; MMAL_PORT_T *m_dec_input; -From 7b56f4c3aa0162f9fa6ba0213f662e19fb245757 Mon Sep 17 00:00:00 2001 +From 9b41e907935394530b9dacbccd510b024cfa7d0c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 11 Apr 2014 16:12:27 +0100 -Subject: [PATCH 62/97] [omxplayer] Add ability to log more timestamp info in +Subject: [PATCH 64/92] [omxplayer] Add ability to log more timestamp info in extra debug settings --- @@ -7503,7 +7529,7 @@ Subject: [PATCH 62/97] [omxplayer] Add ability to log more timestamp info in 6 files changed, 25 insertions(+), 13 deletions(-) diff --git a/language/English/strings.po b/language/English/strings.po -index 194b22f..87a9170 100755 +index d067367..11ed0a6 100755 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -2892,6 +2892,11 @@ msgctxt "#680" @@ -7531,7 +7557,7 @@ index 4a69bb7..a3b6ba6 100644 #include "utils/params_check_macros.h" diff --git a/xbmc/cores/omxplayer/OMXHelper.cpp b/xbmc/cores/omxplayer/OMXHelper.cpp -index c094650..08a3a11 100644 +index be54f31..9739ed0 100644 --- a/xbmc/cores/omxplayer/OMXHelper.cpp +++ b/xbmc/cores/omxplayer/OMXHelper.cpp @@ -23,6 +23,7 @@ @@ -7542,7 +7568,7 @@ index c094650..08a3a11 100644 #include "settings/Settings.h" #include "settings/MediaSettings.h" #include "DVDInputStreams/DVDInputStream.h" -@@ -130,7 +131,8 @@ bool OMXDoProcessing(struct SOmxPlayerState &m_OmxPlayerState, int m_playSpeed, +@@ -140,7 +141,8 @@ bool OMXDoProcessing(struct SOmxPlayerState &m_OmxPlayerState, int m_playSpeed, m_OmxPlayerState.video_fifo = (int)(100.0*(m_dvdPlayerVideo->GetDecoderBufferSize()-m_dvdPlayerVideo->GetDecoderFreeSpace())/m_dvdPlayerVideo->GetDecoderBufferSize()); m_OmxPlayerState.audio_fifo = (int)(100.0*audio_fifo/m_dvdPlayerAudio->GetCacheTotal()); @@ -7552,7 +7578,7 @@ index c094650..08a3a11 100644 static unsigned count; if ((count++ & 7) == 0) { -@@ -150,7 +152,7 @@ bool OMXDoProcessing(struct SOmxPlayerState &m_OmxPlayerState, int m_playSpeed, +@@ -160,7 +162,7 @@ bool OMXDoProcessing(struct SOmxPlayerState &m_OmxPlayerState, int m_playSpeed, vc_gencmd(response, sizeof response, "render_bar 7 audio_queue %d %d %d %d", m_dvdPlayerAudio->GetLevel(), 0, 0, 100); } @@ -7561,7 +7587,7 @@ index c094650..08a3a11 100644 if (audio_pts != DVD_NOPTS_VALUE) { audio_fifo_low = m_HasAudio && audio_fifo < threshold; -@@ -166,15 +168,15 @@ bool OMXDoProcessing(struct SOmxPlayerState &m_OmxPlayerState, int m_playSpeed, +@@ -176,15 +178,15 @@ bool OMXDoProcessing(struct SOmxPlayerState &m_OmxPlayerState, int m_playSpeed, if (!m_HasVideo && m_HasAudio) video_fifo_high = true; @@ -7641,10 +7667,10 @@ index bf78194..c68ac95 100644 void CAdvancedSettings::setExtraLogLevel(const std::vector &components) -From be92ee3262597fce684d42f95bbe5d490639a5d7 Mon Sep 17 00:00:00 2001 +From d05ec8077025e6f681c5bc474e5a489f665f4ff9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 7 Apr 2014 23:13:55 +0100 -Subject: [PATCH 63/97] [omxplayer] Add ability to dump out audio/video data +Subject: [PATCH 65/92] [omxplayer] Add ability to dump out audio/video data for later debugging --- @@ -7656,7 +7682,7 @@ Subject: [PATCH 63/97] [omxplayer] Add ability to dump out audio/video data 5 files changed, 112 insertions(+) diff --git a/language/English/strings.po b/language/English/strings.po -index 87a9170..bb444ec 100755 +index 11ed0a6..e10fea7 100755 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -2897,6 +2897,16 @@ msgctxt "#697" @@ -7785,10 +7811,10 @@ index d402384..b5e86ae 100644 if (omx_err != OMX_ErrorNone) { diff --git a/xbmc/cores/omxplayer/OMXVideo.cpp b/xbmc/cores/omxplayer/OMXVideo.cpp -index 0363aaa..6cfb148 100644 +index 45e942f..b483829 100644 --- a/xbmc/cores/omxplayer/OMXVideo.cpp +++ b/xbmc/cores/omxplayer/OMXVideo.cpp -@@ -63,6 +63,49 @@ +@@ -65,6 +65,49 @@ #define MAX_TEXT_LENGTH 1024 @@ -7838,7 +7864,7 @@ index 0363aaa..6cfb148 100644 COMXVideo::COMXVideo() : m_video_codec_name("") { m_is_open = false; -@@ -118,6 +161,7 @@ bool COMXVideo::SendDecoderConfig() +@@ -120,6 +163,7 @@ bool COMXVideo::SendDecoderConfig() memcpy((unsigned char *)omx_buffer->pBuffer, m_extradata, omx_buffer->nFilledLen); omx_buffer->nFlags = OMX_BUFFERFLAG_CODECCONFIG | OMX_BUFFERFLAG_ENDOFFRAME; @@ -7846,7 +7872,7 @@ index 0363aaa..6cfb148 100644 omx_err = m_omx_decoder.EmptyThisBuffer(omx_buffer); if (omx_err != OMX_ErrorNone) { -@@ -707,6 +751,7 @@ bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, EDEINTERLACEMODE de +@@ -713,6 +757,7 @@ bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, EDEINTERLACEMODE de void COMXVideo::Close() { CSingleLock lock (m_critSection); @@ -7854,7 +7880,7 @@ index 0363aaa..6cfb148 100644 m_omx_tunnel_clock.Deestablish(); m_omx_tunnel_decoder.Deestablish(); if(m_deinterlace) -@@ -801,6 +846,7 @@ int COMXVideo::Decode(uint8_t *pData, int iSize, double pts) +@@ -807,6 +852,7 @@ int COMXVideo::Decode(uint8_t *pData, int iSize, double pts) int nRetry = 0; while(true) { @@ -7862,7 +7888,7 @@ index 0363aaa..6cfb148 100644 omx_err = m_omx_decoder.EmptyThisBuffer(omx_buffer); if (omx_err == OMX_ErrorNone) { -@@ -931,6 +977,7 @@ void COMXVideo::SubmitEOS() +@@ -937,6 +983,7 @@ void COMXVideo::SubmitEOS() omx_buffer->nFlags = OMX_BUFFERFLAG_ENDOFFRAME | OMX_BUFFERFLAG_EOS | OMX_BUFFERFLAG_TIME_UNKNOWN; @@ -7886,220 +7912,10 @@ index c68ac95..852c70d 100644 void CAdvancedSettings::setExtraLogLevel(const std::vector &components) -From eae1fe09d652c99b7a2ee0143b5c7e90d41ae97f Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Wed, 1 Oct 2014 22:45:09 +0100 -Subject: [PATCH 64/97] [mmalrenderer] Add choice of 4 deinterlace schemes - ---- - language/English/strings.po | 18 ++++++++++++++++++ - xbmc/cores/VideoRenderers/MMALRenderer.cpp | 10 ++++++++-- - xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.cpp | 5 ++++- - xbmc/cores/dvdplayer/DVDPlayer.cpp | 1 + - xbmc/cores/dvdplayer/DVDPlayer.h | 1 + - xbmc/cores/omxplayer/OMXHelper.cpp | 12 +++++++++++- - xbmc/cores/omxplayer/OMXVideo.cpp | 12 +++++++++--- - xbmc/settings/VideoSettings.h | 5 +++++ - xbmc/video/dialogs/GUIDialogVideoSettings.cpp | 4 ++++ - 9 files changed, 61 insertions(+), 7 deletions(-) - -diff --git a/language/English/strings.po b/language/English/strings.po -index bb444ec..d6a87fd 100755 ---- a/language/English/strings.po -+++ b/language/English/strings.po -@@ -7539,6 +7539,24 @@ msgctxt "#16329" - msgid "VAAPI Motion Compensated" - msgstr "" - -+#: xbmc/video/dialogs/GUIDialogVideoSettings.cpp -+msgctxt "#16330" -+msgid "MMAL - Advanced" -+msgstr "" -+ -+msgctxt "#16331" -+msgid "MMAL - Advanced (Half)" -+msgstr "" -+ -+msgctxt "#16332" -+msgid "MMAL - Bob" -+msgstr "" -+ -+msgctxt "#16333" -+msgid "MMAL - Bob (Half)" -+msgstr "" -+ -+ - #empty strings from id 16330 to 16399 - - #: xbmc/video/dialogs/GUIDialogVideoSettings.cpp -diff --git a/xbmc/cores/VideoRenderers/MMALRenderer.cpp b/xbmc/cores/VideoRenderers/MMALRenderer.cpp -index 5fb6dce..03a05de 100644 ---- a/xbmc/cores/VideoRenderers/MMALRenderer.cpp -+++ b/xbmc/cores/VideoRenderers/MMALRenderer.cpp -@@ -500,7 +500,13 @@ bool CMMALRenderer::Supports(EDEINTERLACEMODE mode) - - bool CMMALRenderer::Supports(EINTERLACEMETHOD method) - { -- if (method == VS_INTERLACEMETHOD_DEINTERLACE) -+ if (method == VS_INTERLACEMETHOD_MMAL_ADVANCED) -+ return true; -+ if (method == VS_INTERLACEMETHOD_MMAL_ADVANCED_HALF) -+ return true; -+ if (method == VS_INTERLACEMETHOD_MMAL_BOB) -+ return true; -+ if (method == VS_INTERLACEMETHOD_MMAL_BOB_HALF) - return true; - - return false; -@@ -525,7 +531,7 @@ bool CMMALRenderer::Supports(ESCALINGMETHOD method) - - EINTERLACEMETHOD CMMALRenderer::AutoInterlaceMethod() - { -- return VS_INTERLACEMETHOD_DEINTERLACE; -+ return VS_INTERLACEMETHOD_MMAL_ADVANCED; - } - - void CMMALRenderer::SetVideoRect(const CRect& InSrcRect, const CRect& InDestRect) -diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.cpp -index 42886b3..c9c3839 100644 ---- a/xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.cpp -+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.cpp -@@ -366,7 +366,10 @@ bool CMMALVideo::CreateDeinterlace(EINTERLACEMETHOD interlace_method) - CLog::Log(LOGERROR, "%s::%s Failed to create deinterlace component (status=%x %s)", CLASSNAME, __func__, status, mmal_status_to_string(status)); - return false; - } -- MMAL_PARAMETER_IMAGEFX_PARAMETERS_T imfx_param = {{MMAL_PARAMETER_IMAGE_EFFECT_PARAMETERS, sizeof(imfx_param)}, MMAL_PARAM_IMAGEFX_DEINTERLACE_FAST, 1, {3}}; -+ MMAL_PARAMETER_IMAGEFX_PARAMETERS_T imfx_param = {{MMAL_PARAMETER_IMAGE_EFFECT_PARAMETERS, sizeof(imfx_param)}, -+ interlace_method == VS_INTERLACEMETHOD_MMAL_ADVANCED || interlace_method == VS_INTERLACEMETHOD_MMAL_ADVANCED_HALF ? -+ MMAL_PARAM_IMAGEFX_DEINTERLACE_ADV : MMAL_PARAM_IMAGEFX_DEINTERLACE_FAST, -+ 3, {3, 0, interlace_method == VS_INTERLACEMETHOD_MMAL_ADVANCED_HALF || interlace_method == VS_INTERLACEMETHOD_MMAL_BOB_HALF }}; - status = mmal_port_parameter_set(m_deint->output[0], &imfx_param.hdr); - if (status != MMAL_SUCCESS) - { -diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp -index 6bb9ede..8a31513 100644 ---- a/xbmc/cores/dvdplayer/DVDPlayer.cpp -+++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp -@@ -573,6 +573,7 @@ CDVDPlayer::CDVDPlayer(IPlayerCallback& callback) - m_OmxPlayerState.bOmxSentEOFs = false; - m_OmxPlayerState.threshold = 0.2f; - m_OmxPlayerState.current_deinterlace = CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode; -+ m_OmxPlayerState.interlace_method = VS_INTERLACEMETHOD_MAX; - #ifdef HAS_OMXPLAYER - m_omxplayer_mode = CSettings::Get().GetBool("videoplayer.useomxplayer"); - #else -diff --git a/xbmc/cores/dvdplayer/DVDPlayer.h b/xbmc/cores/dvdplayer/DVDPlayer.h -index 9f75ccf..5fc3d01 100644 ---- a/xbmc/cores/dvdplayer/DVDPlayer.h -+++ b/xbmc/cores/dvdplayer/DVDPlayer.h -@@ -75,6 +75,7 @@ struct SOmxPlayerState - { - OMXClock av_clock; // openmax clock component - EDEINTERLACEMODE current_deinterlace; // whether deinterlace is currently enabled -+ EINTERLACEMETHOD interlace_method; // current deinterlace method - bool bOmxWaitVideo; // whether we need to wait for video to play out on EOS - bool bOmxWaitAudio; // whether we need to wait for audio to play out on EOS - bool bOmxSentEOFs; // flag if we've send EOFs to audio/video players -diff --git a/xbmc/cores/omxplayer/OMXHelper.cpp b/xbmc/cores/omxplayer/OMXHelper.cpp -index 08a3a11..9739ed0 100644 ---- a/xbmc/cores/omxplayer/OMXHelper.cpp -+++ b/xbmc/cores/omxplayer/OMXHelper.cpp -@@ -121,10 +121,20 @@ bool OMXDoProcessing(struct SOmxPlayerState &m_OmxPlayerState, int m_playSpeed, - float threshold = 0.1f; - bool audio_fifo_low = false, video_fifo_low = false, audio_fifo_high = false, video_fifo_high = false; - -+ if (m_OmxPlayerState.interlace_method == VS_INTERLACEMETHOD_MAX) -+ m_OmxPlayerState.interlace_method = g_renderManager.AutoInterlaceMethod(CMediaSettings::Get().GetCurrentVideoSettings().m_InterlaceMethod); -+ - // if deinterlace setting has changed, we should close and open video -- if (m_OmxPlayerState.current_deinterlace != CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode) -+ if (m_OmxPlayerState.current_deinterlace != CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode || -+ (m_OmxPlayerState.current_deinterlace != VS_DEINTERLACEMODE_OFF && -+ m_OmxPlayerState.interlace_method != g_renderManager.AutoInterlaceMethod(CMediaSettings::Get().GetCurrentVideoSettings().m_InterlaceMethod))) - { -+ CLog::Log(LOGERROR, "%s - Reopen stream due to interlace change (%d,%d,%d,%d)", __FUNCTION__, -+ m_OmxPlayerState.current_deinterlace, CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode, -+ m_OmxPlayerState.interlace_method, g_renderManager.AutoInterlaceMethod(CMediaSettings::Get().GetCurrentVideoSettings().m_InterlaceMethod)); -+ - m_OmxPlayerState.current_deinterlace = CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode; -+ m_OmxPlayerState.interlace_method = g_renderManager.AutoInterlaceMethod(CMediaSettings::Get().GetCurrentVideoSettings().m_InterlaceMethod); - reopen_stream = true; - } - -diff --git a/xbmc/cores/omxplayer/OMXVideo.cpp b/xbmc/cores/omxplayer/OMXVideo.cpp -index 6cfb148..b483829 100644 ---- a/xbmc/cores/omxplayer/OMXVideo.cpp -+++ b/xbmc/cores/omxplayer/OMXVideo.cpp -@@ -30,6 +30,8 @@ - #include "linux/XMemUtils.h" - #include "DVDDemuxers/DVDDemuxUtils.h" - #include "settings/AdvancedSettings.h" -+#include "settings/MediaSettings.h" -+#include "cores/VideoRenderers/RenderManager.h" - #include "xbmc/guilib/GraphicContext.h" - #include "settings/Settings.h" - #include "utils/BitstreamConverter.h" -@@ -298,8 +300,10 @@ bool COMXVideo::PortSettingsChanged() - - if(m_deinterlace) - { -- bool advanced_deinterlace = port_image.format.video.nFrameWidth * port_image.format.video.nFrameHeight <= 576 * 720; -- -+ EINTERLACEMETHOD interlace_method = g_renderManager.AutoInterlaceMethod(CMediaSettings::Get().GetCurrentVideoSettings().m_InterlaceMethod); -+ bool advanced_deinterlace = interlace_method == VS_INTERLACEMETHOD_MMAL_ADVANCED || interlace_method == VS_INTERLACEMETHOD_MMAL_ADVANCED_HALF && -+ port_image.format.video.nFrameWidth * port_image.format.video.nFrameHeight <= 576 * 720; -+ bool half_framerate = interlace_method == VS_INTERLACEMETHOD_MMAL_ADVANCED_HALF || interlace_method == VS_INTERLACEMETHOD_MMAL_BOB_HALF; - if (!advanced_deinterlace) - { - // Image_fx assumed 3 frames of context. simple deinterlace doesn't require this -@@ -319,8 +323,10 @@ bool COMXVideo::PortSettingsChanged() - OMX_INIT_STRUCTURE(image_filter); - - image_filter.nPortIndex = m_omx_image_fx.GetOutputPort(); -- image_filter.nNumParams = 1; -+ image_filter.nNumParams = 3; - image_filter.nParams[0] = 3; -+ image_filter.nParams[1] = 0; -+ image_filter.nParams[2] = half_framerate; - if (!advanced_deinterlace) - image_filter.eImageFilter = OMX_ImageFilterDeInterlaceFast; - else -diff --git a/xbmc/settings/VideoSettings.h b/xbmc/settings/VideoSettings.h -index 88434a4..6eaef1d 100644 ---- a/xbmc/settings/VideoSettings.h -+++ b/xbmc/settings/VideoSettings.h -@@ -67,6 +67,11 @@ enum EINTERLACEMETHOD - VS_INTERLACEMETHOD_VAAPI_MADI = 23, - VS_INTERLACEMETHOD_VAAPI_MACI = 24, - -+ VS_INTERLACEMETHOD_MMAL_ADVANCED = 25, -+ VS_INTERLACEMETHOD_MMAL_ADVANCED_HALF = 26, -+ VS_INTERLACEMETHOD_MMAL_BOB = 27, -+ VS_INTERLACEMETHOD_MMAL_BOB_HALF = 28, -+ - VS_INTERLACEMETHOD_MAX // do not use and keep as last enum value. - }; - -diff --git a/xbmc/video/dialogs/GUIDialogVideoSettings.cpp b/xbmc/video/dialogs/GUIDialogVideoSettings.cpp -index cffd5a4..ca65fdc 100644 ---- a/xbmc/video/dialogs/GUIDialogVideoSettings.cpp -+++ b/xbmc/video/dialogs/GUIDialogVideoSettings.cpp -@@ -262,6 +262,10 @@ void CGUIDialogVideoSettings::InitializeSettings() - entries.push_back(make_pair(16327, VS_INTERLACEMETHOD_VAAPI_BOB)); - entries.push_back(make_pair(16328, VS_INTERLACEMETHOD_VAAPI_MADI)); - entries.push_back(make_pair(16329, VS_INTERLACEMETHOD_VAAPI_MACI)); -+ entries.push_back(make_pair(16330, VS_INTERLACEMETHOD_MMAL_ADVANCED)); -+ entries.push_back(make_pair(16331, VS_INTERLACEMETHOD_MMAL_ADVANCED_HALF)); -+ entries.push_back(make_pair(16332, VS_INTERLACEMETHOD_MMAL_BOB)); -+ entries.push_back(make_pair(16333, VS_INTERLACEMETHOD_MMAL_BOB_HALF)); - - /* remove unsupported methods */ - for (StaticIntegerSettingOptions::iterator it = entries.begin(); it != entries.end(); ) - -From 7ded7074e10fc57d8aac1f02ac64f6114095f277 Mon Sep 17 00:00:00 2001 +From f863a659349b3715a4541105206032b4660dde85 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 24 Sep 2014 23:13:52 +0100 -Subject: [PATCH 65/97] [audio] Add settings option to boost centre channel +Subject: [PATCH 66/92] [audio] Add settings option to boost centre channel when downmixing This allows a dB volume increase to be added to centre channel. @@ -8117,10 +7933,10 @@ Should work with Pi Sink (dvdplayer/paplayer) and omxplayer 5 files changed, 45 insertions(+) diff --git a/language/English/strings.po b/language/English/strings.po -index d6a87fd..6d0ac82 100755 +index e10fea7..a3b745d 100755 --- a/language/English/strings.po +++ b/language/English/strings.po -@@ -16162,3 +16162,17 @@ msgstr "" +@@ -16168,3 +16168,17 @@ msgstr "" msgctxt "#38006" msgid "Adjust PLL" msgstr "" @@ -8187,10 +8003,10 @@ index de188e7..449a500 100644 if (remapLayout) { diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp -index 6565cdb..a50cd70 100644 +index 96f79b7..84505bf 100644 --- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp +++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp -@@ -160,6 +160,12 @@ bool CActiveAEResamplePi::Init(uint64_t dst_chan_layout, int dst_channels, int d +@@ -162,6 +162,12 @@ bool CActiveAEResamplePi::Init(uint64_t dst_chan_layout, int dst_channels, int d { av_opt_set_double(m_pContext, "rematrix_maxval", 1.0, 0); } @@ -8221,10 +8037,10 @@ index b5e86ae..00bae83 100644 // stereo upmix if (upmix && m_src_channels == 2 && m_dst_channels > 2) -From 5dcf5b9b73e2a621aed8de3f0ffbccaad07312ff Mon Sep 17 00:00:00 2001 +From 53c0c459527532c53e97cff6c6bfd131bbd1937a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 3 Oct 2014 18:38:07 +0100 -Subject: [PATCH 66/97] [omxcore] Skip out of flush on error +Subject: [PATCH 67/92] [omxcore] Skip out of flush on error --- xbmc/linux/OMXCore.cpp | 4 ++-- @@ -8253,10 +8069,10 @@ index 4ae29ba..4caa304 100644 OMX_ERRORTYPE omx_err = OMX_ErrorNone; -From 6c8e95fbd64a5c2ee204931f2949bbd1f0e8bd66 Mon Sep 17 00:00:00 2001 +From 26e4efaa67218f76ba6cbaf11952992443610564 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 3 Oct 2014 18:40:06 +0100 -Subject: [PATCH 67/97] [SinkPi] Handle multichannel layout more like OMXAudio +Subject: [PATCH 68/92] [SinkPi] Handle multichannel layout more like OMXAudio --- xbmc/cores/AudioEngine/Sinks/AESinkPi.cpp | 14 +++++++------- @@ -8315,10 +8131,10 @@ index 89684e4..fd9a03d 100644 m_format = format; m_sinkbuffer_sec_per_byte = 1.0 / (double)(m_format.m_frameSize * m_format.m_sampleRate); -From 53b4968f1204fcec85d5bb0c60fe96b35a021306 Mon Sep 17 00:00:00 2001 +From 722f1492746205af14dc4d8c3a6109bdcd8810b2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 5 Oct 2014 14:05:25 +0100 -Subject: [PATCH 68/97] [PiSink] Allow audio output latency to be set in +Subject: [PATCH 69/92] [PiSink] Allow audio output latency to be set in settings --- @@ -8329,10 +8145,10 @@ Subject: [PATCH 68/97] [PiSink] Allow audio output latency to be set in 4 files changed, 36 insertions(+), 5 deletions(-) diff --git a/language/English/strings.po b/language/English/strings.po -index 6d0ac82..c69e7a5 100755 +index a3b745d..207df3a 100755 --- a/language/English/strings.po +++ b/language/English/strings.po -@@ -16176,3 +16176,18 @@ msgstr "" +@@ -16182,3 +16182,18 @@ msgstr "" #: system/settings/settings.xml msgctxt "#38009" msgid "%i dB" @@ -8446,34 +8262,10 @@ index 5c57999..cac5051 100644 bool m_Initialized; uint32_t m_submitted; -From c341c9d644515dfb718480e7e1e8b2f4a96ed2d9 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Sun, 19 Oct 2014 13:43:46 +0100 -Subject: [PATCH 69/97] Revert "hack: revert squash: don't update originaldts - when marked as invalid" - -This reverts commit 4085c67b535627e1723ca8d7f82f3cdeaa67f54e. ---- - xbmc/cores/dvdplayer/DVDPlayer.cpp | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp -index 8a31513..83b92e0 100644 ---- a/xbmc/cores/dvdplayer/DVDPlayer.cpp -+++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp -@@ -1960,7 +1960,6 @@ void CDVDPlayer::CheckContinuity(CCurrentStream& current, DemuxPacket* pPacket) - // not sure yet - flags the packets as unknown until we get confirmation on another audio/video packet - pPacket->dts = DVD_NOPTS_VALUE; - pPacket->pts = DVD_NOPTS_VALUE; -- current.originaldts = pPacket->dts; - } - } - else - -From e19c45b1e14750e8d0c02cfdcecbf034502da6d6 Mon Sep 17 00:00:00 2001 +From 54ef2c8c6a3ceccbc3e516f151614b23a2e2e782 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 18 Aug 2014 19:09:32 +0100 -Subject: [PATCH 70/97] rbp: Use new dispmanx function for vsync callbacks +Subject: [PATCH 70/92] rbp: Use new dispmanx function for vsync callbacks --- xbmc/linux/RBP.cpp | 85 ++++++++++++++----------- @@ -8685,10 +8477,10 @@ index 1529045..b6bf1fc 100644 } DLOG("CEGLNativeTypeRaspberryPI::DestroyDispmaxWindow\n"); -From 0b84e5ba0029132ebeabab2e0f10b060532a0007 Mon Sep 17 00:00:00 2001 +From 252c1d03e42ce8bef9e21b4b00cb88841c8db270 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 19 Aug 2014 17:56:45 +0100 -Subject: [PATCH 71/97] Revert "rbp: Use new dispmanx function for vsync +Subject: [PATCH 71/92] Revert "rbp: Use new dispmanx function for vsync callbacks" This reverts commit afbf8fbceaa6649fb4a6bbd9a1cee6087590412b. @@ -8902,10 +8694,10 @@ index b6bf1fc..1529045 100644 } DLOG("CEGLNativeTypeRaspberryPI::DestroyDispmaxWindow\n"); -From 2fb3ede039019d8b52d6bb014fdb098288a41553 Mon Sep 17 00:00:00 2001 +From 8b66d5eb4b1380521dd123b4c886dd5a0c74c280 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 27 Oct 2014 15:23:51 +0000 -Subject: [PATCH 72/97] [rbp] Default extract thumbnails to false +Subject: [PATCH 72/92] [rbp] Default extract thumbnails to false It can take 80 seconds for a single file on a Pi. It can cause crashes with out-of-memory errors. It genereates a lot of support issues. Best to default to disabled and let users enable it if they must @@ -8935,11 +8727,10 @@ index b8e6e59..40be71e 100644
- -From 7610854329fe94c30f3e1167b2bebbc01df71519 Mon Sep 17 00:00:00 2001 +From ce2871ebaa2f01d996b7f0a1b0f69adc306aba42 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Nov 2014 17:16:54 +0000 -Subject: [PATCH 74/97] Revert "[omxplayer] Add ability to dump out audio/video +Subject: [PATCH 74/92] Revert "[omxplayer] Add ability to dump out audio/video data for later debugging" This reverts commit 417416bd29d00f1b42c77488d06e9e6840b8c4f4. @@ -8952,7 +8743,7 @@ This reverts commit 417416bd29d00f1b42c77488d06e9e6840b8c4f4. 5 files changed, 112 deletions(-) diff --git a/language/English/strings.po b/language/English/strings.po -index 93f8398..b5602c9 100755 +index 385ad73..d1ad46f 100755 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -2897,16 +2897,6 @@ msgctxt "#697" @@ -9182,10 +8973,10 @@ index 852c70d..c68ac95 100644 void CAdvancedSettings::setExtraLogLevel(const std::vector &components) -From 2afa229e47ef1e04cec417cbde1de9649ec9c5aa Mon Sep 17 00:00:00 2001 +From 5db668c093700c0ec4131403e39625827ac74aa4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 7 Apr 2014 23:13:55 +0100 -Subject: [PATCH 75/97] [omxplayer] Add ability to dump out audio/video data +Subject: [PATCH 75/92] [omxplayer] Add ability to dump out audio/video data for later debugging --- @@ -9196,7 +8987,7 @@ Subject: [PATCH 75/97] [omxplayer] Add ability to dump out audio/video data 4 files changed, 79 insertions(+) diff --git a/language/English/strings.po b/language/English/strings.po -index b5602c9..93f8398 100755 +index d1ad46f..385ad73 100755 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -2897,6 +2897,16 @@ msgctxt "#697" @@ -9230,7 +9021,7 @@ index a3b6ba6..f01c83b 100644 #include "utils/params_check_macros.h" diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp -index 83b92e0..3036eb9 100644 +index 55729eb..23698c8 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp @@ -95,6 +95,61 @@ @@ -9295,7 +9086,7 @@ index 83b92e0..3036eb9 100644 void CSelectionStreams::Clear(StreamType type, StreamSource source) { CSingleLock lock(m_section); -@@ -935,6 +990,12 @@ bool CDVDPlayer::ReadPacket(DemuxPacket*& packet, CDemuxStream*& stream) +@@ -936,6 +991,12 @@ bool CDVDPlayer::ReadPacket(DemuxPacket*& packet, CDemuxStream*& stream) return true; } @@ -9308,7 +9099,7 @@ index 83b92e0..3036eb9 100644 UpdateCorrection(packet, m_offset_pts); if(packet->iStreamId < 0) -@@ -3292,6 +3353,8 @@ bool CDVDPlayer::CloseStream(CCurrentStream& current, bool bWaitForBuffers) +@@ -3312,6 +3373,8 @@ bool CDVDPlayer::CloseStream(CCurrentStream& current, bool bWaitForBuffers) if(bWaitForBuffers) SetCaching(CACHESTATE_DONE); @@ -9334,139 +9125,10 @@ index c68ac95..852c70d 100644 void CAdvancedSettings::setExtraLogLevel(const std::vector &components) -From e40512bd94b6b85a56fd17ec789720fb1cc1f89b Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Wed, 5 Nov 2014 14:51:16 +0000 -Subject: [PATCH 78/97] [DVDMessageQueue] Remove pi specific logging ifdef - ---- - xbmc/cores/dvdplayer/DVDMessageQueue.cpp | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/xbmc/cores/dvdplayer/DVDMessageQueue.cpp b/xbmc/cores/dvdplayer/DVDMessageQueue.cpp -index 92fa67a..f6ad8d0 100644 ---- a/xbmc/cores/dvdplayer/DVDMessageQueue.cpp -+++ b/xbmc/cores/dvdplayer/DVDMessageQueue.cpp -@@ -162,9 +162,7 @@ MsgQueueReturnCode CDVDMessageQueue::Get(CDVDMsg** pMsg, unsigned int iTimeoutIn - - if(m_list.empty() && m_bEmptied == false && priority == 0 && m_owner != "teletext") - { --#if !defined(TARGET_RASPBERRY_PI) - CLog::Log(LOGWARNING, "CDVDMessageQueue(%s)::Get - asked for new data packet, with nothing available", m_owner.c_str()); --#endif - m_bEmptied = true; - } - - -From 69a818a9888e2d262755bae0befa511bc6279278 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Thu, 6 Nov 2014 16:20:30 +0000 -Subject: [PATCH 79/97] [ResamplePi] Add support for formats that need shifting - -This case is triggered by HiFiBerry's 24-bit format. -Requires updated firmware ---- - .../Engines/ActiveAE/ActiveAEResamplePi.cpp | 28 +++++++++++++--------- - .../Engines/ActiveAE/ActiveAEResamplePi.h | 1 + - 2 files changed, 18 insertions(+), 11 deletions(-) - -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp -index a50cd70..84505bf 100644 ---- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp -@@ -115,10 +115,6 @@ bool CActiveAEResamplePi::Init(uint64_t dst_chan_layout, int dst_channels, int d - - CLog::Log(LOGINFO, "%s::%s remap:%p chan:%d->%d rate:%d->%d format:%d->%d bits:%d->%d dither:%d->%d norm:%d upmix:%d", CLASSNAME, __func__, remapLayout, src_channels, dst_channels, src_rate, dst_rate, src_fmt, dst_fmt, src_bits, dst_bits, src_dither, dst_dither, normalize, upmix); - -- if (!src_bits) -- src_bits = format_to_bits(src_fmt); -- if (!dst_bits) -- dst_bits = format_to_bits(dst_fmt); - m_dst_chan_layout = dst_chan_layout; - m_dst_channels = dst_channels; - m_dst_rate = dst_rate; -@@ -132,6 +128,12 @@ bool CActiveAEResamplePi::Init(uint64_t dst_chan_layout, int dst_channels, int d - m_src_bits = src_bits; - m_src_dither_bits = src_dither; - m_offset = 0; -+ m_src_pitch = format_to_bits(m_src_fmt) >> 3; -+ m_dst_pitch = format_to_bits(m_dst_fmt) >> 3; -+ -+ // special handling for S24 formats which are carried in S32 (S24NE3) -+ if ((m_dst_fmt == AV_SAMPLE_FMT_S32 || m_dst_fmt == AV_SAMPLE_FMT_S32P) && m_dst_bits == 24 && m_dst_dither_bits == -8) -+ m_dst_pitch = 24; - - if (m_dst_chan_layout == 0) - m_dst_chan_layout = av_get_default_channel_layout(m_dst_channels); -@@ -304,7 +306,7 @@ bool CActiveAEResamplePi::Init(uint64_t dst_chan_layout, int dst_channels, int d - m_pcm_input.eNumData = OMX_NumericalDataSigned; - m_pcm_input.eEndian = OMX_EndianLittle; - m_pcm_input.bInterleaved = OMX_TRUE; -- m_pcm_input.nBitPerSample = m_src_bits; -+ m_pcm_input.nBitPerSample = m_src_pitch << 3; - // 0x8000 = float, 0x10000 = planar - uint32_t flags = 0; - if (m_src_fmt == AV_SAMPLE_FMT_FLT || m_src_fmt == AV_SAMPLE_FMT_FLTP) -@@ -324,12 +326,16 @@ bool CActiveAEResamplePi::Init(uint64_t dst_chan_layout, int dst_channels, int d - m_pcm_output.eNumData = OMX_NumericalDataSigned; - m_pcm_output.eEndian = OMX_EndianLittle; - m_pcm_output.bInterleaved = OMX_TRUE; -- m_pcm_output.nBitPerSample = m_dst_bits; -+ m_pcm_output.nBitPerSample = m_dst_pitch << 3; - flags = 0; - if (m_dst_fmt == AV_SAMPLE_FMT_FLT || m_dst_fmt == AV_SAMPLE_FMT_FLTP) - flags |= 0x8000; - if (m_dst_fmt >= AV_SAMPLE_FMT_U8P) - flags |= 0x10000; -+ // shift bits if destination format requires it, swr_resamples aligns to the left -+ if (m_dst_bits != 32 && (m_dst_dither_bits + m_dst_bits) != 32) -+ flags |= (32 - m_dst_bits - m_dst_dither_bits) << 8; -+ - m_pcm_output.ePCMMode = flags == 0 ? OMX_AUDIO_PCMModeLinear : (OMX_AUDIO_PCMMODETYPE)flags; - m_pcm_output.nChannels = dst_channels; - m_pcm_output.nSamplingRate = dst_rate; -@@ -440,11 +446,11 @@ int CActiveAEResamplePi::Resample(uint8_t **dst_buffer, int dst_samples, uint8_t - const int d_planes = m_dst_fmt >= AV_SAMPLE_FMT_U8P ? m_dst_channels : 1; - const int s_chans = m_src_fmt >= AV_SAMPLE_FMT_U8P ? 1 : m_src_channels; - const int d_chans = m_dst_fmt >= AV_SAMPLE_FMT_U8P ? 1 : m_dst_channels; -- const int s_pitch = s_chans * m_src_bits >> 3; -- const int d_pitch = d_chans * m_dst_bits >> 3; -+ const int s_pitch = s_chans * m_src_pitch; -+ const int d_pitch = d_chans * m_dst_pitch; - -- const int s_samplesize = m_src_channels * m_src_bits >> 3; -- const int d_samplesize = m_dst_channels * m_dst_bits >> 3; -+ const int s_samplesize = m_src_channels * m_src_pitch; -+ const int d_samplesize = m_dst_channels * m_dst_pitch; - const int max_src_samples = BUFFERSIZE / s_samplesize; - const int max_dst_samples = (long long)(BUFFERSIZE / d_samplesize) * m_src_rate / (m_dst_rate + m_src_rate-1); - -@@ -550,7 +556,7 @@ int CActiveAEResamplePi::GetBufferedSamples() - int samples = 0; - if (m_encoded_buffer) - { -- const int d_samplesize = m_dst_channels * m_dst_bits >> 3; -+ const int d_samplesize = m_dst_channels * m_src_pitch; - samples = m_encoded_buffer->nFilledLen / d_samplesize - m_offset; - } - #ifdef DEBUG_VERBOSE -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.h b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.h -index dfa3e4a..25588d4 100644 ---- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.h -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.h -@@ -47,6 +47,7 @@ class CActiveAEResamplePi : public IAEResample - int m_src_channels, m_dst_channels; - AVSampleFormat m_src_fmt, m_dst_fmt; - int m_src_bits, m_dst_bits; -+ int m_src_pitch, m_dst_pitch; - int m_src_dither_bits, m_dst_dither_bits; - - OMX_AUDIO_PARAM_PCMMODETYPE m_pcm_input; - -From 2352298cd69067c20cf165bb25a01bd19f6e214f Mon Sep 17 00:00:00 2001 +From 1f6a0a9f07addf450eed60b718ece3a8ec825804 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 11 Nov 2014 18:14:23 +0000 -Subject: [PATCH 80/97] [resamplepi] Try to report the same numbers as ffmpeg +Subject: [PATCH 78/92] [resamplepi] Try to report the same numbers as ffmpeg --- .../cores/AudioEngine/Engines/ActiveAE/ActiveAEResamplePi.cpp | 11 ++++++----- @@ -9517,19 +9179,19 @@ index 84505bf..2b5bef2 100644 CLog::Log(LOGINFO, "%s::%s = %d", CLASSNAME, __func__, ret); #endif -From de94bc24368fa9a412bff2024804ebe0ac9ec3c3 Mon Sep 17 00:00:00 2001 +From 3dd9b3abdb96f41b5e39dae0fe595445043c0751 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 11 Nov 2014 20:49:30 +0000 -Subject: [PATCH 81/97] [dvdplayer] New scheme for PLL adjustment for video +Subject: [PATCH 79/92] [dvdplayer] New scheme for PLL adjustment for video clock --- - xbmc/cores/dvdplayer/DVDPlayerAudio.cpp | 50 ++++++++++++++++++--------------- + xbmc/cores/dvdplayer/DVDPlayerAudio.cpp | 56 ++++++++++++++++++++------------- xbmc/cores/dvdplayer/DVDPlayerAudio.h | 2 ++ - 2 files changed, 30 insertions(+), 22 deletions(-) + 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp b/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp -index 5e9a6d3..34207b2 100644 +index 5e9a6d3..1e3a1ae 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp @@ -113,7 +113,9 @@ CDVDPlayerAudio::CDVDPlayerAudio(CDVDClock* pClock, CDVDMessageQueue& parent) @@ -9565,19 +9227,21 @@ index 5e9a6d3..34207b2 100644 CLog::Log(LOGNOTICE, "Deleting audio codec"); if (m_pAudioCodec) { -@@ -475,9 +483,9 @@ void CDVDPlayerAudio::UpdatePlayerInfo() +@@ -475,9 +483,11 @@ void CDVDPlayerAudio::UpdatePlayerInfo() //print the inverse of the resample ratio, since that makes more sense //if the resample ratio is 0.5, then we're playing twice as fast if (m_synctype == SYNC_RESAMPLE) - s << ", rr:" << fixed << setprecision(5) << 1.0 / m_resampleratio; + s << ", rr:" << fixed << setprecision(5) << 1.0 / m_resampleratio << ", err:" << fixed << setprecision(1) << m_last_error * 1e-3 << "ms"; ++ if (m_synctype == SYNC_SKIPDUP) ++ s << ", err:" << fixed << setprecision(1) << m_last_error * 1e-3 << "ms"; if (m_synctype == SYNC_PLLADJUST) - s << ", pll:" << fixed << setprecision(5) << 1.0 / m_plladjust; + s << ", pll:" << fixed << setprecision(5) << m_last_plladjust << ", err:" << fixed << setprecision(1) << m_last_error * 1e-3 << "ms"; s << ", att:" << fixed << setprecision(1) << log(GetCurrentAttenuation()) * 20.0f << " dB"; -@@ -651,6 +659,7 @@ void CDVDPlayerAudio::HandleSyncError(double duration) +@@ -651,6 +661,7 @@ void CDVDPlayerAudio::HandleSyncError(double duration) m_pClock->Update(clock+error, absolute, 0.0, "CDVDPlayerAudio::HandleSyncError1"); m_errors.Flush(); m_error = 0; @@ -9585,11 +9249,11 @@ index 5e9a6d3..34207b2 100644 m_syncclock = false; return; -@@ -704,30 +713,27 @@ void CDVDPlayerAudio::HandleSyncError(double duration) +@@ -704,32 +715,33 @@ void CDVDPlayerAudio::HandleSyncError(double duration) proportional = m_error / DVD_TIME_BASE / proportionaldiv; } m_resampleratio = 1.0 / m_pClock->GetClockSpeed() + proportional + m_integral; -+ m_last_error = m_error; ++ CLog::Log(LOGDEBUG, "CDVDPlayerAudio::%s rr:%.5f error:%.3fms", __FUNCTION__, m_resampleratio, m_error * 1e-3); } else if (m_synctype == SYNC_PLLADJUST) { @@ -9605,16 +9269,20 @@ index 5e9a6d3..34207b2 100644 - //on big errors use more proportional - if (fabs(m_error / DVD_TIME_BASE) > 0.0) + // PID control loop to reduce error through pll adjustment ++ double error = m_error / DVD_TIME_BASE; ++ double last_error = m_last_error / DVD_TIME_BASE; + double dt = 2.0; -+ double Kp = 1*1e-4; -+ double Ki = 1*1e-5; -+ double Kd = 1*1e-2; -+ m_integral += m_error*1e-6*dt; -+ double derivative = (m_error - m_last_error) * 1e-6 / dt; -+ double output = Kp * m_error * 1e-6 + Ki * m_integral + Kd * derivative; ++ double Ku = 5e-3; // ultimate gain ++ double Pu = 100.0; // oscillation period ++ double Kp = 0.6 * Ku; ++ double Ki = 2.0 * Kp / Pu; ++ double Kd = Kp * Pu / 8.0; ++ m_integral += error * dt; ++ double derivative = (error - last_error) / dt; ++ double output = Kp * error + Ki * m_integral + Kd * derivative; + m_plladjust = 1.0f + output; + // skip updating pll if difference is unexpectedly high - probably a glitch after seek/pause/loss -+ if (m_error - m_last_error < DVD_MSEC_TO_TIME(2)) ++ if (error - last_error < 2e-3) { - double proportionaldiv = PROPORTIONAL * (PROPREF / fabs(m_error / DVD_TIME_BASE)); - if (proportionaldiv < PROPDIVMIN) proportionaldiv = PROPDIVMIN; @@ -9622,15 +9290,17 @@ index 5e9a6d3..34207b2 100644 - - proportional = m_error / DVD_TIME_BASE / proportionaldiv; + m_last_plladjust = g_RBP.AdjustHDMIClock(m_plladjust); -+ CLog::Log(LOGDEBUG, "CDVDPlayerAudio::%s pll:%.5f (%.5f) error:%.3fms prop:%.6f int:%.6f der:%.6f", __FUNCTION__, m_plladjust, m_last_plladjust, m_error * 1e-3, Kp * m_error * 1e-6, Ki * m_integral, Kd * derivative); ++ CLog::Log(LOGDEBUG, "CDVDPlayerAudio::%s pll:%.5f (%.5f) error:%.3fms prop:%.6f int:%.6f der:%.6f", __FUNCTION__, m_plladjust, m_last_plladjust, error * 1e3, Kp * error , Ki * m_integral, Kd * derivative); } - m_plladjust = 1.0 / m_pClock->GetClockSpeed() + proportional + m_integral; - double new_adjust = g_RBP.AdjustHDMIClock(m_plladjust); - CLog::Log(LOGDEBUG, "CDVDPlayerAudio::%s pll:%.4f (%.4f) proportional:%.4f integral:%.4f", __FUNCTION__, m_plladjust, new_adjust, proportional, m_integral); -+ m_last_error = m_error; #endif } ++ m_last_error = m_error; } + } + diff --git a/xbmc/cores/dvdplayer/DVDPlayerAudio.h b/xbmc/cores/dvdplayer/DVDPlayerAudio.h index 02c64a0..37bf4bd 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerAudio.h @@ -9645,137 +9315,10 @@ index 02c64a0..37bf4bd 100644 struct SInfo { -From d0aec4e57e29c65233b7fd1f85c5046879e698a3 Mon Sep 17 00:00:00 2001 -From: wsnipex -Date: Sat, 8 Nov 2014 10:36:20 +0100 -Subject: [PATCH 82/97] add canseek and drop unused rtmp options - ---- - .../DVDInputStreams/DVDInputStreamRTMP.cpp | 47 +++++++++------------- - .../dvdplayer/DVDInputStreams/DVDInputStreamRTMP.h | 8 +++- - 2 files changed, 25 insertions(+), 30 deletions(-) - -diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp -index 62ddd3d..324eadb 100644 ---- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp -+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp -@@ -63,7 +63,10 @@ extern "C" - } - } - --CDVDInputStreamRTMP::CDVDInputStreamRTMP() : CDVDInputStream(DVDSTREAM_TYPE_RTMP) -+CDVDInputStreamRTMP::CDVDInputStreamRTMP() -+ : CDVDInputStream(DVDSTREAM_TYPE_RTMP) -+ , m_canSeek(true) -+ , m_canPause(true) - { - if (m_libRTMP.Load()) - { -@@ -119,19 +122,6 @@ bool CDVDInputStreamRTMP::IsEOF() - #undef AVC - #define AVC(str) {(char *)str,sizeof(str)-1} - --/* librtmp option names are slightly different */ --static const struct { -- const char *name; -- AVal key; --} options[] = { -- { "SWFPlayer", AVC("swfUrl") }, -- { "PageURL", AVC("pageUrl") }, -- { "PlayPath", AVC("playpath") }, -- { "TcUrl", AVC("tcUrl") }, -- { "IsLive", AVC("live") }, -- { NULL } --}; -- - bool CDVDInputStreamRTMP::Open(const char* strFile, const std::string& content) - { - if (m_sStreamPlaying) -@@ -152,21 +142,23 @@ bool CDVDInputStreamRTMP::Open(const char* strFile, const std::string& content) - if (!m_libRTMP.SetupURL(m_rtmp, m_sStreamPlaying)) - return false; - -- // SetOpt and SetAVal copy pointers to the value. librtmp doesn't use the values until the Connect() call, -- // so value objects must stay allocated until then. To be extra safe, keep the values around until Close(), -- // in case librtmp needs them again. -- m_optionvalues.clear(); -- for (int i=0; options[i].name; i++) -+ /* Look for protocol options in the URL. -+ * Options are added to the URL in space separated key=value pairs. -+ * We are only interested in the "live" option to disable seeking, -+ * the rest is handled by librtmp internally -+ * -+ * example URL suitable for use with RTMP_SetupURL(): -+ * "rtmp://flashserver:1935/ondemand/thefile swfUrl=http://flashserver/player.swf swfVfy=1 live=1" -+ * details: https://rtmpdump.mplayerhq.hu/librtmp.3.html -+ */ -+ std::string url = strFile; -+ size_t iPosBlank = url.find(' '); -+ if (iPosBlank != string::npos && (url.find("live=true") != string::npos || url.find("live=1") != string::npos)) - { -- std::string tmp = m_item.GetProperty(options[i].name).asString(); -- if (!tmp.empty()) -- { -- m_optionvalues.push_back(tmp); -- AVal av_tmp; -- SetAVal(av_tmp, m_optionvalues.back()); -- m_libRTMP.SetOpt(m_rtmp, &options[i].key, &av_tmp); -- } -+ m_canSeek = false; -+ m_canPause = false; - } -+ CLog::Log(LOGDEBUG, "RTMP canseek: %s", m_canSeek ? "true" : "false"); - - if (!m_libRTMP.Connect(m_rtmp, NULL) || !m_libRTMP.ConnectStream(m_rtmp, 0)) - return false; -@@ -185,7 +177,6 @@ void CDVDInputStreamRTMP::Close() - if (m_rtmp) - m_libRTMP.Close(m_rtmp); - -- m_optionvalues.clear(); - m_eof = true; - m_bPaused = false; - } -diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.h b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.h -index b013f33..5568c14 100644 ---- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.h -+++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.h -@@ -27,6 +27,7 @@ - class CDVDInputStreamRTMP - : public CDVDInputStream - , public CDVDInputStream::ISeekTime -+ , public CDVDInputStream::ISeekable - { - public: - CDVDInputStreamRTMP(); -@@ -36,7 +37,9 @@ class CDVDInputStreamRTMP - virtual int Read(uint8_t* buf, int buf_size); - virtual int64_t Seek(int64_t offset, int whence); - bool SeekTime(int iTimeInMsec); -- virtual bool Pause(double dTime); -+ bool CanSeek() { return m_canSeek; } -+ bool CanPause() { return m_canPause; } -+ virtual bool Pause(double dTime); - virtual bool IsEOF(); - virtual int64_t GetLength(); - -@@ -45,8 +48,9 @@ class CDVDInputStreamRTMP - protected: - bool m_eof; - bool m_bPaused; -+ bool m_canSeek; -+ bool m_canPause; - char* m_sStreamPlaying; -- std::vector m_optionvalues; - - RTMP *m_rtmp; - DllLibRTMP m_libRTMP; - - -From 2ec242be97b36d14e1c4f93764656ce8158b2089 Mon Sep 17 00:00:00 2001 +From f81c5dead1fde5a80e16f199b7dfcea283c175ae Mon Sep 17 00:00:00 2001 From: Thomas Amland Date: Wed, 12 Nov 2014 13:20:55 +0100 -Subject: [PATCH 85/97] do database clean on thread +Subject: [PATCH 80/92] do database clean on thread --- xbmc/Application.cpp | 6 ++---- @@ -9874,10 +9417,10 @@ index 47d5ed4..68b90fa 100644 INFO_RET RetrieveInfoForTvShow(CFileItem *pItem, bool bDirNames, ADDON::ScraperPtr &scraper, bool useLocal, CScraperUrl* pURL, bool fetchEpisodes, CGUIDialogProgress* pDlgProgress); INFO_RET RetrieveInfoForMovie(CFileItem *pItem, bool bDirNames, ADDON::ScraperPtr &scraper, bool useLocal, CScraperUrl* pURL, CGUIDialogProgress* pDlgProgress); -From df579e1bd8e53096065251d663ca184f05fef524 Mon Sep 17 00:00:00 2001 +From 5d3814998756c042af27cc048e5073a512c24c5e Mon Sep 17 00:00:00 2001 From: Thomas Amland Date: Wed, 12 Nov 2014 14:36:52 +0100 -Subject: [PATCH 86/97] use extended progress bar for library clean +Subject: [PATCH 81/92] use extended progress bar for library clean --- xbmc/video/VideoDatabase.cpp | 50 +++++++---------------------------------- @@ -10049,17 +9592,17 @@ index cce627a..9e42a8f 100644 m_bRunning = false; } -From 4511bce45ef0adaf304acc7027f3951265063370 Mon Sep 17 00:00:00 2001 +From 4c11cdb747bfea7c2bff995e2cd2846490ea4ed2 Mon Sep 17 00:00:00 2001 From: fritsch Date: Tue, 11 Nov 2014 21:34:44 +0100 -Subject: [PATCH 87/97] VAAPI: Use Component Logging +Subject: [PATCH 82/92] VAAPI: Use Component Logging --- xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp | 55 ++++++++++++++++---------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp -index 0d6477a..709d808 100644 +index a5e560a..ed7bd74 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp @@ -30,6 +30,7 @@ @@ -10136,7 +9679,7 @@ index 0d6477a..709d808 100644 Message *reply; if (m_vaapiOutput.m_controlPort.SendOutMessageSync(COutputControlProtocol::PRECLEANUP, -@@ -832,7 +842,8 @@ int CDecoder::Check(AVCodecContext* avctx) +@@ -834,7 +844,8 @@ int CDecoder::Check(AVCodecContext* avctx) if (state == VAAPI_LOST) { @@ -10146,7 +9689,7 @@ index 0d6477a..709d808 100644 if (!m_DisplayEvent.WaitMSec(4000)) { CLog::Log(LOGERROR, "VAAPI::Check - device didn't reset in reasonable time"); -@@ -1069,7 +1080,8 @@ void CDecoder::FiniVAAPIOutput() +@@ -1071,7 +1082,8 @@ void CDecoder::FiniVAAPIOutput() m_vaapiConfig.contextId = VA_INVALID_ID; // detroy surfaces @@ -10156,7 +9699,7 @@ index 0d6477a..709d808 100644 VASurfaceID surf; while((surf = m_videoSurfaces.RemoveNext()) != VA_INVALID_SURFACE) { -@@ -1824,7 +1836,8 @@ void COutput::InitCycle() +@@ -1827,7 +1839,8 @@ void COutput::InitCycle() } else { @@ -10166,7 +9709,7 @@ index 0d6477a..709d808 100644 method = VS_INTERLACEMETHOD_RENDER_BOB; } -@@ -2070,7 +2083,8 @@ bool COutput::ProcessSyncPicture() +@@ -2073,7 +2086,8 @@ bool COutput::ProcessSyncPicture() } else { @@ -10176,7 +9719,7 @@ index 0d6477a..709d808 100644 } } return busy; -@@ -2174,8 +2188,8 @@ bool COutput::EnsureBufferPool() +@@ -2177,8 +2191,8 @@ bool COutput::EnsureBufferPool() } m_bufferPool.procPicId = 0; @@ -10187,7 +9730,7 @@ index 0d6477a..709d808 100644 return true; } -@@ -2339,8 +2353,8 @@ bool COutput::CreateGlxContext() +@@ -2342,8 +2356,8 @@ bool COutput::CreateGlxContext() CLog::Log(LOGERROR, "VAAPI::COutput::CreateGlxContext - Could not make Pixmap current"); return false; } @@ -10198,7 +9741,7 @@ index 0d6477a..709d808 100644 return true; } -@@ -3036,7 +3050,8 @@ bool CFFmpegPostproc::Init(EINTERLACEMETHOD method) +@@ -3047,7 +3061,8 @@ bool CFFmpegPostproc::Init(EINTERLACEMETHOD method) else if (method == VS_INTERLACEMETHOD_RENDER_BOB || method == VS_INTERLACEMETHOD_NONE) { @@ -10209,17 +9752,17 @@ index 0d6477a..709d808 100644 avfilter_inout_free(&inputs); } -From 492e1820ab6da9d15323336f7928f068b32fc3ea Mon Sep 17 00:00:00 2001 +From 93bf3176f2362d178b69b46bdb8257206ba91244 Mon Sep 17 00:00:00 2001 From: fritsch Date: Tue, 11 Nov 2014 21:37:16 +0100 -Subject: [PATCH 88/97] VDPAU: Component Logging +Subject: [PATCH 83/92] VDPAU: Component Logging --- xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 35 ++++++++++++++++++-------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index e5e7970..391fab1 100644 +index 5760fc5..ee0110f 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -667,7 +667,8 @@ void CDecoder::SetWidthHeight(int width, int height) @@ -10254,7 +9797,7 @@ index e5e7970..391fab1 100644 return 0; } -@@ -1162,7 +1167,10 @@ int CDecoder::Decode(AVCodecContext *avctx, AVFrame *pFrame) +@@ -1161,7 +1166,10 @@ int CDecoder::Decode(AVCodecContext *avctx, AVFrame *pFrame) m_bufferStats.SetParams(diff, m_codecControl); } if (diff*1000/CurrentHostFrequency() > 50) @@ -10266,7 +9809,7 @@ index e5e7970..391fab1 100644 if (!retval) { -@@ -3000,7 +3008,9 @@ void COutput::Flush() +@@ -2996,7 +3004,9 @@ void COutput::Flush() it2 = m_bufferPool.glVideoSurfaceMap.find(pic->sourceIdx); if (it2 == m_bufferPool.glVideoSurfaceMap.end()) { @@ -10277,7 +9820,7 @@ index e5e7970..391fab1 100644 continue; } m_config.videoSurfaces->MarkRender(it2->second.sourceVuv); -@@ -3161,7 +3171,8 @@ bool COutput::ProcessSyncPicture() +@@ -3157,7 +3167,8 @@ bool COutput::ProcessSyncPicture() } else { @@ -10287,7 +9830,7 @@ index e5e7970..391fab1 100644 } } return busy; -@@ -3175,7 +3186,9 @@ void COutput::ProcessReturnPicture(CVdpauRenderPicture *pic) +@@ -3171,7 +3182,9 @@ void COutput::ProcessReturnPicture(CVdpauRenderPicture *pic) it = m_bufferPool.glVideoSurfaceMap.find(pic->sourceIdx); if (it == m_bufferPool.glVideoSurfaceMap.end()) { @@ -10298,7 +9841,7 @@ index e5e7970..391fab1 100644 return; } #ifdef GL_NV_vdpau_interop -@@ -3190,7 +3203,9 @@ void COutput::ProcessReturnPicture(CVdpauRenderPicture *pic) +@@ -3186,7 +3199,9 @@ void COutput::ProcessReturnPicture(CVdpauRenderPicture *pic) it = m_bufferPool.glOutputSurfaceMap.find(pic->sourceIdx); if (it == m_bufferPool.glOutputSurfaceMap.end()) { @@ -10309,7 +9852,7 @@ index e5e7970..391fab1 100644 return; } #ifdef GL_NV_vdpau_interop -@@ -3330,8 +3345,8 @@ void COutput::PreCleanup() +@@ -3326,8 +3341,8 @@ void COutput::PreCleanup() CheckStatus(vdp_st, __LINE__); m_bufferPool.outputSurfaces[i] = VDP_INVALID_HANDLE; @@ -10321,10 +9864,10 @@ index e5e7970..391fab1 100644 } -From 33a720fa45a6eeb286787a532418f559c98139eb Mon Sep 17 00:00:00 2001 +From a88d8f0c00c51d796dd853055250c727e2be9f57 Mon Sep 17 00:00:00 2001 From: fritsch Date: Tue, 11 Nov 2014 21:49:45 +0100 -Subject: [PATCH 89/97] IMX: Use Component Logging +Subject: [PATCH 84/92] IMX: Use Component Logging --- .../dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp | 64 ++++++++++++++-------- @@ -10462,10 +10005,10 @@ index adbb27e..e8ccc67 100644 // Release last buffer if(m_lastBuffer) -From 1027870d10afca43a8bc1f1b5d544af20282e206 Mon Sep 17 00:00:00 2001 +From 6a3eb895d2a83ce9682602268fd9eef11d9fac02 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 12 Nov 2014 16:52:15 +0000 -Subject: [PATCH 90/97] MMAL: Use Component Logging +Subject: [PATCH 85/92] MMAL: Use Component Logging --- xbmc/cores/dvdplayer/DVDCodecs/Video/MMALCodec.cpp | 175 +++++++++------------ @@ -10893,11 +10436,10 @@ index c9c3839..6742e0e 100644 return true; } - -From 2f0574a22d618a446f99f1a83be304e6d1acbfc3 Mon Sep 17 00:00:00 2001 +From 63c17d689572825c6f6dcc34dff2701e9f0fbada Mon Sep 17 00:00:00 2001 From: arnova Date: Wed, 12 Nov 2014 18:30:54 +0100 -Subject: [PATCH 93/97] changed: Have CurlFile return m_bufferSize as chunksize +Subject: [PATCH 86/92] changed: Have CurlFile return m_bufferSize as chunksize --- xbmc/filesystem/CurlFile.h | 1 + @@ -10916,10 +10458,10 @@ index 1cc7bc3..2e32367 100644 bool Post(const std::string& strURL, const std::string& strPostData, std::string& strHTML); bool Get(const std::string& strURL, std::string& strHTML); -From 281d0e40f5da011345c332807157f1d31c75ad38 Mon Sep 17 00:00:00 2001 +From 28b22302ff3127ff35e447cad6a022c91d6cd1a1 Mon Sep 17 00:00:00 2001 From: arnova Date: Tue, 11 Nov 2014 13:31:42 +0100 -Subject: [PATCH 94/97] fixed: FileCache-full logic was wrong + create seperate +Subject: [PATCH 87/92] fixed: FileCache-full logic was wrong + create seperate IsCacheFull() functions --- @@ -11129,10 +10671,10 @@ index 5574a5b..6325e9b 100644 virtual int ReadFromCache(char *pBuffer, size_t iMaxSize) ; virtual int64_t WaitForData(unsigned int iMinAvail, unsigned int iMillis) ; -From d37c21643852ef95ae4828819ce3c21427634ecb Mon Sep 17 00:00:00 2001 +From 98f65f812bcd2e6356d1bcdf9eb126e7d22d3687 Mon Sep 17 00:00:00 2001 From: arnova Date: Wed, 12 Nov 2014 19:26:29 +0100 -Subject: [PATCH 95/97] fixed: Don't keep reading source when cache is full +Subject: [PATCH 88/92] fixed: Don't keep reading source when cache is full (fixes #15500) --- @@ -11189,10 +10731,10 @@ index 4e95d77..96b8d79 100644 int iTotalWrite=0; while (!m_bStop && (iTotalWrite < iRead)) -From 4c8659bafe999f2f7b0a6506f09f5d6852650cb6 Mon Sep 17 00:00:00 2001 +From 72078b7fbc2ec35eb83782804b22b583866f92fa Mon Sep 17 00:00:00 2001 From: arnova Date: Wed, 12 Nov 2014 21:22:40 +0100 -Subject: [PATCH 96/97] changed: Show cachebytes from input in dvdplayer info +Subject: [PATCH 89/92] changed: Show cachebytes from input in dvdplayer info as it's more intuitive --- @@ -11200,7 +10742,7 @@ Subject: [PATCH 96/97] changed: Show cachebytes from input in dvdplayer info 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp -index cf870ad..e6e2e11 100644 +index 23698c8..7b5298a 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp @@ -2880,7 +2880,7 @@ void CDVDPlayer::GetGeneralInfo(std::string& strGeneralInfo) @@ -11222,3 +10764,152 @@ index cf870ad..e6e2e11 100644 if(m_playSpeed == 0 || m_caching == CACHESTATE_FULL) strBuf += StringUtils::Format(" %d sec", DVD_TIME_TO_SEC(m_State.cache_delay)); +From bc2e08ea21dba4b40ec5470f0471921053aaede4 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Sat, 15 Nov 2014 12:01:26 +0000 +Subject: [PATCH 90/92] squash: stills: avoid deferencing null packet + +--- + xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +index c22ea9f..af369c0 100644 +--- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp ++++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +@@ -387,7 +387,11 @@ void CDVDPlayerVideo::HandleDemuxerPacket(DemuxPacket* pPacket, bool bPacketDrop + + mFilters = m_pVideoCodec->SetFilters(mFilters); + +- int iDecoderState = m_pVideoCodec->Decode(pPacket->pData, pPacket->iSize, pPacket->dts, pPacket->pts); ++ int iDecoderState; ++ if (pPacket) ++ iDecoderState = m_pVideoCodec->Decode(pPacket->pData, pPacket->iSize, pPacket->dts, pPacket->pts); ++ else ++ iDecoderState = m_pVideoCodec->Decode(NULL, 0, DVD_NOPTS_VALUE, DVD_NOPTS_VALUE); + + // buffer packets so we can recover should decoder flush for some reason + if(m_pVideoCodec->GetConvergeCount() > 0) +@@ -398,7 +402,8 @@ void CDVDPlayerVideo::HandleDemuxerPacket(DemuxPacket* pPacket, bool bPacketDrop + m_packets.pop_front(); + } + +- m_videoStats.AddSampleBytes(pPacket->iSize); ++ if (pPacket) ++ m_videoStats.AddSampleBytes(pPacket->iSize); + + // reset the request, the following while loop may break before + // setting the flag to a new value + +From eb77209e08100babfff2f3436852b04c728888d2 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Sat, 15 Nov 2014 12:03:34 +0000 +Subject: [PATCH 91/92] [dvdplayer] Add lock for player creation + +--- + xbmc/cores/dvdplayer/DVDPlayer.cpp | 3 +++ + xbmc/cores/dvdplayer/DVDPlayer.h | 1 + + 2 files changed, 4 insertions(+) + +diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp +index 7b5298a..85a088b 100644 +--- a/xbmc/cores/dvdplayer/DVDPlayer.cpp ++++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp +@@ -549,6 +549,7 @@ void CSelectionStreams::Update(CDVDInputStream* input, CDVDDemux* demuxer, std:: + + void CDVDPlayer::CreatePlayers() + { ++ CSingleLock lock(m_players_lock); + #ifdef HAS_OMXPLAYER + if (m_omxplayer_mode && OMXPlayerUnsuitable(m_HasVideo, m_HasAudio, m_pDemuxer, m_pInputStream, m_SelectionStreams)) + { +@@ -578,6 +579,7 @@ void CDVDPlayer::CreatePlayers() + + void CDVDPlayer::DestroyPlayers() + { ++ CSingleLock lock(m_players_lock); + if (!m_players_created) + return; + delete m_dvdPlayerVideo; +@@ -4062,6 +4064,7 @@ double CDVDPlayer::GetQueueTime() + + void CDVDPlayer::GetVideoStreamInfo(SPlayerVideoStreamInfo &info) + { ++ CSingleLock lock(m_players_lock); + info.bitrate = m_dvdPlayerVideo->GetVideoBitrate(); + + std::string retVal; +diff --git a/xbmc/cores/dvdplayer/DVDPlayer.h b/xbmc/cores/dvdplayer/DVDPlayer.h +index ef64076..7ea6ea6 100644 +--- a/xbmc/cores/dvdplayer/DVDPlayer.h ++++ b/xbmc/cores/dvdplayer/DVDPlayer.h +@@ -554,4 +554,5 @@ class CDVDPlayer : public IPlayer, public CThread, public IDVDPlayer + // omxplayer variables + struct SOmxPlayerState m_OmxPlayerState; + bool m_omxplayer_mode; // using omxplayer acceleration ++ CCriticalSection m_players_lock; + }; + +From b40f2d0a50c2131b12a30f672e54eb3ea3659575 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Sat, 15 Nov 2014 17:14:58 +0000 +Subject: [PATCH 92/92] [omxplayer] Fix for out of sync after trickplay + +--- + xbmc/cores/dvdplayer/DVDPlayer.cpp | 36 ++++++++++++++++++------------------ + 1 file changed, 18 insertions(+), 18 deletions(-) + +diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp +index 85a088b..5938d34 100644 +--- a/xbmc/cores/dvdplayer/DVDPlayer.cpp ++++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp +@@ -2427,7 +2427,24 @@ void CDVDPlayer::HandleMessages() + } + + // do a seek after rewind, clock is not in sync with current pts +- if (m_playSpeed < 0 && speed >= 0) ++ if (m_omxplayer_mode) ++ { ++ // when switching from trickplay to normal, we may not have a full set of reference frames ++ // in decoder and we may get corrupt frames out. Seeking to current time will avoid this. ++ if ( (speed != DVD_PLAYSPEED_PAUSE && speed != DVD_PLAYSPEED_NORMAL) || ++ (m_playSpeed != DVD_PLAYSPEED_PAUSE && m_playSpeed != DVD_PLAYSPEED_NORMAL) ) ++ { ++ m_messenger.Put(new CDVDMsgPlayerSeek(GetTime(), (speed < 0), true, true, false, true)); ++ } ++ else ++ { ++ m_OmxPlayerState.av_clock.OMXPause(); ++ } ++ ++ m_OmxPlayerState.av_clock.OMXSetSpeed(speed); ++ CLog::Log(LOGDEBUG, "%s::%s CDVDMsg::PLAYER_SETSPEED speed : %d (%d)", "CDVDPlayer", __FUNCTION__, speed, m_playSpeed); ++ } ++ else if (m_playSpeed < 0 && speed >= 0) + { + int64_t iTime = (int64_t)DVD_TIME_TO_MSEC(m_clock.GetClock() + m_State.time_offset); + m_messenger.Put(new CDVDMsgPlayerSeek(iTime, true, true, false, false, true)); +@@ -2453,23 +2470,6 @@ void CDVDPlayer::HandleMessages() + if (!m_DemuxerPausePending) + m_pDemuxer->SetSpeed(speed); + } +- +- if (m_omxplayer_mode) +- { +- int old_speed = m_playSpeed; +- // when switching from trickplay to normal, we may not have a full set of reference frames +- // in decoder and we may get corrupt frames out. Seeking to current time will avoid this. +- if ( (speed != DVD_PLAYSPEED_PAUSE && speed != DVD_PLAYSPEED_NORMAL) || +- (old_speed != DVD_PLAYSPEED_PAUSE && old_speed != DVD_PLAYSPEED_NORMAL) ) +- { +- m_messenger.Put(new CDVDMsgPlayerSeek(GetTime(), (speed < 0), true, true, false, true)); +- } +- else +- m_OmxPlayerState.av_clock.OMXPause(); +- +- m_OmxPlayerState.av_clock.OMXSetSpeed(speed); +- CLog::Log(LOGDEBUG, "%s::%s CDVDMsg::PLAYER_SETSPEED speed : %d (%d)", "CDVDPlayer", __FUNCTION__, speed, old_speed); +- } + } + else if (pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_SELECT_NUMBER) && m_messenger.GetPacketCount(CDVDMsg::PLAYER_CHANNEL_SELECT_NUMBER) == 0) + {