Repository: xbmc/xbmc
File: xbmc/cores/VideoPlayer/VideoRenderers/BaseRenderer.h (C/C++)

Code before:
  // Feature support
  virtual bool SupportsMultiPassRendering() = 0;
  virtual bool Supports(ERENDERFEATURE feature) { return false; };
  virtual bool Supports(ESCALINGMETHOD method) = 0;

  virtual bool WantsDoublePass() { return false; };

  void SetViewMode(int viewMode);

  /*! \brief Get video rectangle and view window
  \param source is original size of the video
  \param dest is the target rendering area honoring aspect ratio of source
  \param view is the entire target rendering area for the video (including black bars)
  */
  void GetVideoRect(CRect &source, CRect &dest, CRect &view);
  float GetAspectRatio() const;

  static void SettingOptionsRenderMethodsFiller(const std::shared_ptr<const CSetting>& setting,
                                                std::vector<IntegerSettingOption>& list,
                                                int& current,
                                                void* data);

  void SetVideoSettings(const CVideoSettings &settings);

  // Get debug info from render buffer
  virtual void GetDebugInfo(int idx,
                            std::string& format,
                            std::string& meta_prim,
                            std::string& meta_light,
                            std::string& shader){};

protected:
  void CalcNormalRenderRect(float offsetX, float offsetY, float width, float height,
                            float inputFrameRatio, float zoomAmount, float verticalShift);
  void CalculateFrameAspectRatio(unsigned int desired_width, unsigned int desired_height);
  virtual void ManageRenderArea();
  virtual void ReorderDrawPoints();
  virtual EShaderFormat GetShaderFormat();
  void MarkDirty();

  //@todo drop those
  void saveRotatedCoords();//saves the current state of m_rotatedDestCoords
  void syncDestRectToRotatedPoints();//sync any changes of m_destRect to m_rotatedDestCoords
  void restoreRotatedCoords();//restore the current state of m_rotatedDestCoords from saveRotatedCoords

  unsigned int m_sourceWidth = 720;
  unsigned int m_sourceHeight = 480;
  float m_sourceFrameRatio = 1.0f;
  float m_fps = 0.0f;

  unsigned int m_renderOrientation = 0; // orientation of the video in degrees counter clockwise

Review comment (suggestion):
I think a returning defined struct of `std::string` would be better suited here and more future proof.

Code after:

  // Feature support
  virtual bool SupportsMultiPassRendering() = 0;
  virtual bool Supports(ERENDERFEATURE feature) { return false; };
  virtual bool Supports(ESCALINGMETHOD method) = 0;

  virtual bool WantsDoublePass() { return false; };

  void SetViewMode(int viewMode);

  /*! \brief Get video rectangle and view window
  \param source is original size of the video
  \param dest is the target rendering area honoring aspect ratio of source
  \param view is the entire target rendering area for the video (including black bars)
  */
  void GetVideoRect(CRect &source, CRect &dest, CRect &view);
  float GetAspectRatio() const;

  static void SettingOptionsRenderMethodsFiller(const std::shared_ptr<const CSetting>& setting,
                                                std::vector<IntegerSettingOption>& list,
                                                int& current,
                                                void* data);

  void SetVideoSettings(const CVideoSettings &settings);

  // Gets debug info from render buffer
  virtual DEBUG_INFO_VIDEO GetDebugInfo(int idx) { return {}; };

protected:
  void CalcNormalRenderRect(float offsetX, float offsetY, float width, float height,
                            float inputFrameRatio, float zoomAmount, float verticalShift);
  void CalculateFrameAspectRatio(unsigned int desired_width, unsigned int desired_height);
  virtual void ManageRenderArea();
  virtual void ReorderDrawPoints();
  virtual EShaderFormat GetShaderFormat();
  void MarkDirty();

  //@todo drop those
  void saveRotatedCoords();//saves the current state of m_rotatedDestCoords
  void syncDestRectToRotatedPoints();//sync any changes of m_destRect to m_rotatedDestCoords
  void restoreRotatedCoords();//restore the current state of m_rotatedDestCoords from saveRotatedCoords

  unsigned int m_sourceWidth = 720;
  unsigned int m_sourceHeight = 480;
  float m_sourceFrameRatio = 1.0f;
  float m_fps = 0.0f;

  unsigned int m_renderOrientation = 0; // orientation of the video in degrees counter clockwise
  // for drawing the texture with glVertex4f (holds all 4 corner points of the destination rect
  // with correct orientation based on m_renderOrientation
  // 0 - top left, 1 - top right, 2 - bottom right, 3 - bottom left