Use external VideoDecoders in VideoReceiveStream.
Removes direct VideoCodec use from the new API, exposes VideoDecoders
through webrtc/video_decoder.h similar to VideoEncoders.
Also includes some preparation for wiring up external decoders in
WebRtcVideoEngine2 by adding AllocatedDecoders that specify whether they
were allocated internally or externally.
Additionally addresses a data race in VideoReceiver that was exposed with this change.
R=mflodman@webrtc.org, stefan@webrtc.org
TBR=pthatcher@webrtc.org
BUG=2854,1667
Review URL: https://webrtc-codereview.appspot.com/27829004
git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@7560 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/video/call.cc b/video/call.cc
index f37e538..ff70fda 100644
--- a/video/call.cc
+++ b/video/call.cc
@@ -51,6 +51,15 @@
return NULL;
}
+VideoDecoder* VideoDecoder::Create(VideoDecoder::DecoderType codec_type) {
+ switch (codec_type) {
+ case kVp8:
+ return VP8Decoder::Create();
+ }
+ assert(false);
+ return NULL;
+}
+
const int Call::Config::kDefaultStartBitrateBps = 300000;
namespace internal {