
R=stefan@webrtc.org BUG=1788 Review URL: https://webrtc-codereview.appspot.com/37589004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@8061 4adac7df-926f-26a2-2b94-8c16560cd09d
46 lines
1.3 KiB
C++
46 lines
1.3 KiB
C++
/*
|
|
* Copyright (c) 2014 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
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#include "webrtc/modules/video_coding/codecs/vp8/vp8_factory.h"
|
|
|
|
#include "webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h"
|
|
#include "webrtc/modules/video_coding/codecs/vp8/vp8_impl.h"
|
|
|
|
namespace webrtc {
|
|
|
|
bool VP8EncoderFactoryConfig::use_simulcast_adapter_ = false;
|
|
|
|
class VP8EncoderImplFactory : public VideoEncoderFactory {
|
|
public:
|
|
virtual VideoEncoder* Create() OVERRIDE {
|
|
return new VP8EncoderImpl();
|
|
}
|
|
|
|
virtual void Destroy(VideoEncoder* encoder) OVERRIDE {
|
|
delete encoder;
|
|
}
|
|
|
|
virtual ~VP8EncoderImplFactory() {}
|
|
};
|
|
|
|
VP8Encoder* VP8Encoder::Create() {
|
|
if (VP8EncoderFactoryConfig::use_simulcast_adapter()) {
|
|
return new SimulcastEncoderAdapter(new VP8EncoderImplFactory());
|
|
} else {
|
|
return new VP8EncoderImpl();
|
|
}
|
|
}
|
|
|
|
VP8Decoder* VP8Decoder::Create() {
|
|
return new VP8DecoderImpl();
|
|
}
|
|
|
|
} // namespace webrtc
|