#include "base/time/time.h"
#include "media/cast/cast_config.h"
#include "media/cast/receiver/video_decoder.h"
+#include "media/cast/sender/vp8_encoder.h"
#include "media/cast/test/utility/standalone_cast_environment.h"
#include "media/cast/test/utility/video_utility.h"
-#include "media/cast/video_sender/codecs/vp8/vp8_encoder.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace media {
} // namespace
-class VideoDecoderTest
- : public ::testing::TestWithParam<transport::VideoCodec> {
+class VideoDecoderTest : public ::testing::TestWithParam<Codec> {
public:
VideoDecoderTest()
: cast_environment_(new StandaloneCastEnvironment()),
vp8_encoder_.Initialize();
}
+ virtual ~VideoDecoderTest() {
+ // Make sure all threads have stopped before the environment goes away.
+ cast_environment_->Shutdown();
+ }
+
protected:
virtual void SetUp() OVERRIDE {
video_decoder_.reset(new VideoDecoder(cast_environment_, GetParam()));
PopulateVideoFrame(video_frame, 0);
// Encode |frame| into |encoded_frame->data|.
- scoped_ptr<transport::EncodedFrame> encoded_frame(
- new transport::EncodedFrame());
- CHECK_EQ(transport::kVp8, GetParam()); // Only support VP8 test currently.
+ scoped_ptr<EncodedFrame> encoded_frame(
+ new EncodedFrame());
+ // Test only supports VP8, currently.
+ CHECK_EQ(CODEC_VIDEO_VP8, GetParam());
vp8_encoder_.Encode(video_frame, encoded_frame.get());
encoded_frame->frame_id = last_frame_id_ + 1 + num_dropped_frames;
last_frame_id_ = encoded_frame->frame_id;
INSTANTIATE_TEST_CASE_P(VideoDecoderTestScenarios,
VideoDecoderTest,
- ::testing::Values(transport::kVp8));
+ ::testing::Values(CODEC_VIDEO_VP8));
} // namespace cast
} // namespace media