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

Side by Side Diff: content/renderer/media/media_stream_video_track_unittest.cc

Issue 287313002: Pass a TimeTicks along video capture pipeline to represent capture time (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged and land Created 6 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 private: 123 private:
124 base::Closure callback_; 124 base::Closure callback_;
125 bool* correct_; 125 bool* correct_;
126 base::ThreadCheckerImpl thread_checker_; 126 base::ThreadCheckerImpl thread_checker_;
127 }; 127 };
128 128
129 void CheckThreadVideoFrameReceiver( 129 void CheckThreadVideoFrameReceiver(
130 CheckThreadHelper* helper, 130 CheckThreadHelper* helper,
131 const scoped_refptr<media::VideoFrame>& frame, 131 const scoped_refptr<media::VideoFrame>& frame,
132 const media::VideoCaptureFormat& format) { 132 const media::VideoCaptureFormat& format,
133 const base::TimeTicks& estimated_capture_time) {
133 // Do nothing. 134 // Do nothing.
134 } 135 }
135 136
136 // Checks that the callback given to the track is reset on the right thread. 137 // Checks that the callback given to the track is reset on the right thread.
137 TEST_F(MediaStreamVideoTrackTest, ResetCallbackOnThread) { 138 TEST_F(MediaStreamVideoTrackTest, ResetCallbackOnThread) {
138 MockMediaStreamVideoSink sink; 139 MockMediaStreamVideoSink sink;
139 blink::WebMediaStreamTrack track = CreateTrack(); 140 blink::WebMediaStreamTrack track = CreateTrack();
140 141
141 base::RunLoop run_loop; 142 base::RunLoop run_loop;
142 bool correct = false; 143 bool correct = false;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 MediaStreamVideoTrack* native_track2 = 223 MediaStreamVideoTrack* native_track2 =
223 MediaStreamVideoTrack::GetVideoTrack(track2); 224 MediaStreamVideoTrack::GetVideoTrack(track2);
224 native_track2->Stop(); 225 native_track2->Stop();
225 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded, sink2.state()); 226 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded, sink2.state());
226 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded, 227 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded,
227 blink_source().readyState()); 228 blink_source().readyState());
228 MediaStreamVideoSink::RemoveFromVideoTrack(&sink2, track2); 229 MediaStreamVideoSink::RemoveFromVideoTrack(&sink2, track2);
229 } 230 }
230 231
231 } // namespace content 232 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_track.cc ('k') | content/renderer/media/mock_media_stream_video_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698