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

Side by Side Diff: media/video/capture/video_capture_proxy.cc

Issue 23587018: Replace media::VideoCapture::VideoFrameBuffer with media::VideoFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@git-svn
Patch Set: 4fe79a572 Initial. Created 7 years, 3 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "media/video/capture/video_capture_proxy.h" 5 #include "media/video/capture/video_capture_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 71
72 void VideoCaptureHandlerProxy::OnRemoved(VideoCapture* capture) { 72 void VideoCaptureHandlerProxy::OnRemoved(VideoCapture* capture) {
73 main_message_loop_->PostTask(FROM_HERE, base::Bind( 73 main_message_loop_->PostTask(FROM_HERE, base::Bind(
74 &VideoCaptureHandlerProxy::OnRemovedOnMainThread, 74 &VideoCaptureHandlerProxy::OnRemovedOnMainThread,
75 base::Unretained(this), 75 base::Unretained(this),
76 capture, 76 capture,
77 GetState(capture))); 77 GetState(capture)));
78 } 78 }
79 79
80 void VideoCaptureHandlerProxy::OnBufferReady( 80 void VideoCaptureHandlerProxy::OnFrameReady(
81 VideoCapture* capture, 81 VideoCapture* capture,
82 scoped_refptr<VideoCapture::VideoFrameBuffer> buffer) { 82 const scoped_refptr<VideoFrame>& frame) {
83 main_message_loop_->PostTask(FROM_HERE, base::Bind( 83 main_message_loop_->PostTask(
84 &VideoCaptureHandlerProxy::OnBufferReadyOnMainThread, 84 FROM_HERE,
85 base::Unretained(this), 85 base::Bind(&VideoCaptureHandlerProxy::OnFrameReadyOnMainThread,
86 capture, 86 base::Unretained(this),
87 GetState(capture), 87 capture,
88 buffer)); 88 GetState(capture),
89 frame));
89 } 90 }
90 91
91 void VideoCaptureHandlerProxy::OnDeviceInfoReceived( 92 void VideoCaptureHandlerProxy::OnDeviceInfoReceived(
92 VideoCapture* capture, 93 VideoCapture* capture,
93 const VideoCaptureParams& device_info) { 94 const VideoCaptureParams& device_info) {
94 main_message_loop_->PostTask(FROM_HERE, base::Bind( 95 main_message_loop_->PostTask(FROM_HERE, base::Bind(
95 &VideoCaptureHandlerProxy::OnDeviceInfoReceivedOnMainThread, 96 &VideoCaptureHandlerProxy::OnDeviceInfoReceivedOnMainThread,
96 base::Unretained(this), 97 base::Unretained(this),
97 capture, 98 capture,
98 GetState(capture), 99 GetState(capture),
(...skipping 29 matching lines...) Expand all
128 proxied_->OnError(capture, error_code); 129 proxied_->OnError(capture, error_code);
129 } 130 }
130 131
131 void VideoCaptureHandlerProxy::OnRemovedOnMainThread( 132 void VideoCaptureHandlerProxy::OnRemovedOnMainThread(
132 VideoCapture* capture, 133 VideoCapture* capture,
133 const VideoCaptureState& state) { 134 const VideoCaptureState& state) {
134 state_ = state; 135 state_ = state;
135 proxied_->OnRemoved(capture); 136 proxied_->OnRemoved(capture);
136 } 137 }
137 138
138 void VideoCaptureHandlerProxy::OnBufferReadyOnMainThread( 139 void VideoCaptureHandlerProxy::OnFrameReadyOnMainThread(
139 VideoCapture* capture, 140 VideoCapture* capture,
140 const VideoCaptureState& state, 141 const VideoCaptureState& state,
141 scoped_refptr<VideoCapture::VideoFrameBuffer> buffer) { 142 const scoped_refptr<VideoFrame>& frame) {
142 state_ = state; 143 state_ = state;
143 proxied_->OnBufferReady(capture, buffer); 144 proxied_->OnFrameReady(capture, frame);
144 } 145 }
145 146
146 void VideoCaptureHandlerProxy::OnDeviceInfoReceivedOnMainThread( 147 void VideoCaptureHandlerProxy::OnDeviceInfoReceivedOnMainThread(
147 VideoCapture* capture, 148 VideoCapture* capture,
148 const VideoCaptureState& state, 149 const VideoCaptureState& state,
149 const VideoCaptureParams& device_info) { 150 const VideoCaptureParams& device_info) {
150 state_ = state; 151 state_ = state;
151 proxied_->OnDeviceInfoReceived(capture, device_info); 152 proxied_->OnDeviceInfoReceived(capture, device_info);
152 } 153 }
153 154
154 } // namespace media 155 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698