blob: 935c433f9812399da66484f70c6a68b85d4489b4 [file] [log] [blame]
agsantos5aa39652020-08-11 18:18:04 -04001/**
Sébastien Blincb783e32021-02-12 11:34:10 -05002 * Copyright (C) 2020-2021 Savoir-faire Linux Inc.
agsantosef9f8562020-06-25 16:43:25 -04003 *
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
AGS555248cd2020-05-13 11:15:19 -040024#include <string>
25#include <map>
26
agsantosac1940d2020-09-17 10:18:40 -040027struct PluginParameters
28{
AGS555248cd2020-05-13 11:15:19 -040029 std::string stream = "out";
AGS51aa4c6d2020-05-20 15:49:11 -040030#ifdef TFLITE
agsantos66e1e4e2020-07-28 14:48:46 -040031 bool useGPU = false;
agsantos66e1e4e2020-07-28 14:48:46 -040032 std::string model = "mModel.tflite";
AGS51aa4c6d2020-05-20 15:49:11 -040033#else
agsantosac1940d2020-09-17 10:18:40 -040034#ifndef CPU
35 bool useGPU = true;
36#else
37 bool useGPU = false;
38#endif
39 std::string model = "mModel.pb";
40#endif // TFLITE
AGS51aa4c6d2020-05-20 15:49:11 -040041 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_