[Spice-devel] volume can't be set

Qian Peng flyalay at gmail.com
Mon Feb 24 18:36:59 PST 2014


Thanks for your respone!

It's strange that client can play audio, but can't set volume.

I have renamed the \lib\gstreamer-0.10\libgstdirectsoundsink.dll, the
result is no audio can play.

I have no idea what the problem is. May I verifiy  the directsoundsink
element have been included?

Thanks!


2014-02-24 20:06 GMT+08:00 Marc-André Lureau <mlureau at redhat.com>:

>
>
> ----- Original Message -----
> > Hi all!
> >
> > I connected Spice server by windows spice client which is complied by
> > mingw32, and set the volume.
> >
> > But the volume didn't change.
> >
> > the code form:
> >
> https://gitorious.org/spice-gtk/spice-gtk-elmarco/source/f270119352604755a13fcc87783127c3d96c4f61:gtk/spice-gstaudio.c
> >
> > create pipe code:
> > if (pipeline == NULL)
> > pipeline = g_strdup_printf("appsrc is-live=1 do-timestamp=0 caps=\"%s\"
> > name=\"appsrc\" ! queue ! "
> > "audioconvert ! audioresample ! autoaudiosink name=\"audiosink\"",
> > audio_caps);
> > SPICE_DEBUG("audio pipeline: %s", pipeline);
> > p->playback.pipe = gst_parse_launch(pipeline, &error);
> > if (p->playback.pipe == NULL) {
> > g_warning("Failed to create pipeline: %s", error->message);
> > goto lerr;
> > }
> > p->playback.src = gst_bin_get_by_name(GST_BIN(p->playback.pipe),
> "appsrc");
> > p->playback.sink = gst_bin_get_by_name(GST_BIN(p->playback.pipe),
> > "audiosink");
> >
> > set volume code:
> > GstElement *e;
> > if (GST_IS_BIN(p->playback.sink))
> > e = gst_bin_get_by_interface(GST_BIN(p->playback.sink),
> > GST_TYPE_STREAM_VOLUME);
> > else
> > e = g_object_ref(p->playback.sink);
> >
> > I have debuged the code. when the volume was set, the e returned NULL.
> >
> > Is it a bug?
>
> If you don't have a sink, it means you are missing gstreamer plugins.
>
> On Windows, you need the directsoundsink element (from gst-plugins-good).
> It implements the "volume" property.
>
> cheers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20140225/45a1cbdd/attachment.html>


More information about the Spice-devel mailing list