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

Side by Side Diff: media/video/capture/android/video_capture_device_android.cc

Issue 15906019: Hook up EncodedVideoSource on the browser side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screencast_cl_6
Patch Set: 516738a8 IPC/struct changes, courtesy hshi@ Created 7 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "media/video/capture/android/video_capture_device_android.h" 5 #include "media/video/capture/android/video_capture_device_android.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 env, base::android::GetApplicationContext(), id, 108 env, base::android::GetApplicationContext(), id,
109 reinterpret_cast<jint>(this))); 109 reinterpret_cast<jint>(this)));
110 110
111 return true; 111 return true;
112 } 112 }
113 113
114 const VideoCaptureDevice::Name& VideoCaptureDeviceAndroid::device_name() { 114 const VideoCaptureDevice::Name& VideoCaptureDeviceAndroid::device_name() {
115 return device_name_; 115 return device_name_;
116 } 116 }
117 117
118 VideoEncodingCapabilities VideoCaptureDeviceAndroid::GetEncodingCapabilities() {
119 return VideoEncodingCapabilities();
120 }
121
122 void VideoCaptureDeviceAndroid::TryConfigureEncodedBitstream(
123 const RuntimeVideoEncodingParameters& params) {
124 }
125
118 void VideoCaptureDeviceAndroid::Allocate( 126 void VideoCaptureDeviceAndroid::Allocate(
119 int width, 127 int width,
120 int height, 128 int height,
121 int frame_rate, 129 int frame_rate,
122 EventHandler* observer) { 130 EventHandler* observer) {
123 { 131 {
124 base::AutoLock lock(lock_); 132 base::AutoLock lock(lock_);
125 if (state_ != kIdle) 133 if (state_ != kIdle)
126 return; 134 return;
127 observer_ = observer; 135 observer_ = observer;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 void VideoCaptureDeviceAndroid::SetErrorState(const std::string& reason) { 263 void VideoCaptureDeviceAndroid::SetErrorState(const std::string& reason) {
256 LOG(ERROR) << "VideoCaptureDeviceAndroid::SetErrorState: " << reason; 264 LOG(ERROR) << "VideoCaptureDeviceAndroid::SetErrorState: " << reason;
257 { 265 {
258 base::AutoLock lock(lock_); 266 base::AutoLock lock(lock_);
259 state_ = kError; 267 state_ = kError;
260 } 268 }
261 observer_->OnError(); 269 observer_->OnError();
262 } 270 }
263 271
264 } // namespace media 272 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698