-
Notifications
You must be signed in to change notification settings - Fork 4
/
gst-plugins-bad-1.8.x.patch
410 lines (389 loc) · 13.8 KB
/
gst-plugins-bad-1.8.x.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
--- ext/daala/gstdaaladec.c Thu Mar 24 18:36:40 2016
+++ ext/daala/gstdaaladec.c Sat Sep 03 01:35:36 2016
@@ -122,7 +122,7 @@
GST_DEBUG_FUNCPTR (daala_dec_decide_allocation);
GST_DEBUG_CATEGORY_INIT (daaladec_debug, "daaladec", 0, "Daala decoder");
- GST_DEBUG_CATEGIRY_GET (CAT_PERFORMANCE, "GST_PERFORMANCE");
+ GST_DEBUG_CATEGORY_GET (CAT_PERFORMANCE, "GST_PERFORMANCE");
}
static void
--- ext/dtls/gstdtlscertificate.c Thu Mar 24 18:36:40 2016
+++ ext/dtls/gstdtlscertificate.c Sat Sep 03 01:35:36 2016
@@ -45,6 +45,11 @@
#endif
#endif
+#ifdef G_OS_WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+
#include <openssl/ssl.h>
GST_DEBUG_CATEGORY_STATIC (gst_dtls_certificate_debug);
--- ext/ladspa/gstladspa.c Thu Mar 24 18:36:40 2016
+++ ext/ladspa/gstladspa.c Sat Sep 03 01:35:36 2016
@@ -149,6 +149,21 @@
"/usr/local/lib/ladspa" G_SEARCHPATH_SEPARATOR_S \
LIBDIR "/ladspa"
+#ifdef G_OS_WIN32
+#include <windows.h>
+HMODULE gstl_dll = NULL;
+BOOL WINAPI
+DllMain (HINSTANCE hinstDLL,
+ DWORD fdwReason,
+ LPVOID lpvReserved)
+{
+ if (fdwReason == DLL_PROCESS_ATTACH)
+ gstl_dll = hinstDLL;
+
+ return TRUE;
+}
+#endif
+
GstStructure *ladspa_meta_all = NULL;
static void
@@ -342,7 +357,11 @@
g_strdup_printf ("%s" G_SEARCHPATH_SEPARATOR_S GST_LADSPA_DEFAULT_PATH,
search_path);
} else {
+#ifdef G_OS_WIN32
+ ladspa_path = g_build_filename (g_win32_get_package_installation_directory_of_module (gstl_dll),"..","ladspa", NULL);
+#else
ladspa_path = g_strdup (GST_LADSPA_DEFAULT_PATH);
+#endif
}
paths = g_strsplit (ladspa_path, G_SEARCHPATH_SEPARATOR_S, 0);
@@ -404,7 +423,14 @@
#ifdef ENABLE_NLS
GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
LOCALEDIR);
+#ifdef G_OS_WIN32
+ gchar *_glib_get_locale_dir (void);
+ gchar *localedir = _glib_get_locale_dir ();
+ bindtextdomain (GETTEXT_PACKAGE, localedir);
+ g_free (localedir);
+#else
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+#endif
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif
--- ext/neon/gstneonhttpsrc.c Thu Mar 24 18:36:40 2016
+++ ext/neon/gstneonhttpsrc.c Sat Sep 03 01:35:36 2016
@@ -1100,6 +1100,23 @@
static gboolean
plugin_init (GstPlugin * plugin)
{
+#ifdef G_OS_WIN32
+ gchar * cafile = NULL;
+ gchar * set_necabundle_env;
+ const gchar * const *dirs = g_get_system_data_dirs();
+ int i;
+
+ for (i = 0; dirs[i]; ++i) {
+ cafile = g_build_filename (dirs[i], "ssl", "curl-ca-bundle.crt", NULL);
+ if (!g_file_test (cafile, G_FILE_TEST_IS_REGULAR))
+ g_free (cafile);
+ else {
+ set_necabundle_env = g_strconcat("NE_SSL_CA_BUNDLE=",cafile,NULL);
+ putenv(set_necabundle_env);
+ g_free(set_necabundle_env);
+ }
+ }
+#endif
GST_DEBUG_CATEGORY_INIT (neonhttpsrc_debug, "neonhttpsrc", 0,
"NEON HTTP src");
--- ext/openal/gstopenal.c Thu Mar 24 18:36:40 2016
+++ ext/openal/gstopenal.c Sat Sep 03 01:35:36 2016
@@ -47,7 +47,14 @@
#ifdef ENABLE_NLS
GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
LOCALEDIR);
+#ifdef G_OS_WIN32
+ gchar *_glib_get_locale_dir (void);
+ gchar *localedir = _glib_get_locale_dir ();
+ bindtextdomain (GETTEXT_PACKAGE, localedir);
+ g_free (localedir);
+#else
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+#endif
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif
--- ext/opencv/gstfaceblur.cpp Thu Mar 24 18:36:40 2016
+++ ext/opencv/gstfaceblur.cpp Sat Sep 03 01:35:36 2016
@@ -70,9 +70,13 @@
GST_DEBUG_CATEGORY_STATIC (gst_face_blur_debug);
#define GST_CAT_DEFAULT gst_face_blur_debug
+#ifdef G_OS_WIN32
+static gchar *DEFAULT_PROFILE = NULL;
+#else
#define DEFAULT_PROFILE OPENCV_PREFIX G_DIR_SEPARATOR_S "share" \
G_DIR_SEPARATOR_S OPENCV_PATH_NAME G_DIR_SEPARATOR_S "haarcascades" \
G_DIR_SEPARATOR_S "haarcascade_frontalface_default.xml"
+#endif
#define DEFAULT_SCALE_FACTOR 1.25
#define DEFAULT_FLAGS CV_HAAR_DO_CANNY_PRUNING
#define DEFAULT_MIN_NEIGHBORS 3
@@ -399,6 +403,16 @@
gboolean
gst_face_blur_plugin_init (GstPlugin * plugin)
{
+#ifdef G_OS_WIN32
+ const gchar * const *dirs = g_get_system_data_dirs();
+ int i;
+ for (i = 0; dirs[i]; ++i) {
+ DEFAULT_PROFILE = g_build_filename (dirs[i], "opencv", "haarcascades", "haarcascade_frontalface_default.xml", NULL);
+ if (!g_file_test (DEFAULT_PROFILE, G_FILE_TEST_IS_REGULAR)) {
+ g_free (DEFAULT_PROFILE);
+ }
+ }
+#endif
/* debug category for filtering log messages */
GST_DEBUG_CATEGORY_INIT (gst_face_blur_debug, "faceblur",
0, "Blurs faces in images and videos");
--- ext/opencv/gstfacedetect.cpp Thu Mar 24 18:36:40 2016
+++ ext/opencv/gstfacedetect.cpp Sat Sep 03 01:35:36 2016
@@ -87,10 +87,17 @@
#define HAAR_CASCADES_DIR OPENCV_PREFIX G_DIR_SEPARATOR_S "share" \
G_DIR_SEPARATOR_S OPENCV_PATH_NAME G_DIR_SEPARATOR_S "haarcascades" \
G_DIR_SEPARATOR_S
+#ifdef G_OS_WIN32
+static gchar *DEFAULT_FACE_PROFILE = NULL;
+static gchar *DEFAULT_NOSE_PROFILE = NULL;
+static gchar *DEFAULT_MOUTH_PROFILE = NULL;
+static gchar *DEFAULT_EYES_PROFILE = NULL;
+#else
#define DEFAULT_FACE_PROFILE HAAR_CASCADES_DIR "haarcascade_frontalface_default.xml"
#define DEFAULT_NOSE_PROFILE HAAR_CASCADES_DIR "haarcascade_mcs_nose.xml"
#define DEFAULT_MOUTH_PROFILE HAAR_CASCADES_DIR "haarcascade_mcs_mouth.xml"
#define DEFAULT_EYES_PROFILE HAAR_CASCADES_DIR "haarcascade_mcs_eyepair_small.xml"
+#endif
#define DEFAULT_SCALE_FACTOR 1.25
#define DEFAULT_FLAGS CV_HAAR_DO_CANNY_PRUNING
#define DEFAULT_MIN_NEIGHBORS 3
@@ -810,6 +817,28 @@
gboolean
gst_face_detect_plugin_init (GstPlugin * plugin)
{
+#ifdef G_OS_WIN32
+ const gchar * const *dirs = g_get_system_data_dirs();
+ int i;
+ for (i = 0; dirs[i]; ++i) {
+ DEFAULT_FACE_PROFILE = g_build_filename (dirs[i], "opencv", "haarcascades", "haarcascade_frontalface_default.xml", NULL);
+ if (!g_file_test (DEFAULT_FACE_PROFILE, G_FILE_TEST_IS_REGULAR)) {
+ g_free (DEFAULT_FACE_PROFILE);
+ }
+ DEFAULT_NOSE_PROFILE = g_build_filename (dirs[i], "opencv", "haarcascades", "haarcascade_mcs_nose.xml", NULL);
+ if (!g_file_test (DEFAULT_NOSE_PROFILE, G_FILE_TEST_IS_REGULAR)) {
+ g_free (DEFAULT_NOSE_PROFILE);
+ }
+ DEFAULT_MOUTH_PROFILE = g_build_filename (dirs[i], "opencv", "haarcascades", "haarcascade_mcs_mouth.xml", NULL);
+ if (!g_file_test (DEFAULT_MOUTH_PROFILE, G_FILE_TEST_IS_REGULAR)) {
+ g_free (DEFAULT_MOUTH_PROFILE);
+ }
+ DEFAULT_EYES_PROFILE = g_build_filename (dirs[i], "opencv", "haarcascades", "haarcascade_mcs_eyepair_small.xml", NULL);
+ if (!g_file_test (DEFAULT_EYES_PROFILE, G_FILE_TEST_IS_REGULAR)) {
+ g_free (DEFAULT_EYES_PROFILE);
+ }
+ }
+#endif
/* debug category for fltering log messages */
GST_DEBUG_CATEGORY_INIT (gst_face_detect_debug, "facedetect",
0,
--- ext/opencv/gsthanddetect.cpp Thu Mar 24 18:36:40 2016
+++ ext/opencv/gsthanddetect.cpp Sat Sep 03 01:35:36 2016
@@ -67,9 +67,14 @@
GST_DEBUG_CATEGORY_STATIC (gst_handdetect_debug);
#define GST_CAT_DEFAULT gst_handdetect_debug
+#ifdef G_OS_WIN32
+static gchar *HAAR_FILE_FIST = NULL;
+static gchar *HAAR_FILE_PALM = NULL;
+#else
/* define HAAR files */
#define HAAR_FILE_FIST GST_HAAR_CASCADES_DIR G_DIR_SEPARATOR_S "fist.xml"
#define HAAR_FILE_PALM GST_HAAR_CASCADES_DIR G_DIR_SEPARATOR_S "palm.xml"
+#endif
using namespace cv;
/* Filter signals and args */
@@ -632,6 +637,20 @@
gboolean
gst_handdetect_plugin_init (GstPlugin * plugin)
{
+#ifdef G_OS_WIN32
+ const gchar * const *dirs = g_get_system_data_dirs();
+ int i;
+ for (i = 0; dirs[i]; ++i) {
+ HAAR_FILE_FIST = g_build_filename (dirs[i], "opencv", "haarcascades", "fist.xml", NULL);
+ if (!g_file_test (HAAR_FILE_FIST, G_FILE_TEST_IS_REGULAR)) {
+ g_free (HAAR_FILE_FIST);
+ }
+ HAAR_FILE_PALM = g_build_filename (dirs[i], "opencv", "haarcascades", "palm.xml", NULL);
+ if (!g_file_test (HAAR_FILE_PALM, G_FILE_TEST_IS_REGULAR)) {
+ g_free (HAAR_FILE_PALM);
+ }
+ }
+#endif
GST_DEBUG_CATEGORY_INIT (gst_handdetect_debug,
"handdetect", 0, "opencv hand gesture detection");
return gst_element_register (plugin, "handdetect", GST_RANK_NONE,
--- ext/opencv/gstmotioncells.cpp Thu Mar 24 18:36:40 2016
+++ ext/opencv/gstmotioncells.cpp Sat Sep 03 01:35:36 2016
@@ -850,7 +850,7 @@
int thickness, success, motioncellsidxcnt, numberOfCells,
motioncellsnumber, cellsOfInterestNumber;
int mincellsOfInterestNumber, motiondetect;
- uint minimum_motion_frames, postnomotion;
+ guint minimum_motion_frames, postnomotion;
char *datafile;
bool display, changed_datafile, useAlpha;
gint64 starttime;
--- ext/opencv/Makefile.in Fri Aug 19 15:20:49 2016
+++ ext/opencv/Makefile.in Sat Sep 03 01:35:36 2016
@@ -193,7 +193,7 @@
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
-libgstopencv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+libgstopencv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(libgstopencv_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
$(CXXLD) $(libgstopencv_la_CXXFLAGS) $(CXXFLAGS) \
$(libgstopencv_la_LDFLAGS) $(LDFLAGS) -o $@
--- ext/resindvd/plugin.c Thu Mar 24 18:36:40 2016
+++ ext/resindvd/plugin.c Sat Sep 03 01:35:36 2016
@@ -41,7 +41,14 @@
#ifdef ENABLE_NLS
GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
LOCALEDIR);
+#ifdef G_OS_WIN32
+ gchar *_glib_get_locale_dir (void);
+ gchar *localedir = _glib_get_locale_dir ();
+ bindtextdomain (GETTEXT_PACKAGE, localedir);
+ g_free (localedir);
+#else
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+#endif
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif
--- ext/sndfile/gstsf.c Thu Mar 24 18:36:40 2016
+++ ext/sndfile/gstsf.c Sat Sep 03 01:35:36 2016
@@ -110,7 +110,14 @@
#ifdef ENABLE_NLS
GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
LOCALEDIR);
+#ifdef G_OS_WIN32
+ gchar *_glib_get_locale_dir (void);
+ gchar *localedir = _glib_get_locale_dir ();
+ bindtextdomain (GETTEXT_PACKAGE, localedir);
+ g_free (localedir);
+#else
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+#endif
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif /* ENABLE_NLS */
--- ext/soundtouch/Makefile.in Fri Aug 19 15:20:50 2016
+++ ext/soundtouch/Makefile.in Sat Sep 03 01:35:36 2016
@@ -174,7 +174,7 @@
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
-libgstsoundtouch_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+libgstsoundtouch_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(libgstsoundtouch_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CXXLD) $(libgstsoundtouch_la_CXXFLAGS) \
$(CXXFLAGS) $(libgstsoundtouch_la_LDFLAGS) $(LDFLAGS) -o $@
--- gst/aiff/aiff.c Thu Mar 24 18:36:40 2016
+++ gst/aiff/aiff.c Sat Sep 03 01:35:36 2016
@@ -47,7 +47,14 @@
#ifdef ENABLE_NLS
GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
LOCALEDIR);
+#ifdef G_OS_WIN32
+ gchar *_glib_get_locale_dir (void);
+ gchar *localedir = _glib_get_locale_dir ();
+ bindtextdomain (GETTEXT_PACKAGE, localedir);
+ g_free (localedir);
+#else
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+#endif
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif
--- gst/frei0r/gstfrei0r.c Thu Mar 24 18:36:40 2016
+++ gst/frei0r/gstfrei0r.c Sat Sep 03 01:35:36 2016
@@ -29,6 +29,21 @@
#include <string.h>
#include <gmodule.h>
+#ifdef G_OS_WIN32
+#include <windows.h>
+HMODULE gstf_dll = NULL;
+BOOL WINAPI
+DllMain (HINSTANCE hinstDLL,
+ DWORD fdwReason,
+ LPVOID lpvReserved)
+{
+ if (fdwReason == DLL_PROCESS_ATTACH)
+ gstf_dll = hinstDLL;
+
+ return TRUE;
+}
+#endif
+
GST_DEBUG_CATEGORY (frei0r_debug);
#define GST_CAT_DEFAULT frei0r_debug
@@ -686,7 +701,11 @@
#define register_plugins2(plugin, pn, p) register_plugins(plugin, pn, p, p)
homedir = g_get_home_dir ();
path = g_build_filename (homedir, ".frei0r-1", "lib", NULL);
+#ifdef G_OS_WIN32
+ libdir_path = g_build_filename (g_win32_get_package_installation_directory_of_module (gstf_dll),"..","frei0r-1", NULL);
+#else
libdir_path = g_build_filename (LIBDIR, "frei0r-1", NULL);
+#endif
register_plugins2 (plugin, plugin_names, path);
g_free (path);
register_plugins2 (plugin, plugin_names, libdir_path);
--- gst/midi/midi.c Thu Mar 24 18:36:40 2016
+++ gst/midi/midi.c Sat Sep 03 01:35:36 2016
@@ -41,7 +41,14 @@
#ifdef ENABLE_NLS
GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
LOCALEDIR);
+#ifdef G_OS_WIN32
+ gchar *_glib_get_locale_dir (void);
+ gchar *localedir = _glib_get_locale_dir ();
+ bindtextdomain (GETTEXT_PACKAGE, localedir);
+ g_free (localedir);
+#else
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+#endif
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif
--- gst/nuvdemux/gstnuvdemux.c Thu Mar 24 18:36:40 2016
+++ gst/nuvdemux/gstnuvdemux.c Sat Sep 03 01:35:36 2016
@@ -928,7 +928,14 @@
#ifdef ENABLE_NLS
GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
LOCALEDIR);
+#ifdef G_OS_WIN32
+ gchar *_glib_get_locale_dir (void);
+ gchar *localedir = _glib_get_locale_dir ();
+ bindtextdomain (GETTEXT_PACKAGE, localedir);
+ g_free (localedir);
+#else
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+#endif
#endif /* ENABLE_NLS */
if (!gst_element_register (plugin, "nuvdemux", GST_RANK_SECONDARY,
--- gst/videomeasure/gstvideomeasure.c Thu Mar 24 18:36:40 2016
+++ gst/videomeasure/gstvideomeasure.c Sat Sep 03 01:35:36 2016
@@ -52,7 +52,14 @@
#ifdef ENABLE_NLS
GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
LOCALEDIR);
+#ifdef G_OS_WIN32
+ gchar *_glib_get_locale_dir (void);
+ gchar *localedir = _glib_get_locale_dir ();
+ bindtextdomain (GETTEXT_PACKAGE, localedir);
+ g_free (localedir);
+#else
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+#endif
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif