summaryrefslogtreecommitdiff
path: root/data/xcode
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2019-02-07 14:12:16 +1100
committerMatthew Waters <matthew@centricular.com>2019-02-07 14:48:05 +1100
commit5599507ecddd0bfe641d76edd77173be310b3498 (patch)
tree3e8fc3438f68bc5140a36f2c050514be4d2a42f5 /data/xcode
parenta8338d78ea3910ab565cc1fd3efa090e257893cf (diff)
ios-templates: update for GTlsBackend changes
https://gitlab.freedesktop.org/gstreamer/cerbero/issues/64
Diffstat (limited to 'data/xcode')
-rw-r--r--data/xcode/templates/ios/GStreamer Base.xctemplate/gst_ios_init.h4
-rw-r--r--data/xcode/templates/ios/GStreamer Base.xctemplate/gst_ios_init.m22
2 files changed, 18 insertions, 8 deletions
diff --git a/data/xcode/templates/ios/GStreamer Base.xctemplate/gst_ios_init.h b/data/xcode/templates/ios/GStreamer Base.xctemplate/gst_ios_init.h
index 0380f6ac..8e34bb13 100644
--- a/data/xcode/templates/ios/GStreamer Base.xctemplate/gst_ios_init.h
+++ b/data/xcode/templates/ios/GStreamer Base.xctemplate/gst_ios_init.h
@@ -6,10 +6,10 @@
G_BEGIN_DECLS
#define GST_G_IO_MODULE_DECLARE(name) \
-extern void G_PASTE(g_io_module_, G_PASTE(name, _load_static)) (void)
+extern void G_PASTE(g_io_, G_PASTE(name, _load)) (gpointer module)
#define GST_G_IO_MODULE_LOAD(name) \
-G_PASTE(g_io_module_, G_PASTE(name, _load_static)) ()
+G_PASTE(g_io_, G_PASTE(name, _load)) (NULL)
/* Uncomment each line to enable the plugin categories that your application needs.
* You can also enable individual plugins. See gst_ios_init.c to see their names
diff --git a/data/xcode/templates/ios/GStreamer Base.xctemplate/gst_ios_init.m b/data/xcode/templates/ios/GStreamer Base.xctemplate/gst_ios_init.m
index c6ef5f14..5b506509 100644
--- a/data/xcode/templates/ios/GStreamer Base.xctemplate/gst_ios_init.m
+++ b/data/xcode/templates/ios/GStreamer Base.xctemplate/gst_ios_init.m
@@ -1,9 +1,10 @@
#include "gst_ios_init.h"
+#include <gio/gio.h>
+
@GST_IOS_PLUGINS_DECLARE@
#if defined(GST_IOS_GIO_MODULE_GNUTLS)
- #include <gio/gio.h>
GST_G_IO_MODULE_DECLARE(gnutls);
#endif
@@ -38,16 +39,25 @@ gst_ios_init (void)
ca_certificates = g_build_filename (resources_dir, "ssl", "certs", "ca-certificates.crt", NULL);
g_setenv ("CA_CERTIFICATES", ca_certificates, TRUE);
- g_free (ca_certificates);
-
- gst_init (NULL, NULL);
-
- @GST_IOS_PLUGINS_REGISTER@
#if defined(GST_IOS_GIO_MODULE_GNUTLS)
GST_G_IO_MODULE_LOAD(gnutls);
#endif
+ if (ca_certificates) {
+ GTlsBackend *backend = g_tls_backend_get_default ();
+ if (backend) {
+ GTlsDatabase *db = g_tls_file_database_new (ca_certificates, NULL);
+ if (db)
+ g_tls_backend_set_default_database (backend, db);
+ }
+ }
+ g_free (ca_certificates);
+
+ gst_init (NULL, NULL);
+
+ @GST_IOS_PLUGINS_REGISTER@
+
/* Lower the ranks of filesrc and giosrc so iosavassetsrc is
* tried first in gst_element_make_from_uri() for file:// */
reg = gst_registry_get();