Remove control source after fade in?

Olivier CrĂȘte olivier.crete at collabora.com
Mon May 13 15:23:10 UTC 2019


Hi,
Yes, the control source will always override manually set properties before they are used. If you want to set it manually, you have to remove the control binding with gst_object_remove_control_binding(), you can retrive it with gst_object_get_control_binding()
Olivier
On Mon, 2019-05-13 at 15:09 +0000, Weber, Holger wrote:
> Hi,
>  
> I use a control source to fade in an audio stream when my pipeline is started.
> The fade in works as expected (see code).
>  
>         GstControlSource* pCtrlSource = gst_interpolation_control_source_new();
>         g_object_set(pCtrlSource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
>         gst_object_add_control_binding(GST_OBJECT_CAST(m_pElVolume), gst_direct_control_binding_new(GST_OBJECT_CAST(m_pElVolume), "volume", pCtrlSource));
>         GstTimedValueControlSource *tv_csource = (GstTimedValueControlSource *) pCtrlSource;
>         gst_timed_value_control_source_set(tv_csource, 0 * GST_MSECOND, 0.0);
>         gst_timed_value_control_source_set(tv_csource, iFadeInMs * GST_MSECOND, 0.0);
>         gst_timed_value_control_source_set(tv_csource, (iFadeInMs + iFADE_RAMP_TIM_MS) * GST_MSECOND, 0.10);
>         gst_object_unref(pCtrlSource);
>  
> There is another function which is triggered from outside some minutes later which tries to reduce the volume to 50%.
> 
> Therefore I directly set the volume property:
> g_object_set(G_OBJECT(m_pElVolume), "volume", 0.5, NULL);
>  
> But nothing happens. If I remove the control source (just uncomment code above) reducing the volume works as expected.
> I guess that I have to remove or destroy something after the fade in but I have no idea.
>  
> Any ideas?
> 
> 
> 
> 
> _______________________________________________gstreamer-devel mailing listgstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-- 
Olivier CrĂȘte
olivier.crete at collabora.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190513/2c423908/attachment.html>


More information about the gstreamer-devel mailing list