blob: 244176aa1acf70aab3ae8267d9b1eb1b5638e8f0 [file] [log] [blame]
Mikhail Naganov4a3d5c22016-08-15 13:47:42 -07001/*
2 * Copyright (C) 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_EFFECTS_FACTORY_HAL_LOCAL_H
18#define ANDROID_HARDWARE_EFFECTS_FACTORY_HAL_LOCAL_H
19
20#include "EffectsFactoryHalInterface.h"
21
22namespace android {
23
24class EffectsFactoryHalLocal : public EffectsFactoryHalInterface
25{
26 public:
27 virtual ~EffectsFactoryHalLocal() {}
28
29 // Returns the number of different effects in all loaded libraries.
30 virtual status_t queryNumberEffects(uint32_t *pNumEffects);
31
32 // Returns a descriptor of the next available effect.
33 virtual status_t getDescriptor(uint32_t index,
34 effect_descriptor_t *pDescriptor);
35
36 virtual status_t getDescriptor(const effect_uuid_t *pEffectUuid,
37 effect_descriptor_t *pDescriptor);
38
39 // Creates an effect engine of the specified type.
40 // To release the effect engine, it is necessary to release references
41 // to the returned effect object.
42 virtual status_t createEffect(const effect_uuid_t *pEffectUuid,
43 int32_t sessionId, int32_t ioId,
44 sp<EffectHalInterface> *effect);
45
46 virtual status_t dumpEffects(int fd);
47
48 private:
49 friend class EffectsFactoryHalInterface;
50
51 // Can not be constructed directly by clients.
52 EffectsFactoryHalLocal() {}
53};
54
55} // namespace android
56
57#endif // ANDROID_HARDWARE_EFFECTS_FACTORY_HAL_LOCAL_H