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

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

Issue 246433006: Change MediaStreamVideoSource to output different resolutions to different tracks depending on the … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments. Created 6 years, 7 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 "content/renderer/media/mock_media_stream_video_source.h" 5 #include "content/renderer/media/mock_media_stream_video_source.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/message_loop/message_loop.h"
tommi (sloooow) - chröme 2014/05/09 11:16:13 is this include necessary?
perkj_chrome 2014/05/13 11:05:56 Moved to MediaStreamVideoSource.
10 11
11 namespace content { 12 namespace content {
12 13
13 MockMediaStreamVideoSource::MockMediaStreamVideoSource( 14 MockMediaStreamVideoSource::MockMediaStreamVideoSource(
14 bool manual_get_supported_formats) 15 bool manual_get_supported_formats)
15 : manual_get_supported_formats_(manual_get_supported_formats), 16 : manual_get_supported_formats_(manual_get_supported_formats),
16 max_requested_height_(0), 17 max_requested_height_(0),
17 max_requested_width_(0), 18 max_requested_width_(0),
18 attempted_to_start_(false) { 19 attempted_to_start_(false) {
19 supported_formats_.push_back( 20 supported_formats_.push_back(
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 FROM_HERE, 78 FROM_HERE,
78 base::Bind(&MockMediaStreamVideoSource::DeliverVideoFrameOnIO, 79 base::Bind(&MockMediaStreamVideoSource::DeliverVideoFrameOnIO,
79 base::Unretained(this), frame, params_.requested_format, 80 base::Unretained(this), frame, params_.requested_format,
80 frame_callback_)); 81 frame_callback_));
81 } 82 }
82 83
83 void MockMediaStreamVideoSource::DeliverVideoFrameOnIO( 84 void MockMediaStreamVideoSource::DeliverVideoFrameOnIO(
84 const scoped_refptr<media::VideoFrame>& frame, 85 const scoped_refptr<media::VideoFrame>& frame,
85 media::VideoCaptureFormat format, 86 media::VideoCaptureFormat format,
86 const VideoCaptureDeliverFrameCB& frame_callback) { 87 const VideoCaptureDeliverFrameCB& frame_callback) {
87 DCHECK(io_message_loop()->BelongsToCurrentThread()); 88 DCHECK(io_message_loop()->BelongsToCurrentThread());
perkj_chrome 2014/05/13 11:05:56 I need to remove this check if I DCHECK that io_me
88 frame_callback.Run(frame, format); 89 frame_callback.Run(frame, format);
89 } 90 }
90 91
91 } // namespace content 92 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698