Add support for VP9 in webrtc::Call and video_loopback.

R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/31959004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7622 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
stefan@webrtc.org 2014-11-04 19:41:15 +00:00
parent d839e0ab52
commit 7c29e8c2f3
4 changed files with 7 additions and 0 deletions

View File

@ -60,6 +60,8 @@ VideoReceiveStream::Decoder CreateMatchingDecoder(
decoder.payload_name = encoder_settings.payload_name;
if (encoder_settings.payload_name == "VP8") {
decoder.decoder = VideoDecoder::Create(VideoDecoder::kVp8);
} else if (encoder_settings.payload_name == "VP9") {
decoder.decoder = VideoDecoder::Create(VideoDecoder::kVp9);
} else {
decoder.decoder = new FakeDecoder();
}

View File

@ -58,6 +58,8 @@ VideoDecoder* VideoDecoder::Create(VideoDecoder::DecoderType codec_type) {
switch (codec_type) {
case kVp8:
return VP8Decoder::Create();
case kVp9:
return VP9Decoder::Create();
}
assert(false);
return NULL;

View File

@ -142,6 +142,8 @@ void Loopback() {
scoped_ptr<VideoEncoder> encoder;
if (flags::Codec() == "VP8") {
encoder.reset(VideoEncoder::Create(VideoEncoder::kVp8));
} else if (flags::Codec() == "VP9") {
encoder.reset(VideoEncoder::Create(VideoEncoder::kVp9));
} else {
// Codec not supported.
assert(false && "Codec not supported!");

View File

@ -40,6 +40,7 @@ class VideoDecoder {
public:
enum DecoderType {
kVp8,
kVp9
};
static VideoDecoder* Create(DecoderType codec_type);