Skip to content

Commit

Permalink
[3d] Make MVC a valid 3D filename tag
Browse files Browse the repository at this point in the history
  • Loading branch information
popcornmix committed Sep 16, 2015
1 parent 006c744 commit 7237707
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions xbmc/guilib/StereoscopicsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,15 @@ std::string CStereoscopicsManager::DetectStereoModeByString(const std::string &n
if (re.RegFind(searchString) > -1)
stereoMode = "top_bottom";

if (!re.RegComp(g_advancedSettings.m_stereoscopicregex_mvc.c_str()))
{
CLog::Log(LOGERROR, "%s: Invalid RegExp for matching 3d MVC content:'%s'", __FUNCTION__, g_advancedSettings.m_stereoscopicregex_mvc.c_str());
return stereoMode;
}

if (re.RegFind(searchString) > -1)
stereoMode = "left_right";

return stereoMode;
}

Expand Down
2 changes: 2 additions & 0 deletions xbmc/settings/AdvancedSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ void CAdvancedSettings::Initialize()
m_stereoscopicregex_3d = "[-. _]3d[-. _]";
m_stereoscopicregex_sbs = "[-. _]h?sbs[-. _]";
m_stereoscopicregex_tab = "[-. _]h?tab[-. _]";
m_stereoscopicregex_mvc = "[-. _]h?mvc[-. _]";

This comment has been minimized.

Copy link
@da-anda

da-anda Sep 17, 2015

how can something be "half MVC" because of the "h?" in the regex

This comment has been minimized.

Copy link
@popcornmix

popcornmix Sep 17, 2015

Author Owner

Yep. Will remove the h?


m_videoAssFixedWorks = false;

Expand Down Expand Up @@ -543,6 +544,7 @@ void CAdvancedSettings::ParseSettingsFile(const std::string &file)
XMLUtils::GetString(pElement, "stereoscopicregex3d", m_stereoscopicregex_3d);
XMLUtils::GetString(pElement, "stereoscopicregexsbs", m_stereoscopicregex_sbs);
XMLUtils::GetString(pElement, "stereoscopicregextab", m_stereoscopicregex_tab);
XMLUtils::GetString(pElement, "stereoscopicregexmvc", m_stereoscopicregex_mvc);
XMLUtils::GetFloat(pElement, "subsdelayrange", m_videoSubsDelayRange, 10, 600);
XMLUtils::GetFloat(pElement, "audiodelayrange", m_videoAudioDelayRange, 10, 600);
XMLUtils::GetInt(pElement, "blackbarcolour", m_videoBlackBarColour, 0, 255);
Expand Down
1 change: 1 addition & 0 deletions xbmc/settings/AdvancedSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler
std::string m_stereoscopicregex_3d;
std::string m_stereoscopicregex_sbs;
std::string m_stereoscopicregex_tab;
std::string m_stereoscopicregex_mvc;

/*!< @brief position behavior of ass subtitiles when setting "subtitle position on screen" set to "fixed"
True to show at the fixed position set in video calibration
Expand Down

0 comments on commit 7237707

Please sign in to comment.