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

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

Issue 2121043002: 16 bpp video stream capture, render and WebGL usage - Realsense R200 & SR300 support. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 2 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/capture/video/video_capture_device.h" 5 #include "media/capture/video/video_capture_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 25 matching lines...) Expand all
36 #include "media/capture/video/mac/video_capture_device_factory_mac.h" 36 #include "media/capture/video/mac/video_capture_device_factory_mac.h"
37 #endif 37 #endif
38 38
39 #if defined(OS_ANDROID) 39 #if defined(OS_ANDROID)
40 #include "base/android/jni_android.h" 40 #include "base/android/jni_android.h"
41 #include "base/android/build_info.h" 41 #include "base/android/build_info.h"
42 #include "media/capture/video/android/video_capture_device_android.h" 42 #include "media/capture/video/android/video_capture_device_android.h"
43 #include "media/capture/video/android/video_capture_device_factory_android.h" 43 #include "media/capture/video/android/video_capture_device_factory_android.h"
44 #endif 44 #endif
45 45
46 #if defined(OS_LINUX) || defined(OS_CHROMEOS)
47 #include "media/capture/video/linux/v4l2_capture_delegate.h"
48 #include "media/capture/video/video_capture_utils.h"
49 #endif
50
46 #if defined(OS_MACOSX) 51 #if defined(OS_MACOSX)
47 // Mac will always give you the size you ask for and this case will fail. 52 // Mac will always give you the size you ask for and this case will fail.
48 #define MAYBE_AllocateBadSize DISABLED_AllocateBadSize 53 #define MAYBE_AllocateBadSize DISABLED_AllocateBadSize
49 // We will always get YUYV from the Mac AVFoundation implementations. 54 // We will always get YUYV from the Mac AVFoundation implementations.
50 #define MAYBE_CaptureMjpeg DISABLED_CaptureMjpeg 55 #define MAYBE_CaptureMjpeg DISABLED_CaptureMjpeg
51 #define MAYBE_TakePhoto TakePhoto 56 #define MAYBE_TakePhoto TakePhoto
52 #define MAYBE_GetPhotoCapabilities DISABLED_GetPhotoCapabilities 57 #define MAYBE_GetPhotoCapabilities DISABLED_GetPhotoCapabilities
53 #elif defined(OS_WIN) 58 #elif defined(OS_WIN)
54 #define MAYBE_AllocateBadSize AllocateBadSize 59 #define MAYBE_AllocateBadSize AllocateBadSize
55 #define MAYBE_CaptureMjpeg CaptureMjpeg 60 #define MAYBE_CaptureMjpeg CaptureMjpeg
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 .WillOnce(RunClosure(quit_closure)); 634 .WillOnce(RunClosure(quit_closure));
630 635
631 device->GetPhotoCapabilities(std::move(scoped_get_callback)); 636 device->GetPhotoCapabilities(std::move(scoped_get_callback));
632 run_loop.Run(); 637 run_loop.Run();
633 638
634 ASSERT_TRUE(image_capture_client_->capabilities()); 639 ASSERT_TRUE(image_capture_client_->capabilities());
635 640
636 device->StopAndDeAllocate(); 641 device->StopAndDeAllocate();
637 } 642 }
638 643
644 #if defined(OS_LINUX) || defined(OS_CHROMEOS)
645 TEST_F(VideoCaptureDeviceTest, IsY16FormatFourCcTest) {
646 // TODO(astojilj): Remove ifdefs when videodev2.h gets updated.
647 #ifdef V4L2_PIX_FMT_Z16
648 DCHECK(IsY16FormatFourCc(V4L2_PIX_FMT_Z16));
649 #endif
650 #ifdef V4L2_PIX_FMT_INVZ
651 DCHECK(IsY16FormatFourCc(V4L2_PIX_FMT_INVZ));
652 #endif
653 DCHECK(IsY16FormatFourCc(V4L2_PIX_FMT_Y16));
654 DCHECK(!IsY16FormatFourCc(V4L2_PIX_FMT_YUV420));
655 }
656 #endif
657
639 }; // namespace media 658 }; // namespace media
OLDNEW
« no previous file with comments | « media/capture/video/video_capture_device_client.cc ('k') | media/capture/video/video_capture_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698