Doxygen Book
nnstreamer_conf.h
Go to the documentation of this file.
1 
33 #ifndef __GST_NNSTREAMER_CONF_H__
34 #define __GST_NNSTREAMER_CONF_H__
35 
36 #include <glib.h>
37 G_BEGIN_DECLS
38 
39 /* Hard-coded system-dependent root path prefix */
40 #ifdef G_OS_WIN32
41 #define NNSTREAMER_SYS_ROOT_PATH_PREFIX "c:\\"
42 #else
43 #define NNSTREAMER_SYS_ROOT_PATH_PREFIX "/"
44 #endif /* G_OS_WIN32 */
45 
50 #ifdef __MACOS__
51 #define NNSTREAMER_SO_FILE_EXTENSION ".dylib"
52 #else
53 #define NNSTREAMER_SO_FILE_EXTENSION ".so"
54 #endif
55 
56 /* Internal Hardcoded Values */
57 #define NNSTREAMER_DEFAULT_CONF_FILE "/etc/nnstreamer.ini"
58 #ifndef NNSTREAMER_CONF_FILE
59 #define NNSTREAMER_CONF_FILE NNSTREAMER_DEFAULT_CONF_FILE
60 #endif
61 #define NNSTREAMER_ENVVAR_CONF_FILE "NNSTREAMER_CONF"
62 
63 typedef enum {
70 
73 
74 /* struct for sub-plugins info (name and full path) */
75 typedef struct
76 {
77  gchar **names;
78  gchar **paths;
80 
86 extern gboolean
87 nnsconf_loadconf (gboolean force_reload);
88 
98 extern const gchar *
99 nnsconf_get_fullpath (const gchar * subpluginname, nnsconf_type_path type);
100 
107 extern gboolean
108 nnsconf_validate_file (nnsconf_type_path type, const gchar * fullpath);
109 
115 extern const gchar *
117 
125 extern guint
127 
144 extern gchar *
145 nnsconf_get_custom_value_string (const gchar * group, const gchar * key);
146 
164 extern gboolean
165 nnsconf_get_custom_value_bool (const gchar * group, const gchar * key, gboolean def);
166 
172 extern void
173 nnsconf_dump (gchar * str, gulong size);
174 
175 extern void
176 nnsconf_subplugin_dump (gchar * str, gulong size);
177 
178 G_END_DECLS
179 #endif /* __GST_NNSTREAMER_CONF_H__ */
nnsconf_validate_file
gboolean nnsconf_validate_file(nnsconf_type_path type, const gchar *fullpath)
Public function to validate sub-plugin library is available.
Definition: nnstreamer_conf.c:503
nnsconf_subplugin_dump
void nnsconf_subplugin_dump(gchar *str, gulong size)
Print out the information of registered sub-plugins.
Definition: nnstreamer_conf.c:695
nnsconf_get_fullpath
const gchar * nnsconf_get_fullpath(const gchar *subpluginname, nnsconf_type_path type)
Get the configured paths for the type with sub-plugin name.
Definition: nnstreamer_conf.c:483
nnsconf_get_subplugin_info
guint nnsconf_get_subplugin_info(nnsconf_type_path type, subplugin_info_s *info)
Public function to get the list of sub-plugins name and path.
Definition: nnstreamer_conf.c:528
NNSCONF_PATH_CONVERTERS
@ NNSCONF_PATH_CONVERTERS
Definition: nnstreamer_conf.h:68
NNSCONF_PATH_FILTERS
@ NNSCONF_PATH_FILTERS
Definition: nnstreamer_conf.h:64
nnsconf_get_custom_value_bool
gboolean nnsconf_get_custom_value_bool(const gchar *group, const gchar *key, gboolean def)
Get the custom configuration value from .ini and envvar. @detail For predefined configurations define...
Definition: nnstreamer_conf.c:609
NNSCONF_PATH_EASY_CUSTOM_FILTERS
@ NNSCONF_PATH_EASY_CUSTOM_FILTERS
Definition: nnstreamer_conf.h:67
NNSCONF_PATH_END
@ NNSCONF_PATH_END
Definition: nnstreamer_conf.h:71
subplugin_info_s::names
gchar ** names
Definition: nnstreamer_conf.h:77
NNSCONF_PATH_CUSTOM_FILTERS
@ NNSCONF_PATH_CUSTOM_FILTERS
Definition: nnstreamer_conf.h:66
NNSCONF_PATH_TRAINERS
@ NNSCONF_PATH_TRAINERS
Definition: nnstreamer_conf.h:69
nnsconf_type_path
nnsconf_type_path
Definition: nnstreamer_conf.h:63
nnsconf_loadconf
gboolean nnsconf_loadconf(gboolean force_reload)
Load the .ini file.
Definition: nnstreamer_conf.c:342
subplugin_info_s
Definition: nnstreamer_conf.h:75
nnsconf_get_custom_value_string
gchar * nnsconf_get_custom_value_string(const gchar *group, const gchar *key)
Get the custom configuration value from .ini and envvar. @detail For predefined configurations define...
Definition: nnstreamer_conf.c:557
nnsconf_dump
void nnsconf_dump(gchar *str, gulong size)
NNStreamer configuration dump as string.
Definition: nnstreamer_conf.c:628
NNSCONF_PATH_DECODERS
@ NNSCONF_PATH_DECODERS
Definition: nnstreamer_conf.h:65
nnsconf_get_subplugin_name_prefix
const gchar * nnsconf_get_subplugin_name_prefix(nnsconf_type_path type)
Get sub-plugin's name prefix.
Definition: nnstreamer_conf.c:516
type
svtc_1 type
Definition: gsttensor_if.c:843
subplugin_info_s::paths
gchar ** paths
Definition: nnstreamer_conf.h:78