X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fmedia%2Fcast%2Freceiver%2Fvideo_decoder_unittest.cc;h=7ea4b5da141d19e22a0de74345cd97575a284a71;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=1d16534b968a9bf4ba88bb0ac9ec05f15119eb40;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/media/cast/receiver/video_decoder_unittest.cc b/src/media/cast/receiver/video_decoder_unittest.cc index 1d16534..7ea4b5d 100644 --- a/src/media/cast/receiver/video_decoder_unittest.cc +++ b/src/media/cast/receiver/video_decoder_unittest.cc @@ -11,9 +11,9 @@ #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 { @@ -35,8 +35,7 @@ VideoSenderConfig GetVideoSenderConfigForTest() { } // namespace -class VideoDecoderTest - : public ::testing::TestWithParam { +class VideoDecoderTest : public ::testing::TestWithParam { public: VideoDecoderTest() : cast_environment_(new StandaloneCastEnvironment()), @@ -45,6 +44,11 @@ class VideoDecoderTest 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())); @@ -74,9 +78,10 @@ class VideoDecoderTest PopulateVideoFrame(video_frame, 0); // Encode |frame| into |encoded_frame->data|. - scoped_ptr encoded_frame( - new transport::EncodedFrame()); - CHECK_EQ(transport::kVp8, GetParam()); // Only support VP8 test currently. + scoped_ptr 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; @@ -177,7 +182,7 @@ TEST_P(VideoDecoderTest, RecoversFromDroppedFrames) { INSTANTIATE_TEST_CASE_P(VideoDecoderTestScenarios, VideoDecoderTest, - ::testing::Values(transport::kVp8)); + ::testing::Values(CODEC_VIDEO_VP8)); } // namespace cast } // namespace media