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

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

Issue 955253002: Add metadata to media::VideoFrame and plumb it through IPC/MediaStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tommi's nits addressed Created 5 years, 9 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
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 private: 133 private:
134 base::Closure callback_; 134 base::Closure callback_;
135 bool* correct_; 135 bool* correct_;
136 base::ThreadCheckerImpl thread_checker_; 136 base::ThreadCheckerImpl thread_checker_;
137 }; 137 };
138 138
139 void CheckThreadVideoFrameReceiver( 139 void CheckThreadVideoFrameReceiver(
140 CheckThreadHelper* helper, 140 CheckThreadHelper* helper,
141 const scoped_refptr<media::VideoFrame>& frame, 141 const scoped_refptr<media::VideoFrame>& frame,
142 const media::VideoCaptureFormat& format,
143 const base::TimeTicks& estimated_capture_time) { 142 const base::TimeTicks& estimated_capture_time) {
144 // Do nothing. 143 // Do nothing.
145 } 144 }
146 145
147 // Checks that the callback given to the track is reset on the right thread. 146 // Checks that the callback given to the track is reset on the right thread.
148 TEST_F(MediaStreamVideoTrackTest, ResetCallbackOnThread) { 147 TEST_F(MediaStreamVideoTrackTest, ResetCallbackOnThread) {
149 MockMediaStreamVideoSink sink; 148 MockMediaStreamVideoSink sink;
150 blink::WebMediaStreamTrack track = CreateTrack(); 149 blink::WebMediaStreamTrack track = CreateTrack();
151 150
152 base::RunLoop run_loop; 151 base::RunLoop run_loop;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 MediaStreamVideoTrack* native_track2 = 228 MediaStreamVideoTrack* native_track2 =
230 MediaStreamVideoTrack::GetVideoTrack(track2); 229 MediaStreamVideoTrack::GetVideoTrack(track2);
231 native_track2->Stop(); 230 native_track2->Stop();
232 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded, sink2.state()); 231 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded, sink2.state());
233 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded, 232 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded,
234 blink_source().readyState()); 233 blink_source().readyState());
235 MediaStreamVideoSink::RemoveFromVideoTrack(&sink2, track2); 234 MediaStreamVideoSink::RemoveFromVideoTrack(&sink2, track2);
236 } 235 }
237 236
238 } // namespace content 237 } // 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