mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
handdetect: check for haar cascade files path
When running GStreamer from uninstalled sources, the location of the haar cascade files will be local. Check if running in uninstalled and set the file paths accordingly.
This commit is contained in:
parent
40a63d27d8
commit
9bb76699e0
1 changed files with 11 additions and 2 deletions
|
@ -261,8 +261,17 @@ gst_handdetect_class_init (GstHanddetectClass * klass)
|
|||
static void
|
||||
gst_handdetect_init (GstHanddetect * filter)
|
||||
{
|
||||
const gchar *haar_path;
|
||||
|
||||
haar_path = g_getenv ("GST_HAAR_CASCADES_PATH");
|
||||
if (haar_path) {
|
||||
filter->profile_fist = g_build_filename (haar_path, "fist.xml", NULL);
|
||||
filter->profile_palm = g_build_filename (haar_path, "palm.xml", NULL);
|
||||
} else {
|
||||
filter->profile_fist = g_strdup (HAAR_FILE_FIST);
|
||||
filter->profile_palm = g_strdup (HAAR_FILE_PALM);
|
||||
}
|
||||
|
||||
filter->roi_x = 0;
|
||||
filter->roi_y = 0;
|
||||
filter->roi_width = 0;
|
||||
|
|
Loading…
Reference in a new issue