enable trustzon configuration in gstdecodebin2
authorfscherry <js4716.chun@samsung.com>
Thu, 10 Nov 2016 11:13:40 +0000 (20:13 +0900)
committerJEONGSIK CHEON <js4716.chun@samsung.com>
Tue, 6 Dec 2016 02:07:55 +0000 (18:07 -0800)
Change-Id: Ia5e88bc8ba7a0fe924942234665679aab6f8b4b4
Signed-off-by: fscherry <js4716.chun@samsung.com>
gst/playback/gstdecodebin2.c
packaging/gst-plugins-base.spec

index 3afad0d..9d8fc20 100644 (file)
@@ -182,6 +182,10 @@ struct _GstDecodeBin
 
   gboolean expose_allstreams;   /* Whether to expose unknow type streams or not */
 
+#ifdef TIZEN_FEATURE_TRUSTZONE
+  /*tzmultiqueue patch : use trustzone flag*/
+  gboolean use_trustzone;
+#endif
   GList *filtered;              /* elements for which error messages are filtered */
   GList *filtered_errors;       /* filtered error messages */
 
@@ -270,6 +274,10 @@ enum
   PROP_POST_STREAM_TOPOLOGY,
   PROP_EXPOSE_ALL_STREAMS,
   PROP_CONNECTION_SPEED
+#ifdef TIZEN_FEATURE_TRUSTZONE
+  /*tzmultiqueue patch : use trustzone flag*/
+  ,PROP_USE_TRUSTZONE
+#endif
 };
 
 static GstBinClass *parent_class;
@@ -954,6 +962,14 @@ gst_decode_bin_class_init (GstDecodeBinClass * klass)
           DEFAULT_EXPOSE_ALL_STREAMS,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
+#ifdef TIZEN_FEATURE_TRUSTZONE
+  /*tzmultiqueue patch : use-trustzone property*/
+  g_object_class_install_property (gobject_klass, PROP_USE_TRUSTZONE,
+      g_param_spec_boolean ("use-trustzone", "Add trustzone flag to decodebin2",
+          "Add trustzone flag to decodebin2 to add tzmultiqueue element",
+          0,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+#endif
   /**
    * GstDecodeBin2::connection-speed
    *
@@ -1279,6 +1295,13 @@ gst_decode_bin_set_property (GObject * object, guint prop_id,
     case PROP_EXPOSE_ALL_STREAMS:
       dbin->expose_allstreams = g_value_get_boolean (value);
       break;
+#ifdef TIZEN_FEATURE_TRUSTZONE
+    /*tzmultiqueue patch : use-trustzone property*/
+    case PROP_USE_TRUSTZONE:
+      GST_DEBUG_OBJECT (dbin, "set dbin->use_trustzone to %d", g_value_get_boolean(value));
+      dbin->use_trustzone = g_value_get_boolean (value);
+      break;
+#endif
     case PROP_CONNECTION_SPEED:
       GST_OBJECT_LOCK (dbin);
       dbin->connection_speed = g_value_get_uint64 (value) * 1000;
@@ -1331,6 +1354,12 @@ gst_decode_bin_get_property (GObject * object, guint prop_id,
     case PROP_EXPOSE_ALL_STREAMS:
       g_value_set_boolean (value, dbin->expose_allstreams);
       break;
+#ifdef TIZEN_FEATURE_TRUSTZONE
+    /*tzmultiqueue patch : use-trustzone property*/
+    case PROP_USE_TRUSTZONE:
+      g_value_set_boolean (value, dbin->use_trustzone);
+      break;
+#endif
     case PROP_CONNECTION_SPEED:
       GST_OBJECT_LOCK (dbin);
       g_value_set_uint64 (value, dbin->connection_speed / 1000);
@@ -3726,6 +3755,15 @@ gst_decode_group_new (GstDecodeBin * dbin, GstDecodeChain * parent)
   group->dbin = dbin;
   group->parent = parent;
 
+#ifdef TIZEN_FEATURE_TRUSTZONE
+  /*tzmultiqueue patch : when this flag is set to TRUE, we will use tzmultiqueue instead of multiqueue element in pipeline*/
+  if(dbin->use_trustzone)
+  {
+    GST_DEBUG_OBJECT (dbin, "decodebin2 use tzmultiqueue");
+    mq = group->multiqueue = gst_element_factory_make ("tzmultiqueue", NULL);
+  }
+  else
+#endif
   mq = group->multiqueue = gst_element_factory_make ("multiqueue", NULL);
   if (G_UNLIKELY (!group->multiqueue))
     goto missing_multiqueue;
index d66d9fc..059fa2a 100644 (file)
@@ -79,6 +79,7 @@ export CFLAGS="%{optflags} -fno-strict-aliasing\
  -DTIZEN_FEATURE_VOLUME_MODIFICATION\
 %if "%{?profile}" == "tv"
  -DTIZEN_PROFILE_TV\
+ -DTIZEN_FEATURE_TRUSTZONE\
 %endif
  "