Removing VCMCodecDataBase::Codec and VideoCodingModule::Codec.

This CL brings us one step closer to removing CodecDatabase and
GenericEncoder, by removing the static VCM::Codec(). Codec specific
methods are moved to video_encoder.cc (they already belonged to this
class) and getting default generic codec settings has been moved to a
test specific file.

This CL also makes video_encoder.h pass style guide and lint checks,
since these checks are triggered with the new video_encoder.cc file.

BUG=webrtc:8064

Review-Url: https://codereview.webrtc.org/2993923002
Cr-Commit-Position: refs/heads/master@{#19303}
This commit is contained in:
mflodman
2017-08-10 02:43:14 -07:00
committed by Commit Bot
parent 71a62b9a19
commit 351424e942
20 changed files with 251 additions and 186 deletions

View File

@ -47,6 +47,7 @@
#include "webrtc/test/testsupport/frame_writer.h"
#include "webrtc/test/testsupport/metrics/video_metrics.h"
#include "webrtc/test/testsupport/packet_reader.h"
#include "webrtc/test/video_codec_settings.h"
#include "webrtc/typedefs.h"
namespace webrtc {
@ -634,7 +635,7 @@ class VideoProcessorIntegrationTest : public testing::Test {
bool resilience_on,
int width,
int height) {
VideoCodingModule::Codec(codec_type, &config->codec_settings);
webrtc::test::CodecSettings(codec_type, &config->codec_settings);
config->codec_settings.width = width;
config->codec_settings.height = height;
switch (config->codec_settings.codecType) {

View File

@ -22,6 +22,7 @@
#include "webrtc/test/testsupport/mock/mock_frame_writer.h"
#include "webrtc/test/testsupport/packet_reader.h"
#include "webrtc/test/testsupport/unittest_utils.h"
#include "webrtc/test/video_codec_settings.h"
#include "webrtc/typedefs.h"
using ::testing::_;
@ -45,7 +46,7 @@ class VideoProcessorTest : public testing::Test {
protected:
VideoProcessorTest() {
// Get a codec configuration struct and configure it.
VideoCodingModule::Codec(kVideoCodecVP8, &config_.codec_settings);
webrtc::test::CodecSettings(kVideoCodecVP8, &config_.codec_settings);
config_.codec_settings.width = kWidth;
config_.codec_settings.height = kHeight;
config_.codec_settings.maxFramerate = kFramerate;