Adapt tutorial code to new xcode ios templates

This commit is contained in:
Xavi Artigas 2013-05-13 10:36:29 +02:00
parent 217845f35d
commit 4bd417f339
8 changed files with 76 additions and 10 deletions

View file

@ -496,6 +496,9 @@ GST_PLUGIN_STATIC_DECLARE(sdp);
void
gst_ios_init (void)
{
GstPluginFeature *plugin;
GstRegistry *reg;
gst_init (NULL, NULL);
#if defined(GST_IOS_PLUGIN_COREELEMENTS) || defined(GST_IOS_PLUGINS_CORE)
@ -990,4 +993,14 @@ gst_ios_init (void)
#if defined(GST_IOS_PLUGIN_SDP) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_REGISTER(sdp);
#endif
/* 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-1);
}

View file

@ -3,9 +3,12 @@
#include <gst/gst.h>
G_BEGIN_DECLS
/* 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
*/
#define GST_IOS_PLUGINS_CORE
//#define GST_IOS_PLUGINS_CAPTURE
//#define GST_IOS_PLUGINS_CODECS_RESTRICTED
@ -22,4 +25,6 @@
void gst_ios_init ();
G_END_DECLS
#endif

View file

@ -496,9 +496,10 @@ GST_PLUGIN_STATIC_DECLARE(sdp);
void
gst_ios_init (void)
{
GstPluginFeature *plugin;
GstRegistry *reg;
gst_init (NULL, NULL);
gst_debug_set_colored(FALSE);
gst_debug_set_default_threshold(GST_LEVEL_WARNING);
#if defined(GST_IOS_PLUGIN_COREELEMENTS) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER(coreelements);
@ -992,4 +993,14 @@ gst_ios_init (void)
#if defined(GST_IOS_PLUGIN_SDP) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_REGISTER(sdp);
#endif
/* 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-1);
}

View file

@ -3,9 +3,12 @@
#include <gst/gst.h>
G_BEGIN_DECLS
/* 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
*/
#define GST_IOS_PLUGINS_CORE
//#define GST_IOS_PLUGINS_CAPTURE
//#define GST_IOS_PLUGINS_CODECS_RESTRICTED
@ -22,4 +25,6 @@
void gst_ios_init ();
G_END_DECLS
#endif

View file

@ -496,9 +496,10 @@ GST_PLUGIN_STATIC_DECLARE(sdp);
void
gst_ios_init (void)
{
GstPluginFeature *plugin;
GstRegistry *reg;
gst_init (NULL, NULL);
gst_debug_set_colored(FALSE);
gst_debug_set_default_threshold(GST_LEVEL_WARNING);
#if defined(GST_IOS_PLUGIN_COREELEMENTS) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER(coreelements);
@ -992,4 +993,14 @@ gst_ios_init (void)
#if defined(GST_IOS_PLUGIN_SDP) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_REGISTER(sdp);
#endif
/* 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-1);
}

View file

@ -3,9 +3,12 @@
#include <gst/gst.h>
G_BEGIN_DECLS
/* 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
*/
#define GST_IOS_PLUGINS_CORE
//#define GST_IOS_PLUGINS_CAPTURE
//#define GST_IOS_PLUGINS_CODECS_RESTRICTED
@ -22,4 +25,6 @@
void gst_ios_init ();
G_END_DECLS
#endif

View file

@ -496,9 +496,10 @@ GST_PLUGIN_STATIC_DECLARE(sdp);
void
gst_ios_init (void)
{
GstPluginFeature *plugin;
GstRegistry *reg;
gst_init (NULL, NULL);
gst_debug_set_colored(FALSE);
gst_debug_set_default_threshold(GST_LEVEL_WARNING);
#if defined(GST_IOS_PLUGIN_COREELEMENTS) || defined(GST_IOS_PLUGINS_CORE)
GST_PLUGIN_STATIC_REGISTER(coreelements);
@ -992,4 +993,14 @@ gst_ios_init (void)
#if defined(GST_IOS_PLUGIN_SDP) || defined(GST_IOS_PLUGINS_NET)
GST_PLUGIN_STATIC_REGISTER(sdp);
#endif
/* 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-1);
}

View file

@ -3,9 +3,12 @@
#include <gst/gst.h>
G_BEGIN_DECLS
/* 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
*/
#define GST_IOS_PLUGINS_CORE
//#define GST_IOS_PLUGINS_CAPTURE
//#define GST_IOS_PLUGINS_CODECS_RESTRICTED
@ -22,4 +25,6 @@
void gst_ios_init ();
G_END_DECLS
#endif