Add a callback for codec format changed. am: 3b4b33f479 am: bfad736f8e am: 76c4cddf79

Change-Id: I4bad76613ab35e86f78d17764ad44a89a8383278
This commit is contained in:
Automerger Merge Worker 2020-02-26 19:19:06 +00:00
commit 779e55f0cc

View file

@ -203,8 +203,15 @@ typedef enum {
STREAM_CBK_EVENT_ERROR, /* stream hit some error, let AF take action */
} stream_callback_event_t;
typedef enum {
STREAM_EVENT_CBK_TYPE_CODEC_FORMAT_CHANGED, /* codec format of the stream changed */
} stream_event_callback_type_t;
typedef int (*stream_callback_t)(stream_callback_event_t event, void *param, void *cookie);
typedef int (*stream_event_callback_t)(stream_event_callback_type_t event,
void *param, void *cookie);
/* type of drain requested to audio_stream_out->drain(). Mutually exclusive */
typedef enum {
AUDIO_DRAIN_ALL, /* drain() returns when all data has been played */
@ -422,6 +429,13 @@ struct audio_stream_out {
*/
void (*update_source_metadata)(struct audio_stream_out *stream,
const struct source_metadata* source_metadata);
/**
* Set the callback function for notifying events for an output stream.
*/
int (*set_event_callback)(struct audio_stream_out *stream,
stream_event_callback_t callback,
void *cookie);
};
typedef struct audio_stream_out audio_stream_out_t;