Commit 3b4aa3f7 authored by Benjamin Otte's avatar Benjamin Otte

Deprecated gst_element_class_set_details()

Use gst_element_class_set_details_simple() instead. If you want to
convert automatically, here's a script:

for file in `git grep -l GstElementDetails`; do
  sed -i -n -r '
    1h
    1!H
    $ {
      g
      s/((\/\*[^\n]*\*\/)?\n)*[^\n]*GstElementDetails .* =\s*GST_ELEMENT_DETAILS\s*\((\"[^\"]*\",\s*\"[^\"]*\",\s*\"[^\"]*\",\s*(\"[^\"]*\"\s*)*)\);\n*(.*)gst_element_class_set_details \(([^,]*),\s*[^)]*\)/\n\n\5gst_element_class_set_details_simple (\6, \3)/
      s/((\/\*[^\n]*\*\/)?\n)*[^\n]*GstElementDetails .* =\s*\{\s*(\"[^\"]*\",\s*\"[^\"]*\",\s*\"[^\"]*\",\s*(\"[^\"]*\"\s*)*)\};\n*(.*)gst_element_class_set_details \(([^,]*),\s*[^)]*\)/\n\n\5gst_element_class_set_details_simple (\6, \3)/
      p
    }' $file
  ~/gst/gstreamer/tools/gst-indent $file
done
parent f534e352
...@@ -1207,7 +1207,15 @@ gst_element_class_add_pad_template (GstElementClass * klass, ...@@ -1207,7 +1207,15 @@ gst_element_class_add_pad_template (GstElementClass * klass,
* <note>This function is for use in _base_init functions only.</note> * <note>This function is for use in _base_init functions only.</note>
* *
* The @details are copied. * The @details are copied.
*
* Deprecated: Use gst_element_class_set_details_simple() instead.
*/ */
#ifndef GST_REMOVE_DEPRECATED
#ifdef GST_DISABLE_DEPRECATED
void
gst_element_class_set_details (GstElementClass * klass,
const GstElementDetails * details);
#endif
void void
gst_element_class_set_details (GstElementClass * klass, gst_element_class_set_details (GstElementClass * klass,
const GstElementDetails * details) const GstElementDetails * details)
...@@ -1217,6 +1225,7 @@ gst_element_class_set_details (GstElementClass * klass, ...@@ -1217,6 +1225,7 @@ gst_element_class_set_details (GstElementClass * klass,
__gst_element_details_copy (&klass->details, details); __gst_element_details_copy (&klass->details, details);
} }
#endif
/** /**
* gst_element_class_set_details_simple: * gst_element_class_set_details_simple:
......
...@@ -663,7 +663,9 @@ struct _GstElementClass ...@@ -663,7 +663,9 @@ struct _GstElementClass
void gst_element_class_add_pad_template (GstElementClass *klass, GstPadTemplate *templ); void gst_element_class_add_pad_template (GstElementClass *klass, GstPadTemplate *templ);
GstPadTemplate* gst_element_class_get_pad_template (GstElementClass *element_class, const gchar *name); GstPadTemplate* gst_element_class_get_pad_template (GstElementClass *element_class, const gchar *name);
GList* gst_element_class_get_pad_template_list (GstElementClass *element_class); GList* gst_element_class_get_pad_template_list (GstElementClass *element_class);
#ifndef GST_DISABLE_DEPRECATED
void gst_element_class_set_details (GstElementClass *klass, const GstElementDetails *details); void gst_element_class_set_details (GstElementClass *klass, const GstElementDetails *details);
#endif
void gst_element_class_set_details_simple (GstElementClass *klass, void gst_element_class_set_details_simple (GstElementClass *klass,
const gchar *longname, const gchar *longname,
const gchar *classification, const gchar *classification,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment