Hi<br>
<br>
I am trying to understand how the corking/uncorking events reach from PA module to PA applications/clients e.g gst-launch <br>
<br>
Say, we are corking the playback stream in module-cork-music-on-phone by calling :<br>
<br>
apply_cork(struct userdata *u, pa_sink *s, pa_sink_input *ignore, pa_bool_t cork)<br>
pa_sink_input_send_event(ignore, PA_STREAM_EVENT_REQUEST_CORK, NULL); (in sink-input.c)<br>
(pa_hook_fire(&i->core->hooks[PA_CORE_HOOK_SINK_INPUT_SEND_EVENT],
&hook_data) (function then fire an hook)<br>
sink_input_send_event_hook_cb( pa_core *c,
pa_sink_input_send_event_hook_data *data, struct userdata *u) ( in
module-x11-cork-request, passing *data that contains cork event)<br>
<br>
<br>
now inside sink_input_send_event_hook_cb( ) ( in module-x11-cork-request ) there is an if-else check <br>
<br>
if (pa_streq(data->event, PA_STREAM_EVENT_REQUEST_CORK))<br>
sym = XF86XK_AudioPause;<br>
else if (pa_streq(data->event, PA_STREAM_EVENT_REQUEST_UNCORK))<br>
sym = XF86XK_AudioPlay;<br>
else<br>
return PA_HOOK_OK;<br>
<br>
further the same function is calling <br>
XTestFakeKeyEvent(display, code, True, CurrentTime);<br>
XSync(display, False);<br>
<br>
But it is not clear to me how the Cork/Uncork events then reach to PA
client (say pulsesink or Gst-launch) and then where gst listens to these
events and pause / resume gst pipeline accordingly ?<br>
Is pulsesink involved here somehow ? I can see
gst_pulsering_stream_event_cb( ) function (inside pulsesink.c)
handling PA_STREAM_EVENT_REQUEST_CORK but currently it is under #ifdef
HAVE_PULSE_0_9_15 flag and disabled.<br>
<br>
Thanks in advance,<br>
<br>
Best Regards,<br>
Himanshu