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

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

Issue 2408703002: V4L2VideoDecodeAccelerator: implement flush by VIDIOC_DECODER_CMD. (Closed)
Patch Set: add V4L2_DEC_CMD_START back because it works now 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 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') 27 #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')
Pawel Osciak 2016/10/19 09:23:04 Why remove VP8F, but not S264? I think they should
wuchengli 2016/10/20 10:14:06 You are right. I checked again and S264 is in thir
30 #define V4L2_PIX_FMT_MT21 v4l2_fourcc('M', 'T', '2', '1') 28 #define V4L2_PIX_FMT_MT21 v4l2_fourcc('M', 'T', '2', '1')
29 #ifndef V4L2_BUF_FLAG_LAST
30 #define V4L2_BUF_FLAG_LAST 0x00100000
31 #endif
31 32
32 namespace media { 33 namespace media {
33 34
34 class MEDIA_GPU_EXPORT V4L2Device 35 class MEDIA_GPU_EXPORT V4L2Device
35 : public base::RefCountedThreadSafe<V4L2Device> { 36 : public base::RefCountedThreadSafe<V4L2Device> {
36 public: 37 public:
37 // Utility format conversion functions 38 // Utility format conversion functions
38 static VideoPixelFormat V4L2PixFmtToVideoPixelFormat(uint32_t format); 39 static VideoPixelFormat V4L2PixFmtToVideoPixelFormat(uint32_t format);
39 static uint32_t VideoPixelFormatToV4L2PixFmt(VideoPixelFormat format); 40 static uint32_t VideoPixelFormatToV4L2PixFmt(VideoPixelFormat format);
40 static uint32_t VideoCodecProfileToV4L2PixFmt(VideoCodecProfile profile, 41 static uint32_t VideoCodecProfileToV4L2PixFmt(VideoCodecProfile profile,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 friend class base::RefCountedThreadSafe<V4L2Device>; 151 friend class base::RefCountedThreadSafe<V4L2Device>;
151 explicit V4L2Device(Type type); 152 explicit V4L2Device(Type type);
152 virtual ~V4L2Device(); 153 virtual ~V4L2Device();
153 154
154 const Type type_; 155 const Type type_;
155 }; 156 };
156 157
157 } // namespace media 158 } // namespace media
158 159
159 #endif // MEDIA_GPU_V4L2_DEVICE_H_ 160 #endif // MEDIA_GPU_V4L2_DEVICE_H_
OLDNEW
« no previous file with comments | « no previous file | media/gpu/v4l2_video_decode_accelerator.h » ('j') | media/gpu/v4l2_video_decode_accelerator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698