Improve caps setters API
authorBenjamin Otte <otte@gnome.org>
Wed, 7 Oct 2009 13:32:18 +0000 (15:32 +0200)
committerBenjamin Otte <otte@gnome.org>
Thu, 15 Oct 2009 17:10:50 +0000 (19:10 +0200)
commit0ff4086507671e5306a772ba5255c004de63626a
tree98a48b82c588a60eeb5567384e9a1def3d963e9d
parent1190018f04ced9fc21b3c0addb8a4a21a2a7f7ca
Improve caps setters API

This patch adds gst_caps_set_value() and allows gst_caps_set_simple() to
work on non-simple caps. See the API documentation for the functions
about what they do.

The intention of these changes is to ease working with caps in caps
transform functions. An example for this would be ffmpegcolorspace,
where the caps transform function could be changed to look roughly like
this (pseudocode ahead):
  result = gst_caps_copy (template_caps);
  value = gst_structure_get_value (gst_caps_get_structure (caps, 0),
    "widh");
  gst_caps_set_value (result, value);
  /* same for height, framerate and par */
  return caps;
which is much cleaner and easier to understand than the current code.

https://bugzilla.gnome.org/show_bug.cgi?id=597690
docs/gst/gstreamer-sections.txt
gst/gstcaps.c
gst/gstcaps.h