fixup!^2 [M130 Migration][WebRTC] Gamestreaming optimizations 03/324703/2
authorMichal Jurkiewicz <m.jurkiewicz@samsung.com>
Thu, 22 May 2025 11:14:46 +0000 (13:14 +0200)
committerBot Blink <blinkbot@samsung.com>
Sat, 24 May 2025 05:39:51 +0000 (05:39 +0000)
Apply change for H.265 GameStreaming to restore
logic of matching H.265 codecs by codec profile only.

Bug: https://jira-eu.sec.samsung.net/browse/VDWASM-2425
Change-Id: I0f091ba022bc1a1a7f81e93609f728a8280f1ab5
Signed-off-by: Michal Jurkiewicz <m.jurkiewicz@samsung.com>
third_party/webrtc/api/video_codecs/sdp_video_format.cc
third_party/webrtc/media/base/codec_comparators.cc

index 4156bde165a7918a4522d07eec9830d3db8447ef..6a62f647a5475c5c5cb018a9854921455e1540b9 100644 (file)
@@ -83,6 +83,7 @@ bool AV1IsSameLevelIdx(const CodecParameterMap& left,
 }
 
 #ifdef RTC_ENABLE_H265
+#if !defined(WEBRTC_TIZEN_TV) || !defined(WEBRTC_USE_HEVC)
 std::string GetH265TxModeOrDefault(const CodecParameterMap& params) {
   // If TxMode is not present, a value of "SRST" must be inferred.
   // https://tools.ietf.org/html/rfc7798@section-7.1
@@ -95,6 +96,7 @@ bool IsSameH265TxMode(const CodecParameterMap& left,
                                 GetH265TxModeOrDefault(right));
 }
 #endif
+#endif
 
 // Some (video) codecs are actually families of codecs and rely on parameters
 // to distinguish different incompatible family members.
@@ -119,10 +121,13 @@ bool IsSameCodecSpecific(const std::string& name1,
              AV1IsSameLevelIdx(params1, params2);
 #ifdef RTC_ENABLE_H265
     case kVideoCodecH265:
+#if defined(WEBRTC_TIZEN_TV) && defined(WEBRTC_USE_HEVC)
+      return H265IsSameProfile(params1, params2);
+#else
       return H265IsSameProfile(params1, params2) &&
              H265IsSameTier(params1, params2) &&
              IsSameH265TxMode(params1, params2);
-
+#endif
 #endif  // RTC_ENABLE_H265
     default:
       return true;
index bf26f17c63dd7bf74da31c467b7b424faf7586a8..70064e672ae29ad7113ade8c86227b0384834ece 100644 (file)
@@ -96,12 +96,14 @@ std::string GetH265TxModeOrDefault(const CodecParameterMap& params) {
   return GetFmtpParameterOrDefault(params, cricket::kH265FmtpTxMode, "SRST");
 }
 
+#if !defined(WEBRTC_TIZEN_TV) || !defined(WEBRTC_USE_HEVC)
 bool IsSameH265TxMode(const CodecParameterMap& left,
                       const CodecParameterMap& right) {
   return absl::EqualsIgnoreCase(GetH265TxModeOrDefault(left),
                                 GetH265TxModeOrDefault(right));
 }
 #endif
+#endif
 
 // Some (video) codecs are actually families of codecs and rely on parameters
 // to distinguish different incompatible family members.
@@ -125,9 +127,13 @@ bool IsSameCodecSpecific(const std::string& name1,
            AV1IsSameLevelIdx(params1, params2);
 #ifdef RTC_ENABLE_H265
   if (either_name_matches(cricket::kH265CodecName)) {
+#if defined(WEBRTC_TIZEN_TV) && defined(WEBRTC_USE_HEVC)
+    return H265IsSameProfile(params1, params2);
+#else
     return H265IsSameProfile(params1, params2) &&
            H265IsSameTier(params1, params2) &&
            IsSameH265TxMode(params1, params2);
+#endif
   }
 #endif
   return true;