Chromium Code Reviews| 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_ |
| 11 | 11 |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "media/base/video_decoder_config.h" | 14 #include "media/base/video_decoder_config.h" |
| 15 #include "media/base/video_frame.h" | 15 #include "media/base/video_frame.h" |
| 16 #include "media/video/video_decode_accelerator.h" | |
| 16 #include "ui/gfx/geometry/size.h" | 17 #include "ui/gfx/geometry/size.h" |
| 17 #include "ui/gl/gl_bindings.h" | 18 #include "ui/gl/gl_bindings.h" |
| 18 | 19 |
| 19 // TODO(posciak): remove this once V4L2 headers are updated. | 20 // TODO(posciak): remove this once V4L2 headers are updated. |
| 20 #define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0') | 21 #define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0') |
| 21 #define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') | 22 #define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') |
| 22 #define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F') | 23 #define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F') |
| 23 | 24 |
| 24 namespace content { | 25 namespace content { |
| 25 | 26 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 99 // Destroys the EGLImageKHR. | 100 // Destroys the EGLImageKHR. |
| 100 virtual EGLBoolean DestroyEGLImage(EGLDisplay egl_display, | 101 virtual EGLBoolean DestroyEGLImage(EGLDisplay egl_display, |
| 101 EGLImageKHR egl_image) = 0; | 102 EGLImageKHR egl_image) = 0; |
| 102 | 103 |
| 103 // Returns the supported texture target for the V4L2Device. | 104 // Returns the supported texture target for the V4L2Device. |
| 104 virtual GLenum GetTextureTarget() = 0; | 105 virtual GLenum GetTextureTarget() = 0; |
| 105 | 106 |
| 106 // Returns the preferred V4L2 input format or 0 if don't care. | 107 // Returns the preferred V4L2 input format or 0 if don't care. |
| 107 virtual uint32 PreferredInputFormat() = 0; | 108 virtual uint32 PreferredInputFormat() = 0; |
| 108 | 109 |
| 110 // Get maximum resolution for fourcc format. | |
| 111 gfx::Size GetMaxSupportedResolution(uint32_t pixelformat); | |
| 112 | |
| 113 // Get supported profiles for decoder according to |fourcc_formats|. | |
| 114 media::VideoDecodeAccelerator::SupportedProfiles GetSupportedDecodeProfiles( | |
| 115 std::vector<uint32_t> fourcc_formats); | |
|
wuchengli
2015/04/23 07:11:44
const &.
s/fourcc_formats/pixelformats/. The nami
henryhsu
2015/04/23 08:21:54
Done.
| |
| 116 | |
| 109 protected: | 117 protected: |
| 110 friend class base::RefCountedThreadSafe<V4L2Device>; | 118 friend class base::RefCountedThreadSafe<V4L2Device>; |
| 111 virtual ~V4L2Device(); | 119 virtual ~V4L2Device(); |
| 112 }; | 120 }; |
| 113 | 121 |
| 114 } // namespace content | 122 } // namespace content |
| 115 | 123 |
| 116 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_DEVICE_H_ | 124 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_DEVICE_H_ |
| OLD | NEW |