[gstreamer-bugs] [Bug 506132] Review of changes in video/video.h

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Sat Jan 12 15:19:39 PST 2008


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=506132

  GStreamer | gst-plugins-base | Ver: HEAD CVS




------- Comment #5 from David Schleef  2008-01-12 23:19 UTC -------
The difference between using functions vs. structures at this level is pretty
much a matter of style.  However, my reasoning here is mostly:

 - Functions are easier to extend: just add another function.  Structures, you
have to worry about ABI issues.

 - Functions are simple and obviously named.  IMO, it's much harder for a user
to understand the fields in a structure than the return value of a function. 
This is especially true when some of the structure fields are irrelevant for
certain formats.

 - With structures, you have to worry about refcounting/freeing

 - Functions map very easily into other languages.  Structures somewhat, but
it's more difficult and takes effort.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=506132.




More information about the Gstreamer-bugs mailing list