plugins: remove common change_state() vmethod
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Tue, 12 Jul 2016 16:24:10 +0000 (18:24 +0200)
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Fri, 22 Jul 2016 15:23:23 +0000 (17:23 +0200)
Remove the common change_state() vmethod for all the plugins, since no one is
using it.

gst/vaapi/gstvaapipluginbase.h

index 4a1de46..53dd928 100644 (file)
@@ -98,10 +98,6 @@ typedef struct _GstVaapiPluginBaseClass GstVaapiPluginBaseClass;
   (gst_vaapi_display_replace(&GST_VAAPI_PLUGIN_BASE_DISPLAY(plugin), \
        (new_display)))
 
-#define GST_VAAPI_PLUGIN_BASE_DEFINE_VMETHODS(parent_class) \
-  GST_VAAPI_PLUGIN_BASE_DEFINE_SET_CONTEXT(parent_class) \
-  GST_VAAPI_PLUGIN_BASE_DEFINE_CHANGE_STATE(parent_class)
-
 #define GST_VAAPI_PLUGIN_BASE_DEFINE_SET_CONTEXT(parent_class) \
   static void \
   gst_vaapi_base_set_context (GstElement * element, GstContext * context) \
@@ -112,31 +108,6 @@ typedef struct _GstVaapiPluginBaseClass GstVaapiPluginBaseClass;
     GST_ELEMENT_CLASS (parent_class)->set_context (element, context); \
   }
 
-#define GST_VAAPI_PLUGIN_BASE_DEFINE_CHANGE_STATE(parent_class) \
-  static GstStateChangeReturn \
-  gst_vaapi_base_change_state (GstElement * element, \
-      GstStateChange transition) \
-  { \
-    GstStateChangeReturn ret; \
-    \
-    ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, \
-        transition);  \
-    if (ret == GST_STATE_CHANGE_FAILURE) \
-      return ret; \
-    \
-    switch (transition) { \
-      case GST_STATE_CHANGE_NULL_TO_READY:{ \
-        GstVaapiPluginBase *const plugin = GST_VAAPI_PLUGIN_BASE (element); \
-        if (!gst_vaapi_plugin_base_driver_is_whitelisted (plugin)) \
-          ret = GST_STATE_CHANGE_FAILURE; \
-        break; \
-      } \
-      default: \
-        break; \
-    }          \
-    return ret; \
-  }
-
 struct _GstVaapiPluginBase
 {
   /*< private >*/