blob: f13546e1e04955019c26c1ce35c44b0001baf885 [file] [log] [blame]
Pawin Vongmasaeeac97b2017-01-18 05:03:07 -08001/*
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 Vongmasaeeac97b2017-01-18 05:03:07 -080020#include <hidl/MQDescriptor.h>
21#include <hidl/Status.h>
22
Pawin Vongmasaac7d4122017-03-01 05:48:42 -080023#include <media/IOMX.h>
Pawin Vongmasa0d3a5ed2017-02-22 03:19:35 -080024
Pawin Vongmasa04563aa2017-03-09 07:02:01 -080025#include <hidl/HybridInterface.h>
Pawin Vongmasa0d3a5ed2017-02-22 03:19:35 -080026#include <android/hardware/media/omx/1.0/IOmx.h>
Pawin Vongmasaeeac97b2017-01-18 05:03:07 -080027
28namespace android {
29namespace hardware {
30namespace media {
31namespace omx {
32namespace V1_0 {
33namespace utils {
34
35using ::android::hardware::media::omx::V1_0::IOmx;
36using ::android::hardware::media::omx::V1_0::IOmxNode;
37using ::android::hardware::media::omx::V1_0::IOmxObserver;
38using ::android::hardware::media::omx::V1_0::Status;
39using ::android::hidl::base::V1_0::IBase;
40using ::android::hardware::hidl_array;
41using ::android::hardware::hidl_memory;
42using ::android::hardware::hidl_string;
43using ::android::hardware::hidl_vec;
44using ::android::hardware::Return;
45using ::android::hardware::Void;
46using ::android::sp;
47
48using ::android::List;
49using ::android::IOMX;
Pawin Vongmasa8ff40182017-02-07 02:22:34 -080050using ::android::BnOMX;
Pawin Vongmasaeeac97b2017-01-18 05:03:07 -080051
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 Vongmasa8ff40182017-02-07 02:22:34 -080061struct LWOmx : public BnOMX {
Pawin Vongmasaeeac97b2017-01-18 05:03:07 -080062 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 Vongmasaeeac97b2017-01-18 05:03:07 -080072};
73
Pawin Vongmasaeeac97b2017-01-18 05:03:07 -080074} // 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