<div dir="ltr">

<div style="box-sizing:border-box;font-family:"Segoe UI",system-ui,"Apple Color Emoji","Segoe UI Emoji",sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div>Hi,</div><div><br></div>

<div>
<div> </div>

<div>
<div>I need to stop my pipeline from a pulsesink element, whenever pulseaudio sends a custom defined stream event.<br>

I able to get the event from pulseaudio in the callback - gst_pulsering_stream_event_cb (<a href="https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/blob/master/ext/pulse/pulsesink.c#L789">https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/blob/master/ext/pulse/pulsesink.c#L789</a>)</div>

<div>
<div> </div>

<div>
<div>I am looking for the proper way to get the pipeline terminated upon getting the event from pulseaudio<br>

I am thinking of two options :<br>

1. send EOS from the pulsesink/basesink and use the EOS event in the application bus callback to stop the pipeline<br>

2. post NULL state msg request to the bus (like how PAUSED is posted upon CORK stream event currently)</div>

<div>
<div> </div>

<div>
<div>I am not sure if the clean up will be proper with the above two ways.<br>

Is there any better way for the sink elements to request for termination of the pipeline? </div></div></div></div></div></div></div></div>

</div>