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

Unified Diff: media/video/capture/android/imageformat_list.h

Issue 23903032: Move NV21 colorspace treatment from VideoCapture java to C++ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try again uploading - didn't work :( 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 side-by-side diff with in-line comments
Download patch
Index: media/video/capture/android/imageformat_list.h
diff --git a/media/video/capture/android/imageformat_list.h b/media/video/capture/android/imageformat_list.h
new file mode 100644
index 0000000000000000000000000000000000000000..a20b0f2f480441fafbf69c9733f6b6bd750ed97f
--- /dev/null
+++ b/media/video/capture/android/imageformat_list.h
@@ -0,0 +1,22 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file intentionally does not have header guards, it's included
+// inside a macro to generate enum and a java class for the values.
+
+#ifndef DEFINE_ANDROID_IMAGEFORMAT
+#error "DEFINE_ANDROID_IMAGEFORMAT should be defined."
+#endif
+
+// Android graphics ImageFormat mapping, see reference in:
+// http://developer.android.com/reference/android/graphics/ImageFormat.html
+
+DEFINE_ANDROID_IMAGEFORMAT(ANDROID_IMAGEFORMAT_JPEG, 0)
Ami GONE FROM CHROMIUM 2013/09/12 17:03:16 If you used the same values that the SDK uses (i.e
mcasas 2013/09/13 08:42:51 Do you mean hardcoding the ImageFormat.xyz values?
Ami GONE FROM CHROMIUM 2013/09/13 17:29:00 You are already hard-coding values of -1..5. I'm
mcasas 2013/09/16 08:43:02 Done not making up new numbers for the imageformat
bulach 2013/09/16 08:45:02 hey Ami, Miguel, I think I should clarify a bit m
+DEFINE_ANDROID_IMAGEFORMAT(ANDROID_IMAGEFORMAT_NV16, 1)
+DEFINE_ANDROID_IMAGEFORMAT(ANDROID_IMAGEFORMAT_NV21, 2)
+DEFINE_ANDROID_IMAGEFORMAT(ANDROID_IMAGEFORMAT_RGB_565, 3)
+DEFINE_ANDROID_IMAGEFORMAT(ANDROID_IMAGEFORMAT_YUY2, 4)
+DEFINE_ANDROID_IMAGEFORMAT(ANDROID_IMAGEFORMAT_YV12, 5)
+
+DEFINE_ANDROID_IMAGEFORMAT(ANDROID_IMAGEFORMAT_UNKNOWN, -1)

Powered by Google App Engine
This is Rietveld 408576698