blob: 014eb466c16559bd1186e6bdc0fdd2749af696f8 [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
agsantos66b9adb2020-06-23 10:40:48 -040031 bool useGPU = false; //only used when on desktop
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
35 std::string model = "model_256_F_16.tflite";
agsantos66b9adb2020-06-23 10:40:48 -040036#endif
AGS51aa4c6d2020-05-20 15:49:11 -040037#else
agsantos66b9adb2020-06-23 10:40:48 -040038 bool useGPU = true; //only used when on desktop
AGS51aa4c6d2020-05-20 15:49:11 -040039 std::string model = "frozen_inference_graph.pb";
40#endif //TFLITE
41 std::string image = "background2.png";
AGS555248cd2020-05-13 11:15:19 -040042};
43
44void setGlobalPluginParameters(std::map<std::string, std::string> pp);
45
46void getGlobalPluginParameters(PluginParameters* mPluginParameters);
47PluginParameters* getGlobalPluginParameters();
48
49#endif //__PLUGINPREFERENCE_H_