[Bug 786344] audioaggregator: implement input conversion

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Sep 22 14:33:57 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=786344

--- Comment #10 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
(In reply to Mathieu Duponchelle from comment #7)
> (In reply to Sebastian Dröge (slomo) from comment #6)
> > Review of attachment 360227 [details] [review] [review]:
> > 
> > ::: gst-libs/gst/audio/gstaudioaggregator.c
> > @@ +57,3 @@
> > +    GST_PAD_SINK,
> > +    GST_PAD_REQUEST,
> > +    SINK_CAPS);
> > 
> > Subclasses might want to limit the caps in one way or another. E.g. only
> > allow mono inputs.
> > 
> 
> They can do that by overriding the static template after calling
> perform_conversion , does that work for you ?

That's a bit ugly IMHO :) I'd make the pad template addition explicit in any
case.

> > ::: gst-libs/gst/audio/gstaudioaggregator.h
> > @@ +168,3 @@
> >  
> > +GST_EXPORT
> > +void gst_audio_aggregator_class_perform_conversion (GstAudioAggregatorClass
> > * klass);
> > 
> > Should probably take a boolean so sub-subclasses can override it
> 
> Hm I see, do you figure that's an actual use case? I mean we do have
> liveadder, but afaiu it's mostly for backwards compatibility, I don't figure
> we actually want to extend the inheritance tree much further, it's already
> pretty deep as it is? The lack of a boolean was actually on purpose, that's
> also why I renamed that method from set_convertible to perform_conversion.
> 
> Related to the point above however, we may want to accept a static pad
> template here, to make it clearer for the subclass how to restrict the input
> caps, this could eventually be used by a sub-subclass to effectively disable
> conversion.

Consistency, in other base classes we also do these things with a boolean
setting instead. Does it cause problems?

> > , and maybe a vfunc that does the conversion and can be overridden?

You might want to override the conversion if your internal code can already
handle different formats for example, or if you use an external library that
does that or has conversion.

In videomixer I added a vfunc IIRC, or someone, and it was needed. Adding it
later always makes us lose some padding in the struct :)

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


More information about the gstreamer-bugs mailing list