| Index: webrtc/media/engine/videoencodersoftwarefallbackwrapper.cc
|
| diff --git a/webrtc/video/video_encoder.cc b/webrtc/media/engine/videoencodersoftwarefallbackwrapper.cc
|
| similarity index 80%
|
| copy from webrtc/video/video_encoder.cc
|
| copy to webrtc/media/engine/videoencodersoftwarefallbackwrapper.cc
|
| index bb6e9e23082ae0b93a6adaefa5bf6dc28f262658..cd39f68c1a9b4fc32690daef492cfd8571b037b5 100644
|
| --- a/webrtc/video/video_encoder.cc
|
| +++ b/webrtc/media/engine/videoencodersoftwarefallbackwrapper.cc
|
| @@ -1,5 +1,5 @@
|
| /*
|
| - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
|
| + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
|
| *
|
| * Use of this source code is governed by a BSD-style license
|
| * that can be found in the LICENSE file in the root of the source
|
| @@ -8,61 +8,12 @@
|
| * be found in the AUTHORS file in the root of the source tree.
|
| */
|
|
|
| -#include "webrtc/video_encoder.h"
|
| +#include "webrtc/media/engine/videoencodersoftwarefallbackwrapper.h"
|
|
|
| -#include "webrtc/base/checks.h"
|
| #include "webrtc/base/logging.h"
|
| -#include "webrtc/modules/video_coding/codecs/h264/include/h264.h"
|
| -#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
|
| -#include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h"
|
| +#include "webrtc/modules/video_coding/include/video_error_codes.h"
|
|
|
| namespace webrtc {
|
| -VideoEncoder* VideoEncoder::Create(VideoEncoder::EncoderType codec_type) {
|
| - RTC_DCHECK(IsSupportedSoftware(codec_type));
|
| - switch (codec_type) {
|
| - case kH264:
|
| - return H264Encoder::Create();
|
| - case kVp8:
|
| - return VP8Encoder::Create();
|
| - case kVp9:
|
| - return VP9Encoder::Create();
|
| - case kUnsupportedCodec:
|
| - RTC_NOTREACHED();
|
| - return nullptr;
|
| - }
|
| - RTC_NOTREACHED();
|
| - return nullptr;
|
| -}
|
| -
|
| -bool VideoEncoder::IsSupportedSoftware(EncoderType codec_type) {
|
| - switch (codec_type) {
|
| - case kH264:
|
| - return H264Encoder::IsSupported();
|
| - case kVp8:
|
| - return true;
|
| - case kVp9:
|
| - return VP9Encoder::IsSupported();
|
| - case kUnsupportedCodec:
|
| - RTC_NOTREACHED();
|
| - return false;
|
| - }
|
| - RTC_NOTREACHED();
|
| - return false;
|
| -}
|
| -
|
| -VideoEncoder::EncoderType VideoEncoder::CodecToEncoderType(
|
| - VideoCodecType codec_type) {
|
| - switch (codec_type) {
|
| - case kVideoCodecH264:
|
| - return VideoEncoder::kH264;
|
| - case kVideoCodecVP8:
|
| - return VideoEncoder::kVp8;
|
| - case kVideoCodecVP9:
|
| - return VideoEncoder::kVp9;
|
| - default:
|
| - return VideoEncoder::kUnsupportedCodec;
|
| - }
|
| -}
|
|
|
| VideoEncoderSoftwareFallbackWrapper::VideoEncoderSoftwareFallbackWrapper(
|
| VideoCodecType codec_type,
|
|
|