]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/source-output.h
Merge commit 'elmarco/bluetooth-fixes'
[pulseaudio] / src / pulsecore / source-output.h
index 91f28f94a0f8ca6b5273f978dbf81c7c0089289c..8d57ded465505333e44fe12712b2599e057ba642 100644 (file)
@@ -8,7 +8,7 @@
 
   PulseAudio is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published
 
   PulseAudio is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published
-  by the Free Software Foundation; either version 2 of the License,
+  by the Free Software Foundation; either version 2.1 of the License,
   or (at your option) any later version.
 
   PulseAudio is distributed in the hope that it will be useful, but
   or (at your option) any later version.
 
   PulseAudio is distributed in the hope that it will be useful, but
@@ -122,7 +122,7 @@ struct pa_source_output {
 
     /* If non-NULL called whenever the the source this output is attached
      * to changes. Called from main context */
 
     /* If non-NULL called whenever the the source this output is attached
      * to changes. Called from main context */
-    void (*moved) (pa_source_output *o);   /* may be NULL */
+    void (*moving) (pa_source_output *o);   /* may be NULL */
 
     /* Supposed to unlink and destroy this stream. Called from main
      * context. */
 
     /* Supposed to unlink and destroy this stream. Called from main
      * context. */
@@ -143,6 +143,10 @@ struct pa_source_output {
      * will not be allowed */
     pa_bool_t (*may_move_to) (pa_source_output *o, pa_source *s); /* may be NULL */
 
      * will not be allowed */
     pa_bool_t (*may_move_to) (pa_source_output *o, pa_source *s); /* may be NULL */
 
+    /* If non-NULL this function is used to dispatch asynchronous
+     * control events. */
+    void (*send_event)(pa_source_output *o, const char *event, pa_proplist* data);
+
     struct {
         pa_source_output_state_t state;
 
     struct {
         pa_source_output_state_t state;
 
@@ -177,6 +181,12 @@ enum {
     PA_SOURCE_OUTPUT_MESSAGE_MAX
 };
 
     PA_SOURCE_OUTPUT_MESSAGE_MAX
 };
 
+typedef struct pa_source_output_send_event_hook_data {
+    pa_source_output *source_output;
+    const char *event;
+    pa_proplist *data;
+} pa_source_output_send_event_hook_data;
+
 typedef struct pa_source_output_new_data {
     pa_proplist *proplist;
     pa_sink_input *direct_on_input;
 typedef struct pa_source_output_new_data {
     pa_proplist *proplist;
     pa_sink_input *direct_on_input;
@@ -229,10 +239,12 @@ void pa_source_output_kill(pa_source_output*o);
 
 pa_usec_t pa_source_output_get_latency(pa_source_output *o, pa_usec_t *source_latency);
 
 
 pa_usec_t pa_source_output_get_latency(pa_source_output *o, pa_usec_t *source_latency);
 
-pa_bool_t pa_source_output_update_proplist(pa_source_output *o, pa_update_mode_t mode, pa_proplist *p);
+void pa_source_output_update_proplist(pa_source_output *o, pa_update_mode_t mode, pa_proplist *p);
 
 pa_resample_method_t pa_source_output_get_resample_method(pa_source_output *o);
 
 
 pa_resample_method_t pa_source_output_get_resample_method(pa_source_output *o);
 
+void pa_source_output_send_event(pa_source_output *o, const char *name, pa_proplist *data);
+
 pa_bool_t pa_source_output_may_move(pa_source_output *o);
 pa_bool_t pa_source_output_may_move_to(pa_source_output *o, pa_source *dest);
 int pa_source_output_move_to(pa_source_output *o, pa_source *dest, pa_bool_t save);
 pa_bool_t pa_source_output_may_move(pa_source_output *o);
 pa_bool_t pa_source_output_may_move_to(pa_source_output *o, pa_source *dest);
 int pa_source_output_move_to(pa_source_output *o, pa_source *dest, pa_bool_t save);