/// <summary> /// Removes a pipeline/bin from the audio player tee, optionally using pad blocking /// </summary> /// <param name="bin"> /// The <see cref="Bin"/> to remove /// </param> /// <param name="use_pad_block"> /// A <see cref="System.Boolean"/> indicating whether to use pad blocking or not /// </param> /// <returns> /// A <see cref="System.Boolean"/> -- always true /// </returns> public bool RemoveBin (Bin bin, bool use_pad_block) { IntPtr user_data = bin.ToIntPtr (); Pad fixture_pad = this.GetStaticPad ("sink"); Pad block_pad = fixture_pad.GetPeer (); fixture_pad.UnRef (); if (use_pad_block) { Hyena.Log.Debug ("[Streamrecorder.PlayerAudioTee]<RemoveBin> blockin pad " + block_pad.GetPathString () + " to perform an operation"); block_pad.SetBlockedAsync (true, ReallyRemoveBin, user_data); } else { Hyena.Log.Debug ("[Streamrecorder.PlayerAudioTee]<RemoveBin> not using blockin pad, calling operation directly"); ReallyRemoveBin (block_pad.ToIntPtr (), false, user_data); } block_pad.UnRef (); return true; }
/// <summary> /// Removes a pipeline/bin from the audio player tee, optionally using pad blocking /// </summary> /// <param name="bin"> /// The <see cref="Bin"/> to remove /// </param> /// <param name="use_pad_block"> /// A <see cref="System.Boolean"/> indicating whether to use pad blocking or not /// </param> /// <returns> /// A <see cref="System.Boolean"/> -- always true /// </returns> public bool RemoveBin(Bin bin, bool use_pad_block) { IntPtr user_data = bin.ToIntPtr (); Pad fixture_pad = this.GetStaticPad ("sink"); Pad block_pad = fixture_pad.GetPeer (); fixture_pad.UnRef (); if (use_pad_block) { ulong blocking_probe = block_pad.AddProbe (PadProbeType.GST_PAD_PROBE_TYPE_BLOCK, ReallyRemoveBinBlocked, user_data, null); Hyena.Log.DebugFormat ("[Streamrecorder.PlayerAudioTee]<RemoveBin> blockin pad {0} to perform an operation ({1})", block_pad.GetPathString (), blocking_probe); } else { Hyena.Log.Debug ("[Streamrecorder.PlayerAudioTee]<RemoveBin> not using blockin pad, calling operation directly"); ReallyRemoveBinUnblocked (block_pad.ToIntPtr (), IntPtr.Zero, user_data); } block_pad.UnRef (); return true; }