Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: webrtc/modules/video_coding/main/source/codec_database.cc

Issue 1187573004: iOS HW H264 support. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Move unittest file. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/main/source/codec_database.cc
diff --git a/webrtc/modules/video_coding/main/source/codec_database.cc b/webrtc/modules/video_coding/main/source/codec_database.cc
index 3d887c3aeb7482becdd94921047050b89c5723e3..49a018b4eb6bd3143354d25a8645f4472a4663f1 100644
--- a/webrtc/modules/video_coding/main/source/codec_database.cc
+++ b/webrtc/modules/video_coding/main/source/codec_database.cc
@@ -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
@@ -661,10 +664,20 @@ VCMGenericEncoder* VCMCodecDataBase::CreateEncoder(
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() {
@@ -691,10 +704,18 @@ VCMGenericDecoder* VCMCodecDataBase::CreateDecoder(VideoCodecType type) const {
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(

Powered by Google App Engine
This is Rietveld 408576698