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

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

Issue 138953009: Cast: Fix threading issues in VideoEncoderImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bad merge now fixed Created 6 years, 11 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
« no previous file with comments | « no previous file | media/cast/test/end2end_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 scoped_ptr<Vp8Decoder> decoder_; 115 scoped_ptr<Vp8Decoder> decoder_;
116 scoped_refptr<media::VideoFrame> video_frame_; 116 scoped_refptr<media::VideoFrame> video_frame_;
117 base::SimpleTestTickClock* testing_clock_; // Owned by CastEnvironment. 117 base::SimpleTestTickClock* testing_clock_; // Owned by CastEnvironment.
118 scoped_refptr<test::FakeTaskRunner> task_runner_; 118 scoped_refptr<test::FakeTaskRunner> task_runner_;
119 scoped_refptr<CastEnvironment> cast_environment_; 119 scoped_refptr<CastEnvironment> cast_environment_;
120 scoped_refptr<EncodeDecodeTestFrameCallback> test_callback_; 120 scoped_refptr<EncodeDecodeTestFrameCallback> test_callback_;
121 }; 121 };
122 122
123 TEST_F(EncodeDecodeTest, BasicEncodeDecode) { 123 TEST_F(EncodeDecodeTest, BasicEncodeDecode) {
124 transport::EncodedVideoFrame encoded_frame; 124 transport::EncodedVideoFrame encoded_frame;
125 encoder_->Initialize();
125 // Encode frame. 126 // Encode frame.
126 encoder_->Encode(video_frame_, &encoded_frame); 127 encoder_->Encode(video_frame_, &encoded_frame);
127 EXPECT_GT(encoded_frame.data.size(), GG_UINT64_C(0)); 128 EXPECT_GT(encoded_frame.data.size(), GG_UINT64_C(0));
128 // Decode frame. 129 // Decode frame.
129 decoder_->Decode(&encoded_frame, base::TimeTicks(), base::Bind( 130 decoder_->Decode(&encoded_frame, base::TimeTicks(), base::Bind(
130 &EncodeDecodeTestFrameCallback::DecodeComplete, test_callback_)); 131 &EncodeDecodeTestFrameCallback::DecodeComplete, test_callback_));
131 task_runner_->RunTasks(); 132 task_runner_->RunTasks();
132 } 133 }
133 134
134 } // namespace cast 135 } // namespace cast
135 } // namespace media 136 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/cast/test/end2end_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698