Pawin Vongmasa | eeac97b | 2017-01-18 05:03:07 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016, The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef ANDROID_HARDWARE_MEDIA_OMX_V1_0_WOMX_H |
| 18 | #define ANDROID_HARDWARE_MEDIA_OMX_V1_0_WOMX_H |
| 19 | |
Pawin Vongmasa | eeac97b | 2017-01-18 05:03:07 -0800 | [diff] [blame] | 20 | #include <hidl/MQDescriptor.h> |
| 21 | #include <hidl/Status.h> |
| 22 | |
Pawin Vongmasa | ac7d412 | 2017-03-01 05:48:42 -0800 | [diff] [blame] | 23 | #include <media/IOMX.h> |
Pawin Vongmasa | 0d3a5ed | 2017-02-22 03:19:35 -0800 | [diff] [blame] | 24 | |
Pawin Vongmasa | 04563aa | 2017-03-09 07:02:01 -0800 | [diff] [blame] | 25 | #include <hidl/HybridInterface.h> |
Pawin Vongmasa | 0d3a5ed | 2017-02-22 03:19:35 -0800 | [diff] [blame] | 26 | #include <android/hardware/media/omx/1.0/IOmx.h> |
Pawin Vongmasa | eeac97b | 2017-01-18 05:03:07 -0800 | [diff] [blame] | 27 | |
| 28 | namespace android { |
| 29 | namespace hardware { |
| 30 | namespace media { |
| 31 | namespace omx { |
| 32 | namespace V1_0 { |
| 33 | namespace utils { |
| 34 | |
| 35 | using ::android::hardware::media::omx::V1_0::IOmx; |
| 36 | using ::android::hardware::media::omx::V1_0::IOmxNode; |
| 37 | using ::android::hardware::media::omx::V1_0::IOmxObserver; |
| 38 | using ::android::hardware::media::omx::V1_0::Status; |
| 39 | using ::android::hidl::base::V1_0::IBase; |
| 40 | using ::android::hardware::hidl_array; |
| 41 | using ::android::hardware::hidl_memory; |
| 42 | using ::android::hardware::hidl_string; |
| 43 | using ::android::hardware::hidl_vec; |
| 44 | using ::android::hardware::Return; |
| 45 | using ::android::hardware::Void; |
| 46 | using ::android::sp; |
| 47 | |
| 48 | using ::android::List; |
| 49 | using ::android::IOMX; |
Pawin Vongmasa | 8ff4018 | 2017-02-07 02:22:34 -0800 | [diff] [blame] | 50 | using ::android::BnOMX; |
Pawin Vongmasa | eeac97b | 2017-01-18 05:03:07 -0800 | [diff] [blame] | 51 | |
| 52 | /** |
| 53 | * Wrapper classes for conversion |
| 54 | * ============================== |
| 55 | * |
| 56 | * Naming convention: |
| 57 | * - LW = Legacy Wrapper --- It wraps a Treble object inside a legacy object. |
| 58 | * - TW = Treble Wrapper --- It wraps a legacy object inside a Treble object. |
| 59 | */ |
| 60 | |
Pawin Vongmasa | 8ff4018 | 2017-02-07 02:22:34 -0800 | [diff] [blame] | 61 | struct LWOmx : public BnOMX { |
Pawin Vongmasa | eeac97b | 2017-01-18 05:03:07 -0800 | [diff] [blame] | 62 | sp<IOmx> mBase; |
| 63 | LWOmx(sp<IOmx> const& base); |
| 64 | status_t listNodes(List<IOMX::ComponentInfo>* list) override; |
| 65 | status_t allocateNode( |
| 66 | char const* name, |
| 67 | sp<IOMXObserver> const& observer, |
| 68 | sp<IOMXNode>* omxNode) override; |
| 69 | status_t createInputSurface( |
| 70 | sp<::android::IGraphicBufferProducer>* bufferProducer, |
| 71 | sp<::android::IGraphicBufferSource>* bufferSource) override; |
Pawin Vongmasa | eeac97b | 2017-01-18 05:03:07 -0800 | [diff] [blame] | 72 | }; |
| 73 | |
Pawin Vongmasa | eeac97b | 2017-01-18 05:03:07 -0800 | [diff] [blame] | 74 | } // namespace utils |
| 75 | } // namespace V1_0 |
| 76 | } // namespace omx |
| 77 | } // namespace media |
| 78 | } // namespace hardware |
| 79 | } // namespace android |
| 80 | |
| 81 | #endif // ANDROID_HARDWARE_MEDIA_OMX_V1_0_WOMX_H |