[Gstreamer-bugs] [Bug 89836] Changed - gst_element_(s|g)et_name are redundant
bugzilla-daemon at widget.gnome.org
bugzilla-daemon at widget.gnome.org
Tue Aug 13 07:36:48 PDT 2002
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
http://bugzilla.gnome.org/show_bug.cgi?id=89836
Changed by tim at tjansen.de.
--- shadow/89836 Tue Aug 13 10:15:06 2002
+++ shadow/89836.tmp.6021 Tue Aug 13 10:36:47 2002
@@ -1,12 +1,12 @@
Bug#: 89836
Product: GStreamer
Version: 0.4.0
OS: Linux
OS Details:
-Status: NEEDINFO
+Status: REOPENED
Resolution:
Severity: trivial
Priority: Normal
Component: gstreamer (core)
AssignedTo: gstreamer-maint at bugzilla.gnome.org
ReportedBy: tim at tjansen.de
@@ -28,6 +28,18 @@
------- Additional Comments From tim at tjansen.de 2002-08-05 07:10 -------
But in this case shouldn't it be a virtual method?
------- Additional Comments From thomas at urgent.rug.ac.be 2002-08-13 10:15 -------
Could you elaborate a bit more on what you mean by that ?
+
+------- Additional Comments From tim at tjansen.de 2002-08-13 10:36 -------
+If set_name's functionality depends on the class type and should,
+for example, enforce that each name is unique in a GstBin, then the
+function should be virtual/polymorphic. I think with GObjects this is
+done by putting a pointer to the function in the class object.
+Sub-classes can overwrite the pointer if they need a special
+implementation of the function.
+So when you then call set_name on a GstObject that happens to be a
+GstElement, GstElement's implementation will be invoked and not
+GstObject's. Otherwise you could break the Bin's structure by calling
+gst_object_set_name on a GstElement, even though the API allows that.
More information about the Gstreamer-bugs
mailing list