Add a callback for codec format changed. am: 3b4b33f479
am: bfad736f8e
am: 76c4cddf79
Change-Id: I4bad76613ab35e86f78d17764ad44a89a8383278
This commit is contained in:
commit
779e55f0cc
1 changed files with 14 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue