Index: webrtc/modules/video_coding/codecs/h264/h264_objc.mm |
diff --git a/webrtc/modules/video_coding/utility/qp_parser.cc b/webrtc/modules/video_coding/codecs/h264/h264_objc.mm |
similarity index 50% |
copy from webrtc/modules/video_coding/utility/qp_parser.cc |
copy to webrtc/modules/video_coding/codecs/h264/h264_objc.mm |
index 0916cb009459f0ec716e3b1b0ba42558c43b2148..9a6582d2f02c9acde23d22efda5e9a18fe289dc8 100644 |
--- a/webrtc/modules/video_coding/utility/qp_parser.cc |
+++ b/webrtc/modules/video_coding/codecs/h264/h264_objc.mm |
@@ -6,23 +6,27 @@ |
* tree. An additional intellectual property rights grant can be found |
* in the file PATENTS. All contributing project authors may |
* be found in the AUTHORS file in the root of the source tree. |
+ * |
*/ |
-#include "webrtc/modules/video_coding/utility/qp_parser.h" |
+#include "webrtc/modules/video_coding/codecs/h264/include/h264.h" |
-#include "webrtc/common_types.h" |
-#include "webrtc/modules/video_coding/utility/vp8_header_parser.h" |
+#if defined(WEBRTC_IOS) |
+#import <UIKit/UIKit.h> |
+#endif |
namespace webrtc { |
-bool QpParser::GetQp(const VCMEncodedFrame& frame, int* qp) { |
- switch (frame.CodecSpecific()->codecType) { |
- case kVideoCodecVP8: |
- // QP range: [0, 127]. |
- return vp8::GetQp(frame.Buffer(), frame.Length(), qp); |
- default: |
- return false; |
- } |
+bool IsH264CodecSupportedObjC() { |
+#if defined(WEBRTC_VIDEO_TOOLBOX_SUPPORTED) && \ |
+ defined(WEBRTC_IOS) |
+ // Supported on iOS8+. |
+ return [[[UIDevice currentDevice] systemVersion] doubleValue] >= 8.0; |
+#else |
+ // TODO(tkchin): Support OS/X once we stop mixing libstdc++ and libc++ on |
+ // OSX 10.9. |
+ return false; |
+#endif |
} |
} // namespace webrtc |