diff options
-rw-r--r-- | data/xcode/templates/ios/GStreamer Base.xctemplate/gst_ios_init.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/data/xcode/templates/ios/GStreamer Base.xctemplate/gst_ios_init.c b/data/xcode/templates/ios/GStreamer Base.xctemplate/gst_ios_init.c index fd9a977..740ed7d 100644 --- a/data/xcode/templates/ios/GStreamer Base.xctemplate/gst_ios_init.c +++ b/data/xcode/templates/ios/GStreamer Base.xctemplate/gst_ios_init.c @@ -5,7 +5,21 @@ void gst_ios_init (void) { + GstPluginFeature *plugin; + GstRegistry *reg; + 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_default(); + plugin = gst_registry_lookup_feature(reg, "filesrc"); + if (plugin) + gst_plugin_feature_set_rank(plugin, GST_RANK_SECONDARY); + plugin = gst_registry_lookup_feature(reg, "giosrc"); + if (plugin) + gst_plugin_feature_set_rank(plugin, GST_RANK_SECONDARY); } |