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

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

Issue 1215443003: [Android] Filter the unknown type in function GetDeviceSupportedFormats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-enable failing test Created 5 years, 5 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
« no previous file with comments | « no previous file | media/video/capture/video_capture_device_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "media/video/capture/android/video_capture_device_factory_android.h" 5 #include "media/video/capture/android/video_capture_device_factory_android.h"
6 6
7 #include "base/android/jni_string.h" 7 #include "base/android/jni_string.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "jni/VideoCaptureFactory_jni.h" 10 #include "jni/VideoCaptureFactory_jni.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 VideoPixelFormat pixel_format = media::PIXEL_FORMAT_UNKNOWN; 107 VideoPixelFormat pixel_format = media::PIXEL_FORMAT_UNKNOWN;
108 switch (media::Java_VideoCaptureFactory_getCaptureFormatPixelFormat( 108 switch (media::Java_VideoCaptureFactory_getCaptureFormatPixelFormat(
109 env, format.obj())) { 109 env, format.obj())) {
110 case VideoCaptureDeviceAndroid::ANDROID_IMAGE_FORMAT_YV12: 110 case VideoCaptureDeviceAndroid::ANDROID_IMAGE_FORMAT_YV12:
111 pixel_format = media::PIXEL_FORMAT_YV12; 111 pixel_format = media::PIXEL_FORMAT_YV12;
112 break; 112 break;
113 case VideoCaptureDeviceAndroid::ANDROID_IMAGE_FORMAT_NV21: 113 case VideoCaptureDeviceAndroid::ANDROID_IMAGE_FORMAT_NV21:
114 pixel_format = media::PIXEL_FORMAT_NV21; 114 pixel_format = media::PIXEL_FORMAT_NV21;
115 break; 115 break;
116 default: 116 default:
117 break; 117 continue;
118 } 118 }
119 VideoCaptureFormat capture_format( 119 VideoCaptureFormat capture_format(
120 gfx::Size(media::Java_VideoCaptureFactory_getCaptureFormatWidth(env, 120 gfx::Size(media::Java_VideoCaptureFactory_getCaptureFormatWidth(env,
121 format.obj()), 121 format.obj()),
122 media::Java_VideoCaptureFactory_getCaptureFormatHeight(env, 122 media::Java_VideoCaptureFactory_getCaptureFormatHeight(env,
123 format.obj())), 123 format.obj())),
124 media::Java_VideoCaptureFactory_getCaptureFormatFramerate(env, 124 media::Java_VideoCaptureFactory_getCaptureFormatFramerate(env,
125 format.obj()), 125 format.obj()),
126 pixel_format); 126 pixel_format);
127 capture_formats->push_back(capture_format); 127 capture_formats->push_back(capture_format);
128 DVLOG(1) << device.name() << " " 128 DVLOG(1) << device.name() << " "
129 << VideoCaptureFormat::ToString(capture_format); 129 << VideoCaptureFormat::ToString(capture_format);
130 } 130 }
131 } 131 }
132 132
133 // static 133 // static
134 VideoCaptureDeviceFactory* 134 VideoCaptureDeviceFactory*
135 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( 135 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory(
136 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { 136 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
137 return new VideoCaptureDeviceFactoryAndroid(); 137 return new VideoCaptureDeviceFactoryAndroid();
138 } 138 }
139 139
140 } // namespace media 140 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/video/capture/video_capture_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698