[gstreamer-bugs] [Bug 169396] clock api broken by GstVideoSink

bugzilla-daemon at bugzilla.gnome.org bugzilla-daemon at bugzilla.gnome.org
Thu Mar 10 10:49:50 PST 2005


Please DO NOT reply to this by email. All additional comments should be made in
the comments box of this bug report.

 http://bugzilla.gnome.org/show_bug.cgi?id=169396
 GStreamer | gst-plugins | Ver: 0.8.8





------- Additional Comments From Andrea Ferro  2005-03-10 13:49 -------
Ronald,

depends on what the "object contract" is.

In general object orientation practice the pact is that if a method is
overridden then the base class method implementation is not invoked. If it needs
to be invoked, then this is explitely stated and is the responsibility of the
overriding implementation.

Current use of GstVideoSink by the plugins seem to assume this pact is valid and 
no call to the superclass method is necessary.

In other words, the plugins, internally, change the clock calling the
GstVideoSink clock setter, not calling gst_element_set_clock. And this setter
does not call gst_element_set_clock either.

We are dealing with an object oriented paradigm implemented in C, and C is not
natively and OO language.

The code above is really doing two different things. It's a convenient wrapper
to the call of a method of GstElement and it's the implementation of that method
for the GstElement class. 

Nice. But not done according to the ordinary object paradigm. The method is
overridable. There's no guarantee (unless explicitelly defined in the docs) that
this is ever called. Also there's no clear way to call the GstElement
implementation as this is actually mixed with the wrapper.

The net result is that the clock setting is correct if we call
gst_element_se_clock, but not if we call the GstVideoSink implementatin directly
(and that is what video sinks do and it's correct according to OO paradigm)
because the gst_object_replace is not called and the "outer" clock member is not
set. Therefore the clock getter (and that's a macro) does not return the clock.


------- You are receiving this mail because: -------
You are the assignee for the bug.
You are the QA contact for the bug.




More information about the Gstreamer-bugs mailing list