Re: [PATCH spice-gtk v2 03/15] gst: check pulsesrc version >= 1.15

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On Sat, Jan 12, 2019 at 6:17 PM Victor Toso <victortoso@xxxxxxxxxx> wrote:
>
> Hi,
>
> On Wed, Jan 09, 2019 at 10:09:23AM +0000, Frediano Ziglio wrote:
> > From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> >
> > There is a racy bug in pulsesrc that we can't easily workaround:
> > https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/merge_requests/69
> >
> > It will hopefully be fixed with 1.15.
>
> It was pushed already so you can consider fixed for 1.15
>
>     https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/commit/8b155d71884156f15bdd97d30ea208f3e095c684
>
> > PulseAudio may not be picked by autoaudiosrc, but looking up the
> > actual source or mimicking GstAutoDetect is unnecessarily complicated.
> >
> > When pulsesrc < 1.15 is detected, let's drop its rank, so it
> > won't be picked.
>
> Ok
>
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> > ---
> >  src/spice-gstaudio.c | 23 +++++++++++++++++++++++
> >  1 file changed, 23 insertions(+)
> >
> > diff --git a/src/spice-gstaudio.c b/src/spice-gstaudio.c
> > index aff69d27..40050007 100644
> > --- a/src/spice-gstaudio.c
> > +++ b/src/spice-gstaudio.c
> > @@ -527,7 +527,30 @@ SpiceGstaudio *spice_gstaudio_new(SpiceSession *session, GMainContext *context,
> >                                    const char *name)
> >  {
> >      GError *err = NULL;
> > +
> >      if (gst_init_check(NULL, NULL, &err)) {
> > +        GstPluginFeature *pulsesrc;
> > +
> > +        pulsesrc = gst_registry_lookup_feature(gst_registry_get(), "pulsesrc");
> > +        if (pulsesrc) {
> > +            unsigned maj, min;
> > +            GstPlugin *plugin = gst_plugin_feature_get_plugin(pulsesrc);
> > +
> > +            if (sscanf(gst_plugin_get_version(plugin), "%u.%u", &maj, &min) != 2) {
> > +                g_warn_if_reached();
> > +                gst_object_unref(plugin);
> > +                gst_object_unref(pulsesrc);
> > +                return NULL;
> > +            }
> > +
> > +            gst_object_unref(plugin);
> > +            gst_object_unref(pulsesrc);
> > +            if (maj < 1 || min < 15) {
>
> As you mentioned earlier, 2.0 should not enter here; Also, this
> is expected to land in next stable release right? We might as
> well check for it too.
>
> > +                g_warning("Bad pulsesrc version, lowering its rank");
>
> I agree that g_debug() should be enough.. and adding the output
> of gst_plugin_get_version() would not hurt

Thanks for the review, please check v3:
"[PATCH spice-gtk v3] gst: check pulsesrc version >= 1.14.5"

cheers

>
> > +                gst_plugin_feature_set_rank(pulsesrc, GST_RANK_NONE);
> > +            }
> > +        }
> > +
> >          return g_object_new(SPICE_TYPE_GSTAUDIO,
> >                              "session", session,
> >                              "main-context", context,
> > --
> > 2.20.1
> >
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> > https://lists.freedesktop.org/mailman/listinfo/spice-devel
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



-- 
Marc-André Lureau
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]