First step towards supporting H264 on iOS. More tuning/experimentation required in future CLs. Tested using AppRTCDemo on iPhone6 + iPad Mini. Future work to get it working on OS/X, simulator (renders black screen currently) and with the Android AppRTCDemo. Currently protected with a compile time guard. BUG=4081 R=andrew@webrtc.org, haysc@webrtc.org, holmer@google.com, jiayl@webrtc.org, kjellander@webrtc.org, pbos@webrtc.org, phoglund@webrtc.org, stefan@webrtc.org Review URL: https://codereview.webrtc.org/1187573004. Cr-Commit-Position: refs/heads/master@{#9515}
34 lines
945 B
Plaintext
34 lines
945 B
Plaintext
/*
|
|
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* 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/codecs/h264/include/h264.h"
|
|
|
|
#if defined(WEBRTC_IOS)
|
|
#import <UIKit/UIKit.h>
|
|
#endif
|
|
|
|
namespace webrtc {
|
|
|
|
bool IsH264CodecSupportedObjC() {
|
|
#if defined(WEBRTC_OBJC_H264) && \
|
|
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
|