blob: b9062f8324da47e700dd1aeec0a6cd02ad8b0d7e [file] [log] [blame]
agsantosef9f8562020-06-25 16:43:25 -04001/*
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
AGS555248cd2020-05-13 11:15:19 -040021#ifndef _PLUGINPARAMETERS_H_
22#define _PLUGINPARAMETERS_H_
23
24// #pragma once
25#include <string>
26#include <map>
27
AGS555248cd2020-05-13 11:15:19 -040028struct PluginParameters {
29 std::string stream = "out";
AGS51aa4c6d2020-05-20 15:49:11 -040030#ifdef TFLITE
agsantos66e1e4e2020-07-28 14:48:46 -040031 bool useGPU = false;
AGS51aa4c6d2020-05-20 15:49:11 -040032#ifdef __ANDROID
AGS555248cd2020-05-13 11:15:19 -040033 std::string model = "model_256_Qlatency.tflite";
AGS51aa4c6d2020-05-20 15:49:11 -040034#else
agsantos66e1e4e2020-07-28 14:48:46 -040035 std::string model = "mModel.tflite";
agsantos66b9adb2020-06-23 10:40:48 -040036#endif
AGS51aa4c6d2020-05-20 15:49:11 -040037#else
agsantos66e1e4e2020-07-28 14:48:46 -040038 #ifndef CPU
39 bool useGPU = true;
40 #else
41 bool useGPU = false;
42 #endif
43 std::string model = "mModel.pb";
AGS51aa4c6d2020-05-20 15:49:11 -040044#endif //TFLITE
45 std::string image = "background2.png";
AGS555248cd2020-05-13 11:15:19 -040046};
47
48void setGlobalPluginParameters(std::map<std::string, std::string> pp);
49
50void getGlobalPluginParameters(PluginParameters* mPluginParameters);
51PluginParameters* getGlobalPluginParameters();
52
53#endif //__PLUGINPREFERENCE_H_