Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Unified Diff: webrtc/modules/video_coding/codecs/vp8/simulcast_test_utility.h

Issue 2964953002: Remove webrtc::VideoEncoderFactory (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/codecs/vp8/simulcast_test_utility.h
diff --git a/webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h b/webrtc/modules/video_coding/codecs/vp8/simulcast_test_utility.h
similarity index 98%
rename from webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h
rename to webrtc/modules/video_coding/codecs/vp8/simulcast_test_utility.h
index 5a8d21913ea9184793f09af315c62ce2b667bf91..e3e7179fd923b3f9fc853c3035da44d478b1727b 100644
--- a/webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h
+++ b/webrtc/modules/video_coding/codecs/vp8/simulcast_test_utility.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_
-#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_
+#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_TEST_UTILITY_H_
+#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_TEST_UTILITY_H_
#include <algorithm>
#include <map>
@@ -161,9 +161,6 @@ class Vp8TestDecodedImageCallback : public DecodedImageCallback {
class TestVp8Simulcast : public ::testing::Test {
public:
- TestVp8Simulcast(VP8Encoder* encoder, VP8Decoder* decoder)
- : encoder_(encoder), decoder_(decoder) {}
-
static void SetPlane(uint8_t* data,
uint8_t value,
int width,
@@ -244,11 +241,20 @@ class TestVp8Simulcast : public ::testing::Test {
}
protected:
- void SetUp() override { SetUpCodec(kDefaultTemporalLayerProfile); }
+ virtual VP8Encoder* CreateEncoder() = 0;
+ virtual VP8Decoder* CreateDecoder() = 0;
+
+ void SetUp() override {
+ encoder_.reset(CreateEncoder());
+ decoder_.reset(CreateDecoder());
+ SetUpCodec(kDefaultTemporalLayerProfile);
+ }
void TearDown() override {
encoder_->Release();
decoder_->Release();
+ encoder_ = nullptr;
stefan-webrtc 2017/07/07 09:55:21 encoder_.reset() is what I most commonly see. Mayb
magjed_webrtc 2017/07/07 12:08:00 Done.
+ decoder_ = nullptr;
}
void SetUpCodec(const int* temporal_layer_profile) {
@@ -746,4 +752,4 @@ class TestVp8Simulcast : public ::testing::Test {
} // namespace testing
} // namespace webrtc
-#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_UNITTEST_H_
+#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_TEST_UTILITY_H_

Powered by Google App Engine
This is Rietveld 408576698