iOS HW H264 support.
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}
This commit is contained in:
@ -14,6 +14,9 @@
|
||||
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/engine_configurations.h"
|
||||
#ifdef VIDEOCODEC_H264
|
||||
#include "webrtc/modules/video_coding/codecs/h264/include/h264.h"
|
||||
#endif
|
||||
#ifdef VIDEOCODEC_I420
|
||||
#include "webrtc/modules/video_coding/codecs/i420/main/interface/i420.h"
|
||||
#endif
|
||||
@ -660,11 +663,21 @@ VCMGenericEncoder* VCMCodecDataBase::CreateEncoder(
|
||||
case kVideoCodecI420:
|
||||
return new VCMGenericEncoder(new I420Encoder(), encoder_rate_observer_,
|
||||
false);
|
||||
#endif
|
||||
#ifdef VIDEOCODEC_H264
|
||||
case kVideoCodecH264:
|
||||
if (H264Encoder::IsSupported()) {
|
||||
return new VCMGenericEncoder(H264Encoder::Create(),
|
||||
encoder_rate_observer_,
|
||||
false);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
LOG(LS_WARNING) << "No internal encoder of this type exists.";
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
LOG(LS_WARNING) << "No internal encoder of this type exists.";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void VCMCodecDataBase::DeleteEncoder() {
|
||||
@ -690,11 +703,19 @@ VCMGenericDecoder* VCMCodecDataBase::CreateDecoder(VideoCodecType type) const {
|
||||
#ifdef VIDEOCODEC_I420
|
||||
case kVideoCodecI420:
|
||||
return new VCMGenericDecoder(*(new I420Decoder));
|
||||
#endif
|
||||
#ifdef VIDEOCODEC_H264
|
||||
case kVideoCodecH264:
|
||||
if (H264Decoder::IsSupported()) {
|
||||
return new VCMGenericDecoder(*(H264Decoder::Create()));
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
LOG(LS_WARNING) << "No internal decoder of this type exists.";
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
LOG(LS_WARNING) << "No internal decoder of this type exists.";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const VCMDecoderMapItem* VCMCodecDataBase::FindDecoderItem(
|
||||
|
Reference in New Issue
Block a user