diff options
-rw-r--r-- | addons/skin.estouchy/xml/DialogPlayerProcessInfo.xml | 2 | ||||
-rw-r--r-- | addons/skin.estuary/xml/DialogPlayerProcessInfo.xml | 2 | ||||
-rw-r--r-- | xbmc/GUIInfoManager.cpp | 36 | ||||
-rw-r--r-- | xbmc/cores/DataCacheCore.cpp | 12 | ||||
-rw-r--r-- | xbmc/cores/DataCacheCore.h | 13 | ||||
-rw-r--r-- | xbmc/cores/VideoPlayer/Process/ProcessInfo.cpp | 3 | ||||
-rw-r--r-- | xbmc/guilib/guiinfo/GUIInfoLabels.h | 1 | ||||
-rw-r--r-- | xbmc/guilib/guiinfo/PlayerGUIInfo.cpp | 3 |
8 files changed, 55 insertions, 17 deletions
diff --git a/addons/skin.estouchy/xml/DialogPlayerProcessInfo.xml b/addons/skin.estouchy/xml/DialogPlayerProcessInfo.xml index 71f5efe9f4..a184553330 100644 --- a/addons/skin.estouchy/xml/DialogPlayerProcessInfo.xml +++ b/addons/skin.estouchy/xml/DialogPlayerProcessInfo.xml @@ -240,7 +240,7 @@ <width>1000</width> <height>30</height> <aligny>bottom</aligny> - <label>$INFO[Player.Process(videowidth),[COLOR blue]$LOCALIZE[38031]:[/COLOR] ,x]$INFO[Player.Process(videoheight),, px]$INFO[Player.Process(videodar),$COMMA , AR]$INFO[Player.Process(videofps),$COMMA , FPS]</label> + <label>$INFO[Player.Process(videowidth),[COLOR blue]$LOCALIZE[38031]:[/COLOR] ,x]$INFO[Player.Process(videoheight)]$INFO[Player.Process(videoscantype)]$INFO[Player.Process(videodar),$COMMA , AR]$INFO[Player.Process(videofps),$COMMA , FPS]</label> <font>font25</font> <shadowcolor>black</shadowcolor> <visible>Player.HasVideo</visible> diff --git a/addons/skin.estuary/xml/DialogPlayerProcessInfo.xml b/addons/skin.estuary/xml/DialogPlayerProcessInfo.xml index 0b6415596b..15095dc4b3 100644 --- a/addons/skin.estuary/xml/DialogPlayerProcessInfo.xml +++ b/addons/skin.estuary/xml/DialogPlayerProcessInfo.xml @@ -237,7 +237,7 @@ <width>1600</width> <height>50</height> <aligny>bottom</aligny> - <label>$INFO[Player.Process(videowidth),[COLOR button_focus]$LOCALIZE[38031]:[/COLOR] ,x]$INFO[Player.Process(videoheight),, px]$INFO[Player.Process(videodar),$COMMA , AR]$INFO[Player.Process(videofps),$COMMA , FPS]</label> + <label>$INFO[Player.Process(videowidth),[COLOR button_focus]$LOCALIZE[38031]:[/COLOR] ,x]$INFO[Player.Process(videoheight)]$INFO[Player.Process(videoscantype)]$INFO[Player.Process(videodar),$COMMA , AR]$INFO[Player.Process(videofps),$COMMA , FPS]</label> <font>font14</font> <shadowcolor>black</shadowcolor> <visible>Player.HasVideo</visible> diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp index a1f594ddf2..cf0cfce9d9 100644 --- a/xbmc/GUIInfoManager.cpp +++ b/xbmc/GUIInfoManager.cpp @@ -971,6 +971,14 @@ const infomap player_times[] = {{ "seektime", PLAYER_SEEKTIME }, /// @skinning_v17 **[New Infolabel]** \link Player_Process_videoheight `Player.Process(videoheight)`\endlink /// <p> /// } +/// \table_row3{ <b>`Player.Process(videoscantype)`</b>, +/// \anchor Player_Process_videoscantype +/// _string_, +/// @return The scan type identifier of the currently playing video **p** (for progressive) or **i** (for interlaced). +/// <p><hr> +/// @skinning_v20 **[New Infolabel]** \link Player_Process_videoscantype `Player.Process(videoscantype)`\endlink +/// <p> +/// } /// \table_row3{ <b>`Player.Process(videofps)`</b>, /// \anchor Player_Process_videofps /// _string_, @@ -1023,21 +1031,19 @@ const infomap player_times[] = {{ "seektime", PLAYER_SEEKTIME }, /// /// ----------------------------------------------------------------------------- -const infomap player_process[] = -{ - { "videodecoder", PLAYER_PROCESS_VIDEODECODER }, - { "deintmethod", PLAYER_PROCESS_DEINTMETHOD }, - { "pixformat", PLAYER_PROCESS_PIXELFORMAT }, - { "videowidth", PLAYER_PROCESS_VIDEOWIDTH }, - { "videoheight", PLAYER_PROCESS_VIDEOHEIGHT }, - { "videofps", PLAYER_PROCESS_VIDEOFPS }, - { "videodar", PLAYER_PROCESS_VIDEODAR }, - { "videohwdecoder", PLAYER_PROCESS_VIDEOHWDECODER }, - { "audiodecoder", PLAYER_PROCESS_AUDIODECODER }, - { "audiochannels", PLAYER_PROCESS_AUDIOCHANNELS }, - { "audiosamplerate", PLAYER_PROCESS_AUDIOSAMPLERATE }, - { "audiobitspersample", PLAYER_PROCESS_AUDIOBITSPERSAMPLE } -}; +const infomap player_process[] = {{"videodecoder", PLAYER_PROCESS_VIDEODECODER}, + {"deintmethod", PLAYER_PROCESS_DEINTMETHOD}, + {"pixformat", PLAYER_PROCESS_PIXELFORMAT}, + {"videowidth", PLAYER_PROCESS_VIDEOWIDTH}, + {"videoheight", PLAYER_PROCESS_VIDEOHEIGHT}, + {"videofps", PLAYER_PROCESS_VIDEOFPS}, + {"videodar", PLAYER_PROCESS_VIDEODAR}, + {"videohwdecoder", PLAYER_PROCESS_VIDEOHWDECODER}, + {"audiodecoder", PLAYER_PROCESS_AUDIODECODER}, + {"audiochannels", PLAYER_PROCESS_AUDIOCHANNELS}, + {"audiosamplerate", PLAYER_PROCESS_AUDIOSAMPLERATE}, + {"audiobitspersample", PLAYER_PROCESS_AUDIOBITSPERSAMPLE}, + {"videoscantype", PLAYER_PROCESS_VIDEOSCANTYPE}}; /// \page modules__infolabels_boolean_conditions /// \subsection modules__infolabels_boolean_conditions_Weather Weather diff --git a/xbmc/cores/DataCacheCore.cpp b/xbmc/cores/DataCacheCore.cpp index f056840e5e..aa50248a70 100644 --- a/xbmc/cores/DataCacheCore.cpp +++ b/xbmc/cores/DataCacheCore.cpp @@ -188,6 +188,18 @@ float CDataCacheCore::GetVideoDAR() return m_playerVideoInfo.dar; } +void CDataCacheCore::SetVideoInterlaced(bool isInterlaced) +{ + CSingleLock lock(m_videoPlayerSection); + m_playerVideoInfo.m_isInterlaced = isInterlaced; +} + +bool CDataCacheCore::IsVideoInterlaced() +{ + CSingleLock lock(m_videoPlayerSection); + return m_playerVideoInfo.m_isInterlaced; +} + // player audio info void CDataCacheCore::SetAudioDecoderName(std::string name) { diff --git a/xbmc/cores/DataCacheCore.h b/xbmc/cores/DataCacheCore.h index 592e4109d1..1b656da23c 100644 --- a/xbmc/cores/DataCacheCore.h +++ b/xbmc/cores/DataCacheCore.h @@ -46,6 +46,18 @@ public: void SetVideoDAR(float dar); float GetVideoDAR(); + /*! + * @brief Set if the video is interlaced in cache. + * @param isInterlaced Set true when the video is interlaced + */ + void SetVideoInterlaced(bool isInterlaced); + + /*! + * @brief Check if the video is interlaced from cache + * @return True if interlaced, otherwise false + */ + bool IsVideoInterlaced(); + // player audio info void SetAudioDecoderName(std::string name); std::string GetAudioDecoderName(); @@ -154,6 +166,7 @@ protected: int height; float fps; float dar; + bool m_isInterlaced; } m_playerVideoInfo; CCriticalSection m_audioPlayerSection; diff --git a/xbmc/cores/VideoPlayer/Process/ProcessInfo.cpp b/xbmc/cores/VideoPlayer/Process/ProcessInfo.cpp index 60e6b78bb9..9390075b13 100644 --- a/xbmc/cores/VideoPlayer/Process/ProcessInfo.cpp +++ b/xbmc/cores/VideoPlayer/Process/ProcessInfo.cpp @@ -224,6 +224,9 @@ void CProcessInfo::SetVideoInterlaced(bool interlaced) CSingleLock lock(m_videoCodecSection); m_videoIsInterlaced = interlaced; + + if (m_dataCache) + m_dataCache->SetVideoInterlaced(interlaced); } bool CProcessInfo::GetVideoInterlaced() diff --git a/xbmc/guilib/guiinfo/GUIInfoLabels.h b/xbmc/guilib/guiinfo/GUIInfoLabels.h index 2fe52a02f4..bf1fb59454 100644 --- a/xbmc/guilib/guiinfo/GUIInfoLabels.h +++ b/xbmc/guilib/guiinfo/GUIInfoLabels.h @@ -713,6 +713,7 @@ #define PLAYER_PROCESS_AUDIOCHANNELS (PLAYER_PROCESS + 9) #define PLAYER_PROCESS_AUDIOSAMPLERATE (PLAYER_PROCESS + 10) #define PLAYER_PROCESS_AUDIOBITSPERSAMPLE (PLAYER_PROCESS + 11) +#define PLAYER_PROCESS_VIDEOSCANTYPE (PLAYER_PROCESS + 12) #define WINDOW_PROPERTY 9993 #define WINDOW_IS_VISIBLE 9995 diff --git a/xbmc/guilib/guiinfo/PlayerGUIInfo.cpp b/xbmc/guilib/guiinfo/PlayerGUIInfo.cpp index 4a4f992858..970588d100 100644 --- a/xbmc/guilib/guiinfo/PlayerGUIInfo.cpp +++ b/xbmc/guilib/guiinfo/PlayerGUIInfo.cpp @@ -332,6 +332,9 @@ bool CPlayerGUIInfo::GetLabel(std::string& value, const CFileItem *item, int con case PLAYER_PROCESS_VIDEOHEIGHT: value = StringUtils::FormatNumber(CServiceBroker::GetDataCacheCore().GetVideoHeight()); return true; + case PLAYER_PROCESS_VIDEOSCANTYPE: + value = CServiceBroker::GetDataCacheCore().IsVideoInterlaced() ? "i" : "p"; + return true; case PLAYER_PROCESS_AUDIODECODER: value = CServiceBroker::GetDataCacheCore().GetAudioDecoderName(); return true; |