Title: [210974] trunk/Source/ThirdParty/libwebrtc
Revision
210974
Author
[email protected]
Date
2017-01-20 11:41:55 -0800 (Fri, 20 Jan 2017)

Log Message

[WebRTC] libwebrtc H.264 codec is using VTB only for IOS
https://bugs.webkit.org/show_bug.cgi?id=167245

Patch by Youenn Fablet <[email protected]> on 2017-01-20
Reviewed by Alex Christensen.

* Source/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.cc: Removing WEBRTC_IOS flag.

Modified Paths

Diff

Modified: trunk/Source/ThirdParty/libwebrtc/ChangeLog (210973 => 210974)


--- trunk/Source/ThirdParty/libwebrtc/ChangeLog	2017-01-20 18:43:44 UTC (rev 210973)
+++ trunk/Source/ThirdParty/libwebrtc/ChangeLog	2017-01-20 19:41:55 UTC (rev 210974)
@@ -1,3 +1,12 @@
+2017-01-20  Youenn Fablet  <[email protected]>
+
+        [WebRTC] libwebrtc H.264 codec is using VTB only for IOS
+        https://bugs.webkit.org/show_bug.cgi?id=167245
+
+        Reviewed by Alex Christensen.
+
+        * Source/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.cc: Removing WEBRTC_IOS flag.
+
 2017-01-19  Youenn Fablet  <[email protected]>
 
         [WebRTC] Upload libwebrtc code base

Modified: trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.cc (210973 => 210974)


--- trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.cc	2017-01-20 18:43:44 UTC (rev 210973)
+++ trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/videotoolboxvideocodecfactory.cc	2017-01-20 19:41:55 UTC (rev 210974)
@@ -12,10 +12,8 @@
 #include "webrtc/base/logging.h"
 #include "webrtc/common_video/h264/profile_level_id.h"
 #include "webrtc/media/base/codec.h"
-#if defined(WEBRTC_IOS)
 #include "webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.h"
 #include "webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_decoder.h"
-#endif
 
 // TODO(kthelgason): delete this when CreateVideoDecoder takes
 // a cricket::VideoCodec instead of webrtc::VideoCodecType.
@@ -38,7 +36,6 @@
 
 VideoToolboxVideoEncoderFactory::VideoToolboxVideoEncoderFactory() {
 // Hardware H264 encoding only supported on iOS for now.
-#if defined(WEBRTC_IOS)
   // TODO(magjed): Push Constrained High profile as well when negotiation is
   // ready, http://crbug/webrtc/6337.
   cricket::VideoCodec constrained_baseline(cricket::kH264CodecName);
@@ -52,7 +49,6 @@
   constrained_baseline.SetParam(cricket::kH264FmtpLevelAsymmetryAllowed, "1");
   constrained_baseline.SetParam(cricket::kH264FmtpPacketizationMode, "1");
   supported_codecs_.push_back(constrained_baseline);
-#endif
 }
 
 VideoToolboxVideoEncoderFactory::~VideoToolboxVideoEncoderFactory() {}
@@ -59,12 +55,10 @@
 
 VideoEncoder* VideoToolboxVideoEncoderFactory::CreateVideoEncoder(
     const cricket::VideoCodec& codec) {
-#if defined(WEBRTC_IOS)
   if (FindMatchingCodec(supported_codecs_, codec)) {
     LOG(LS_INFO) << "Creating HW encoder for " << codec.name;
     return new H264VideoToolboxEncoder(codec);
   }
-#endif
   LOG(LS_INFO) << "No HW encoder found for codec " << codec.name;
   return nullptr;
 }
@@ -71,10 +65,8 @@
 
 void VideoToolboxVideoEncoderFactory::DestroyVideoEncoder(
     VideoEncoder* encoder) {
-#if defined(WEBRTC_IOS)
   delete encoder;
   encoder = nullptr;
-#endif
 }
 
 const std::vector<cricket::VideoCodec>&
@@ -85,9 +77,7 @@
 // VideoToolboxVideoDecoderFactory
 
 VideoToolboxVideoDecoderFactory::VideoToolboxVideoDecoderFactory() {
-#if defined(WEBRTC_IOS)
   supported_codecs_.push_back(cricket::VideoCodec("H264"));
-#endif
 }
 
 VideoToolboxVideoDecoderFactory::~VideoToolboxVideoDecoderFactory() {}
@@ -95,12 +85,10 @@
 VideoDecoder* VideoToolboxVideoDecoderFactory::CreateVideoDecoder(
     VideoCodecType type) {
   const auto codec = cricket::VideoCodec(NameFromCodecType(type));
-#if defined(WEBRTC_IOS)
   if (FindMatchingCodec(supported_codecs_, codec)) {
     LOG(LS_INFO) << "Creating HW decoder for " << codec.name;
     return new H264VideoToolboxDecoder();
   }
-#endif
   LOG(LS_INFO) << "No HW decoder found for codec " << codec.name;
   return nullptr;
 }
@@ -107,10 +95,8 @@
 
 void VideoToolboxVideoDecoderFactory::DestroyVideoDecoder(
     VideoDecoder* decoder) {
-#if defined(WEBRTC_IOS)
   delete decoder;
   decoder = nullptr;
-#endif
 }
 
 }  // namespace webrtc
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to