agsantos | ef9f856 | 2020-06-25 16:43:25 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2004-2020 Savoir-faire Linux Inc. |
| 3 | * |
| 4 | * Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 3 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 19 | */ |
| 20 | |
AGS5 | 55248cd | 2020-05-13 11:15:19 -0400 | [diff] [blame] | 21 | #ifndef _PLUGINPARAMETERS_H_ |
| 22 | #define _PLUGINPARAMETERS_H_ |
| 23 | |
| 24 | // #pragma once |
| 25 | #include <string> |
| 26 | #include <map> |
| 27 | |
AGS5 | 55248cd | 2020-05-13 11:15:19 -0400 | [diff] [blame] | 28 | struct PluginParameters { |
| 29 | std::string stream = "out"; |
AGS5 | 1aa4c6d | 2020-05-20 15:49:11 -0400 | [diff] [blame] | 30 | #ifdef TFLITE |
agsantos | 66e1e4e | 2020-07-28 14:48:46 -0400 | [diff] [blame^] | 31 | bool useGPU = false; |
AGS5 | 1aa4c6d | 2020-05-20 15:49:11 -0400 | [diff] [blame] | 32 | #ifdef __ANDROID |
AGS5 | 55248cd | 2020-05-13 11:15:19 -0400 | [diff] [blame] | 33 | std::string model = "model_256_Qlatency.tflite"; |
AGS5 | 1aa4c6d | 2020-05-20 15:49:11 -0400 | [diff] [blame] | 34 | #else |
agsantos | 66e1e4e | 2020-07-28 14:48:46 -0400 | [diff] [blame^] | 35 | std::string model = "mModel.tflite"; |
agsantos | 66b9adb | 2020-06-23 10:40:48 -0400 | [diff] [blame] | 36 | #endif |
AGS5 | 1aa4c6d | 2020-05-20 15:49:11 -0400 | [diff] [blame] | 37 | #else |
agsantos | 66e1e4e | 2020-07-28 14:48:46 -0400 | [diff] [blame^] | 38 | #ifndef CPU |
| 39 | bool useGPU = true; |
| 40 | #else |
| 41 | bool useGPU = false; |
| 42 | #endif |
| 43 | std::string model = "mModel.pb"; |
AGS5 | 1aa4c6d | 2020-05-20 15:49:11 -0400 | [diff] [blame] | 44 | #endif //TFLITE |
| 45 | std::string image = "background2.png"; |
AGS5 | 55248cd | 2020-05-13 11:15:19 -0400 | [diff] [blame] | 46 | }; |
| 47 | |
| 48 | void setGlobalPluginParameters(std::map<std::string, std::string> pp); |
| 49 | |
| 50 | void getGlobalPluginParameters(PluginParameters* mPluginParameters); |
| 51 | PluginParameters* getGlobalPluginParameters(); |
| 52 | |
| 53 | #endif //__PLUGINPREFERENCE_H_ |