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

Side by Side Diff: content/common/gpu/media/v4l2_device.cc

Issue 795633005: Add VDA supported profile to GPUInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 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 <libdrm/drm_fourcc.h> 5 #include <libdrm/drm_fourcc.h>
6 #include <linux/videodev2.h> 6 #include <linux/videodev2.h>
7 7
8 #include "base/numerics/safe_conversions.h" 8 #include "base/numerics/safe_conversions.h"
9 #include "content/common/gpu/media/generic_v4l2_device.h" 9 #include "content/common/gpu/media/generic_v4l2_device.h"
10 #if defined(ARCH_CPU_ARMEL) 10 #if defined(ARCH_CPU_ARMEL)
11 #include "content/common/gpu/media/tegra_v4l2_device.h" 11 #include "content/common/gpu/media/tegra_v4l2_device.h"
12 #endif 12 #endif
13 13
14 // TODO(posciak): remove this once V4L2 headers are updated.
15 #define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0')
16 #define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4')
17 #define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F')
18
19 namespace content { 14 namespace content {
20 15
21 V4L2Device::~V4L2Device() { 16 V4L2Device::~V4L2Device() {
22 } 17 }
23 18
24 // static 19 // static
25 scoped_refptr<V4L2Device> V4L2Device::Create(Type type) { 20 scoped_refptr<V4L2Device> V4L2Device::Create(Type type) {
26 DVLOG(3) << __PRETTY_FUNCTION__; 21 DVLOG(3) << __PRETTY_FUNCTION__;
27 22
28 scoped_refptr<GenericV4L2Device> generic_device(new GenericV4L2Device(type)); 23 scoped_refptr<GenericV4L2Device> generic_device(new GenericV4L2Device(type));
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // Sanity checks. Calculated coded size has to contain given visible size 191 // Sanity checks. Calculated coded size has to contain given visible size
197 // and fulfill buffer byte size requirements. 192 // and fulfill buffer byte size requirements.
198 DCHECK(gfx::Rect(coded_size).Contains(gfx::Rect(visible_size))); 193 DCHECK(gfx::Rect(coded_size).Contains(gfx::Rect(visible_size)));
199 DCHECK_LE(sizeimage, 194 DCHECK_LE(sizeimage,
200 media::VideoFrame::AllocationSize(frame_format, coded_size)); 195 media::VideoFrame::AllocationSize(frame_format, coded_size));
201 196
202 return coded_size; 197 return coded_size;
203 } 198 }
204 199
205 } // namespace content 200 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698