diff options
author | CastagnaIT <gottardo.stefano.83@gmail.com> | 2022-03-11 15:29:01 +0100 |
---|---|---|
committer | CastagnaIT <gottardo.stefano.83@gmail.com> | 2022-03-11 15:29:01 +0100 |
commit | 88cd43b46bff6fdc607873e51c1fe96b3c0a57ac (patch) | |
tree | b91e0b18e55b00d28af1bed3518744b7dce7f5f0 | |
parent | fca7647d36264829d1784784c677b618cb55c8d7 (diff) |
[python] Add HDR type support to VideoStreamDetail
-rw-r--r-- | xbmc/interfaces/legacy/InfoTagVideo.cpp | 7 | ||||
-rw-r--r-- | xbmc/interfaces/legacy/InfoTagVideo.h | 46 |
2 files changed, 48 insertions, 5 deletions
diff --git a/xbmc/interfaces/legacy/InfoTagVideo.cpp b/xbmc/interfaces/legacy/InfoTagVideo.cpp index 8be90f153f..8bc5fd1264 100644 --- a/xbmc/interfaces/legacy/InfoTagVideo.cpp +++ b/xbmc/interfaces/legacy/InfoTagVideo.cpp @@ -51,14 +51,16 @@ namespace XBMCAddon int duration /* = 0 */, const String& codec /* = emptyString */, const String& stereoMode /* = emptyString */, - const String& language /* = emptyString */) + const String& language /* = emptyString */, + const String& hdrType /* = emptyString */) : m_width(width), m_height(height), m_aspect(aspect), m_duration(duration), m_codec(codec), m_stereoMode(stereoMode), - m_language(language) + m_language(language), + m_hdrType(hdrType) { } @@ -72,6 +74,7 @@ namespace XBMCAddon streamDetail->m_strCodec = m_codec; streamDetail->m_strStereoMode = m_stereoMode; streamDetail->m_strLanguage = m_language; + streamDetail->m_strHdrType = m_hdrType; return streamDetail; } diff --git a/xbmc/interfaces/legacy/InfoTagVideo.h b/xbmc/interfaces/legacy/InfoTagVideo.h index f5f79d63b5..b3f78a67a7 100644 --- a/xbmc/interfaces/legacy/InfoTagVideo.h +++ b/xbmc/interfaces/legacy/InfoTagVideo.h @@ -225,7 +225,7 @@ namespace XBMCAddon /// @{ /// @brief **Video stream details class used in combination with InfoTagVideo.** /// - /// \python_class{ xbmc.VideoStreamDetail([width, height, aspect, duration, codec, stereoMode, language]) } + /// \python_class{ xbmc.VideoStreamDetail([width, height, aspect, duration, codec, stereoMode, language, hdrType]) } /// /// Represents a single selectable video stream for a video item wrapped by InfoTagVideo. /// @@ -247,7 +247,7 @@ namespace XBMCAddon #ifdef DOXYGEN_SHOULD_USE_THIS /// /// \ingroup python_xbmc_videostreamdetail VideoStreamDetail - /// @brief \python_func{ xbmc.VideoStreamDetail([width, height, aspect, duration, codec, stereoMode, language]) } + /// @brief \python_func{ xbmc.VideoStreamDetail([width, height, aspect, duration, codec, stereoMode, language, hdrType]) } /// Creates a single video stream details class for a video item wrapped by InfoTagVideo. /// /// @param width [opt] integer - Width of the video stream in pixel. @@ -257,6 +257,9 @@ namespace XBMCAddon /// @param codec [opt] string - Codec of the video stream. /// @param stereoMode [opt] string - Stereo mode of the video stream. /// @param language [opt] string - Language of the video stream. + /// @param hdrType [opt] string - HDR type of the video stream. + /// The following types are supported: + /// dolbyvision, hdr10, hlg /// /// ///----------------------------------------------------------------------- @@ -277,7 +280,8 @@ namespace XBMCAddon int duration = 0, const String& codec = emptyString, const String& stereoMode = emptyString, - const String& language = emptyString); + const String& language = emptyString, + const String& hdrType = emptyString); #endif #ifdef DOXYGEN_SHOULD_USE_THIS @@ -402,6 +406,23 @@ namespace XBMCAddon #ifdef DOXYGEN_SHOULD_USE_THIS /// /// \ingroup python_xbmc_videostreamdetail + /// @brief \python_func{ getHDRType() } + /// Get the HDR type of the stream. + /// + /// @return [string] HDR type of the stream + /// + /// + ///----------------------------------------------------------------------- + /// @python_v20 New function added. + /// + getHDRType(); +#else + String getHDRType() const { return m_hdrType; } +#endif + +#ifdef DOXYGEN_SHOULD_USE_THIS + /// + /// \ingroup python_xbmc_videostreamdetail /// @brief \python_func{ setWidth(width) } /// Set the width of the video stream in pixel. /// @@ -518,6 +539,24 @@ namespace XBMCAddon void setLanguage(const String& language) { m_language = language; } #endif +#ifdef DOXYGEN_SHOULD_USE_THIS + /// + /// \ingroup python_xbmc_videostreamdetail + /// @brief \python_func{ setHDRType(hdrtype) } + /// Set the HDR type of the stream. + /// + /// @param hdrType string - HDR type of the stream. + /// The following types are supported: + /// dolbyvision, hdr10, hlg + /// + ///----------------------------------------------------------------------- + /// @python_v20 New function added. + /// + setHDRType(...); +#else + void setHDRType(const String& hdrType) { m_hdrType = hdrType; } +#endif + #ifndef SWIG CStreamDetailVideo* ToStreamDetailVideo() const; #endif @@ -530,6 +569,7 @@ namespace XBMCAddon String m_codec; String m_stereoMode; String m_language; + String m_hdrType; }; /// |