/xbmc/settings/VideoSettings.cpp

http://github.com/xbmc/xbmc · C++ · 88 lines · 58 code · 5 blank · 25 comment · 50 complexity · abbe4527f55ccc72632af9624619d780 MD5 · raw file

  1. /*
  2. * Copyright (C) 2005-2013 Team XBMC
  3. * http://xbmc.org
  4. *
  5. * This Program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2, or (at your option)
  8. * any later version.
  9. *
  10. * This Program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with XBMC; see the file COPYING. If not, see
  17. * <http://www.gnu.org/licenses/>.
  18. *
  19. */
  20. // VideoSettings.cpp: implementation of the CVideoSettings class.
  21. //
  22. //////////////////////////////////////////////////////////////////////
  23. #include "VideoSettings.h"
  24. //////////////////////////////////////////////////////////////////////
  25. // Construction/Destruction
  26. //////////////////////////////////////////////////////////////////////
  27. CVideoSettings::CVideoSettings()
  28. {
  29. m_InterlaceMethod = VS_INTERLACEMETHOD_AUTO;
  30. m_ScalingMethod = VS_SCALINGMETHOD_LINEAR;
  31. m_ViewMode = ViewModeNormal;
  32. m_CustomZoomAmount = 1.0f;
  33. m_CustomPixelRatio = 1.0f;
  34. m_CustomVerticalShift = 0.0f;
  35. m_CustomNonLinStretch = false;
  36. m_AudioStream = -1;
  37. m_SubtitleStream = -1;
  38. m_SubtitleDelay = 0.0f;
  39. m_SubtitleOn = true;
  40. m_SubtitleCached = false;
  41. m_Brightness = 50.0f;
  42. m_Contrast = 50.0f;
  43. m_Gamma = 20.0f;
  44. m_Sharpness = 0.0f;
  45. m_NoiseReduction = 0;
  46. m_PostProcess = false;
  47. m_VolumeAmplification = 0;
  48. m_AudioDelay = 0.0f;
  49. m_OutputToAllSpeakers = false;
  50. m_ResumeTime = 0;
  51. m_StereoMode = 0;
  52. m_StereoInvert = false;
  53. m_VideoStream = -1;
  54. }
  55. bool CVideoSettings::operator!=(const CVideoSettings &right) const
  56. {
  57. if (m_InterlaceMethod != right.m_InterlaceMethod) return true;
  58. if (m_ScalingMethod != right.m_ScalingMethod) return true;
  59. if (m_ViewMode != right.m_ViewMode) return true;
  60. if (m_CustomZoomAmount != right.m_CustomZoomAmount) return true;
  61. if (m_CustomPixelRatio != right.m_CustomPixelRatio) return true;
  62. if (m_CustomVerticalShift != right.m_CustomVerticalShift) return true;
  63. if (m_CustomNonLinStretch != right.m_CustomNonLinStretch) return true;
  64. if (m_AudioStream != right.m_AudioStream) return true;
  65. if (m_SubtitleStream != right.m_SubtitleStream) return true;
  66. if (m_SubtitleDelay != right.m_SubtitleDelay) return true;
  67. if (m_SubtitleOn != right.m_SubtitleOn) return true;
  68. if (m_SubtitleCached != right.m_SubtitleCached) return true;
  69. if (m_Brightness != right.m_Brightness) return true;
  70. if (m_Contrast != right.m_Contrast) return true;
  71. if (m_Gamma != right.m_Gamma) return true;
  72. if (m_Sharpness != right.m_Sharpness) return true;
  73. if (m_NoiseReduction != right.m_NoiseReduction) return true;
  74. if (m_PostProcess != right.m_PostProcess) return true;
  75. if (m_VolumeAmplification != right.m_VolumeAmplification) return true;
  76. if (m_AudioDelay != right.m_AudioDelay) return true;
  77. if (m_OutputToAllSpeakers != right.m_OutputToAllSpeakers) return true;
  78. if (m_ResumeTime != right.m_ResumeTime) return true;
  79. if (m_StereoMode != right.m_StereoMode) return true;
  80. if (m_StereoInvert != right.m_StereoInvert) return true;
  81. if (m_VideoStream != right.m_VideoStream) return true;
  82. return false;
  83. }