John Ye | 1503c6b | 2015-01-22 13:26:33 +0800 | [diff] [blame] | 1 | /* |
| 2 | * drm_v4l2_buffer.h - drm v4l2 buffer |
| 3 | * |
| 4 | * Copyright (c) 2015 Intel Corporation |
| 5 | * |
| 6 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | * you may not use this file except in compliance with the License. |
| 8 | * You may obtain a copy of the License at |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, software |
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | * See the License for the specific language governing permissions and |
| 16 | * limitations under the License. |
| 17 | * |
| 18 | * Author: Wind Yuan <feng.yuan@intel.com> |
| 19 | * Author: John Ye <john.ye@intel.com> |
| 20 | */ |
| 21 | |
| 22 | #ifndef XCAM_DRM_V4L2_BUFFER_H |
| 23 | #define XCAM_DRM_V4L2_BUFFER_H |
| 24 | |
Wind Yuan | 8810a79 | 2015-01-22 15:20:23 +0800 | [diff] [blame] | 25 | #include "xcam_utils.h" |
John Ye | 1503c6b | 2015-01-22 13:26:33 +0800 | [diff] [blame] | 26 | #include "v4l2_buffer_proxy.h" |
| 27 | #include "drm_display.h" |
| 28 | |
| 29 | namespace XCam { |
| 30 | |
| 31 | class AtomispDevice; |
| 32 | |
| 33 | class DrmV4l2Buffer |
| 34 | : public V4l2Buffer |
| 35 | { |
| 36 | public: |
| 37 | explicit DrmV4l2Buffer ( |
| 38 | uint32_t gem_handle, |
| 39 | const struct v4l2_buffer &buf, |
| 40 | const struct v4l2_format &format, |
Wind Yuan | 25aed2b | 2015-02-10 17:46:23 +0800 | [diff] [blame] | 41 | SmartPtr<DrmDisplay> &display |
John Ye | 1503c6b | 2015-01-22 13:26:33 +0800 | [diff] [blame] | 42 | ) |
| 43 | : V4l2Buffer (buf, format) |
| 44 | , _gem_handle (gem_handle) |
John Ye | 1503c6b | 2015-01-22 13:26:33 +0800 | [diff] [blame] | 45 | , _display (display) |
| 46 | {} |
| 47 | ~DrmV4l2Buffer (); |
| 48 | |
| 49 | private: |
| 50 | XCAM_DEAD_COPY (DrmV4l2Buffer); |
| 51 | |
| 52 | private: |
| 53 | uint32_t _gem_handle; |
Wind Yuan | 25aed2b | 2015-02-10 17:46:23 +0800 | [diff] [blame] | 54 | SmartPtr<DrmDisplay> _display; |
John Ye | 1503c6b | 2015-01-22 13:26:33 +0800 | [diff] [blame] | 55 | }; |
| 56 | |
| 57 | }; |
| 58 | |
| 59 | #endif // XCAM_DRM_V4L2_BUFFER_H |