<div dir="ltr"><div>Hi all!</div><div><br></div><div>I connected Spice server by windows spice client which is complied by mingw32, and set the volume.</div><div><br></div><div>But the volume didn't change.</div><div><br>
</div><div>the code form: <a href="https://gitorious.org/spice-gtk/spice-gtk-elmarco/source/f270119352604755a13fcc87783127c3d96c4f61:gtk/spice-gstaudio.c">https://gitorious.org/spice-gtk/spice-gtk-elmarco/source/f270119352604755a13fcc87783127c3d96c4f61:gtk/spice-gstaudio.c</a></div>
<div><br></div><div>create pipe code:</div><div><span class="" style="white-space:pre">           </span>if (pipeline == NULL)</div><div>            pipeline = g_strdup_printf("appsrc is-live=1 do-timestamp=0 caps=\"%s\" name=\"appsrc\" ! queue ! "</div>
<div>                                       "audioconvert ! audioresample ! autoaudiosink name=\"audiosink\"", audio_caps);</div><div>        SPICE_DEBUG("audio pipeline: %s", pipeline);</div>
<div>        p->playback.pipe = gst_parse_launch(pipeline, &error);</div><div>        if (p->playback.pipe == NULL) {</div><div>            g_warning("Failed to create pipeline: %s", error->message);</div>
<div>            goto lerr;</div><div>        }</div><div>        p->playback.src = gst_bin_get_by_name(GST_BIN(p->playback.pipe), "appsrc");</div><div>        p->playback.sink = gst_bin_get_by_name(GST_BIN(p->playback.pipe), "audiosink");</div>
<div><br></div><div>set volume code:</div><div><span class="" style="white-space:pre">    </span>GstElement *e;</div><div>    if (GST_IS_BIN(p->playback.sink))</div><div>        e = gst_bin_get_by_interface(GST_BIN(p->playback.sink), GST_TYPE_STREAM_VOLUME);</div>
<div>    else</div><div>        e = g_object_ref(p->playback.sink);</div><div><br></div><div>I have debuged the code. when the volume was set, the e returned NULL.</div><div><br></div><div>Is it a bug?</div><div><br></div>
<div>Thanks!</div></div>