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

Side by Side Diff: media/gpu/v4l2_device.h

Issue 2408703002: V4L2VideoDecodeAccelerator: implement flush by VIDIOC_DECODER_CMD. (Closed)
Patch Set: address Pawel and Kuang-che's comments 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
« no previous file with comments | « no previous file | media/gpu/v4l2_video_decode_accelerator.h » ('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 // This file defines the V4L2Device interface which is used by the 5 // This file defines the V4L2Device interface which is used by the
6 // V4L2DecodeAccelerator class to delegate/pass the device specific 6 // V4L2DecodeAccelerator class to delegate/pass the device specific
7 // handling of any of the functionalities. 7 // handling of any of the functionalities.
8 8
9 #ifndef MEDIA_GPU_V4L2_DEVICE_H_ 9 #ifndef MEDIA_GPU_V4L2_DEVICE_H_
10 #define MEDIA_GPU_V4L2_DEVICE_H_ 10 #define MEDIA_GPU_V4L2_DEVICE_H_
11 11
12 #include <stddef.h> 12 #include <stddef.h>
13 #include <stdint.h> 13 #include <stdint.h>
14 14
15 #include <linux/videodev2.h> 15 #include <linux/videodev2.h>
16 16
17 #include "base/files/scoped_file.h" 17 #include "base/files/scoped_file.h"
18 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
19 #include "media/base/video_decoder_config.h" 19 #include "media/base/video_decoder_config.h"
20 #include "media/base/video_frame.h" 20 #include "media/base/video_frame.h"
21 #include "media/gpu/media_gpu_export.h" 21 #include "media/gpu/media_gpu_export.h"
22 #include "media/video/video_decode_accelerator.h" 22 #include "media/video/video_decode_accelerator.h"
23 #include "ui/gfx/geometry/size.h" 23 #include "ui/gfx/geometry/size.h"
24 #include "ui/gl/gl_bindings.h" 24 #include "ui/gl/gl_bindings.h"
25 25
26 // TODO(posciak): remove this once V4L2 headers are updated. 26 // TODO(posciak): remove this once V4L2 headers are updated.
27 #define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0')
28 #define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4')
29 #define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F')
30 #define V4L2_PIX_FMT_MT21 v4l2_fourcc('M', 'T', '2', '1') 27 #define V4L2_PIX_FMT_MT21 v4l2_fourcc('M', 'T', '2', '1')
28 #ifndef V4L2_BUF_FLAG_LAST
29 #define V4L2_BUF_FLAG_LAST 0x00100000
30 #endif
31 31
32 namespace media { 32 namespace media {
33 33
34 class MEDIA_GPU_EXPORT V4L2Device 34 class MEDIA_GPU_EXPORT V4L2Device
35 : public base::RefCountedThreadSafe<V4L2Device> { 35 : public base::RefCountedThreadSafe<V4L2Device> {
36 public: 36 public:
37 // Utility format conversion functions 37 // Utility format conversion functions
38 static VideoPixelFormat V4L2PixFmtToVideoPixelFormat(uint32_t format); 38 static VideoPixelFormat V4L2PixFmtToVideoPixelFormat(uint32_t format);
39 static uint32_t VideoPixelFormatToV4L2PixFmt(VideoPixelFormat format); 39 static uint32_t VideoPixelFormatToV4L2PixFmt(VideoPixelFormat format);
40 static uint32_t VideoCodecProfileToV4L2PixFmt(VideoCodecProfile profile, 40 static uint32_t VideoCodecProfileToV4L2PixFmt(VideoCodecProfile profile,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 friend class base::RefCountedThreadSafe<V4L2Device>; 150 friend class base::RefCountedThreadSafe<V4L2Device>;
151 explicit V4L2Device(Type type); 151 explicit V4L2Device(Type type);
152 virtual ~V4L2Device(); 152 virtual ~V4L2Device();
153 153
154 const Type type_; 154 const Type type_;
155 }; 155 };
156 156
157 } // namespace media 157 } // namespace media
158 158
159 #endif // MEDIA_GPU_V4L2_DEVICE_H_ 159 #endif // MEDIA_GPU_V4L2_DEVICE_H_
OLDNEW
« no previous file with comments | « no previous file | media/gpu/v4l2_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698