OLD | NEW |
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // Get minimum and maximum resolution for fourcc |pixelformat| and store to | 116 // Get minimum and maximum resolution for fourcc |pixelformat| and store to |
117 // |min_resolution| and |max_resolution|. | 117 // |min_resolution| and |max_resolution|. |
118 void GetSupportedResolution(uint32_t pixelformat, gfx::Size* min_resolution, | 118 void GetSupportedResolution(uint32_t pixelformat, gfx::Size* min_resolution, |
119 gfx::Size* max_resolution); | 119 gfx::Size* max_resolution); |
120 | 120 |
121 // Return supported profiles for decoder, including only profiles for given | 121 // Return supported profiles for decoder, including only profiles for given |
122 // fourcc |pixelformats|. | 122 // fourcc |pixelformats|. |
123 media::VideoDecodeAccelerator::SupportedProfiles GetSupportedDecodeProfiles( | 123 media::VideoDecodeAccelerator::SupportedProfiles GetSupportedDecodeProfiles( |
124 const size_t num_formats, const uint32_t pixelformats[]); | 124 const size_t num_formats, const uint32_t pixelformats[]); |
125 | 125 |
| 126 // Return true if the device supports |profile|, taking into account only |
| 127 // fourccs from the given array of |pixelformats| of size |num_formats|. |
| 128 bool SupportsDecodeProfileForV4L2PixelFormats( |
| 129 media::VideoCodecProfile profile, |
| 130 const size_t num_formats, |
| 131 const uint32_t pixelformats[]); |
| 132 |
126 protected: | 133 protected: |
127 friend class base::RefCountedThreadSafe<V4L2Device>; | 134 friend class base::RefCountedThreadSafe<V4L2Device>; |
128 explicit V4L2Device(Type type); | 135 explicit V4L2Device(Type type); |
129 virtual ~V4L2Device(); | 136 virtual ~V4L2Device(); |
130 | 137 |
131 const Type type_; | 138 const Type type_; |
132 }; | 139 }; |
133 | 140 |
134 } // namespace content | 141 } // namespace content |
135 | 142 |
136 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_DEVICE_H_ | 143 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_DEVICE_H_ |
OLD | NEW |