caps: remove gst_caps_union()
[platform/upstream/gstreamer.git] / docs / random / porting-to-0.11.txt
index 0a539fc..0181bcd 100644 (file)
@@ -60,6 +60,10 @@ The 0.11 porting guide
 
     gst_element_class_add_pad_template() takes ownership of the template
 
+    gst_element_class_add_static_pad_template (element_class, &src_template)
+      => gst_element_class_add_pad_template (element_class,
+             gst_static_pad_template_get (&src_template));
+
     Elements that change the duration must post DURATION messages on the
     bus when the duration changes in PAUSED or PLAYING.
 
@@ -329,6 +333,23 @@ The 0.11 porting guide
 
     GST_VIDEO_CAPS_xxx -> GST_VIDEO_CAPS_MAKE(xxx)
 
+    Some caps functions now take ownership of the input argument, for
+    efficiency reasons (to avoid unnecessary copies to make them writable):
+
+      gst_caps_normalize (caps)          =>   caps = gst_caps_normalize (caps)
+      gst_caps_do_simplify (caps)        =>   caps = gst_caps_simplify (caps)
+      gst_caps_merge (caps,caps2)        =>   caps = gst_caps_merge (caps,caps2)
+      gst_caps_merge_structure (caps,st) =>   caps = gst_caps_merge_structure (caps,st)
+      gst_caps_truncate (caps)           =>   caps = gst_caps_truncate (caps)
+
+    The compiler should warn about unused return values from these functions,
+    which may help find the places that need to be updated.
+
+    Removed functions:
+
+      gst_caps_union() -> gst_caps_merge():  Be careful because _merge takes
+                 ownership of the arguments.
+
 * GstSegment
     abs_rate was removed from the public fields, it can be trivially calculated
     from the rate field.