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

Side by Side Diff: media/cast/test/encode_decode_test.cc

Issue 109413004: Cast:Adding cast_transport_config and cleaning up (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Injecting TaskRunner Created 6 years, 12 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Joint encoder and decoder testing. 5 // Joint encoder and decoder testing.
6 // These tests operate directly on the VP8 encoder and decoder, not the 6 // These tests operate directly on the VP8 encoder and decoder, not the
7 // transport layer, and are targeted at validating the bit stream. 7 // transport layer, and are targeted at validating the bit stream.
8 8
9 #include <gtest/gtest.h> 9 #include <gtest/gtest.h>
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 scoped_ptr<Vp8Encoder> encoder_; 111 scoped_ptr<Vp8Encoder> encoder_;
112 scoped_ptr<Vp8Decoder> decoder_; 112 scoped_ptr<Vp8Decoder> decoder_;
113 scoped_refptr<media::VideoFrame> video_frame_; 113 scoped_refptr<media::VideoFrame> video_frame_;
114 base::SimpleTestTickClock testing_clock_; 114 base::SimpleTestTickClock testing_clock_;
115 scoped_refptr<test::FakeTaskRunner> task_runner_; 115 scoped_refptr<test::FakeTaskRunner> task_runner_;
116 scoped_refptr<CastEnvironment> cast_environment_; 116 scoped_refptr<CastEnvironment> cast_environment_;
117 scoped_refptr<EncodeDecodeTestFrameCallback> test_callback_; 117 scoped_refptr<EncodeDecodeTestFrameCallback> test_callback_;
118 }; 118 };
119 119
120 TEST_F(EncodeDecodeTest, BasicEncodeDecode) { 120 TEST_F(EncodeDecodeTest, BasicEncodeDecode) {
121 EncodedVideoFrame encoded_frame; 121 transport::EncodedVideoFrame encoded_frame;
122 // Encode frame. 122 // Encode frame.
123 encoder_->Encode(video_frame_, &encoded_frame); 123 encoder_->Encode(video_frame_, &encoded_frame);
124 EXPECT_GT(encoded_frame.data.size(), GG_UINT64_C(0)); 124 EXPECT_GT(encoded_frame.data.size(), GG_UINT64_C(0));
125 // Decode frame. 125 // Decode frame.
126 decoder_->Decode(&encoded_frame, base::TimeTicks(), base::Bind( 126 decoder_->Decode(&encoded_frame, base::TimeTicks(), base::Bind(
127 &EncodeDecodeTestFrameCallback::DecodeComplete, test_callback_)); 127 &EncodeDecodeTestFrameCallback::DecodeComplete, test_callback_));
128 task_runner_->RunTasks(); 128 task_runner_->RunTasks();
129 } 129 }
130 130
131 } // namespace cast 131 } // namespace cast
132 } // namespace media 132 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698