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( |