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

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

Issue 1125263005: MJPEG acceleration for V4L2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 CONTENT_COMMON_GPU_MEDIA_V4L2_DEVICE_H_ 9 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_DEVICE_H_
10 #define CONTENT_COMMON_GPU_MEDIA_V4L2_DEVICE_H_ 10 #define CONTENT_COMMON_GPU_MEDIA_V4L2_DEVICE_H_
(...skipping 21 matching lines...) Expand all
32 static uint32 VideoCodecProfileToV4L2PixFmt(media::VideoCodecProfile profile, 32 static uint32 VideoCodecProfileToV4L2PixFmt(media::VideoCodecProfile profile,
33 bool slice_based); 33 bool slice_based);
34 static uint32_t V4L2PixFmtToDrmFormat(uint32_t format); 34 static uint32_t V4L2PixFmtToDrmFormat(uint32_t format);
35 // Convert format requirements requested by a V4L2 device to gfx::Size. 35 // Convert format requirements requested by a V4L2 device to gfx::Size.
36 static gfx::Size CodedSizeFromV4L2Format(struct v4l2_format format); 36 static gfx::Size CodedSizeFromV4L2Format(struct v4l2_format format);
37 37
38 enum Type { 38 enum Type {
39 kDecoder, 39 kDecoder,
40 kEncoder, 40 kEncoder,
41 kImageProcessor, 41 kImageProcessor,
42 kJpegDecoder,
42 }; 43 };
43 44
44 // Creates and initializes an appropriate V4L2Device of |type| for the 45 // Creates and initializes an appropriate V4L2Device of |type| for the
45 // current platform and returns a scoped_ptr<V4L2Device> on success, or NULL. 46 // current platform and returns a scoped_ptr<V4L2Device> on success, or NULL.
46 static scoped_refptr<V4L2Device> Create(Type type); 47 static scoped_refptr<V4L2Device> Create(Type type);
47 48
48 // Parameters and return value are the same as for the standard ioctl() system 49 // Parameters and return value are the same as for the standard ioctl() system
49 // call. 50 // call.
50 virtual int Ioctl(int request, void* arg) = 0; 51 virtual int Ioctl(int request, void* arg) = 0;
51 52
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 virtual uint32 PreferredInputFormat() = 0; 108 virtual uint32 PreferredInputFormat() = 0;
108 109
109 protected: 110 protected:
110 friend class base::RefCountedThreadSafe<V4L2Device>; 111 friend class base::RefCountedThreadSafe<V4L2Device>;
111 virtual ~V4L2Device(); 112 virtual ~V4L2Device();
112 }; 113 };
113 114
114 } // namespace content 115 } // namespace content
115 116
116 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_DEVICE_H_ 117 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698