Browse Source
For modularity/clarity reasons, move the capture API in a specific header. The current audio/ header license is MIT. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>pull/307/head
5 changed files with 46 additions and 33 deletions
@ -0,0 +1,43 @@ |
|||
/*
|
|||
* QEMU Audio subsystem |
|||
* |
|||
* SPDX-License-Identifier: MIT |
|||
*/ |
|||
#ifndef QEMU_AUDIO_CAPTURE_H |
|||
#define QEMU_AUDIO_CAPTURE_H |
|||
|
|||
#include "audio.h" |
|||
|
|||
typedef struct CaptureVoiceOut CaptureVoiceOut; |
|||
|
|||
typedef enum { |
|||
AUD_CNOTIFY_ENABLE, |
|||
AUD_CNOTIFY_DISABLE |
|||
} audcnotification_e; |
|||
|
|||
struct audio_capture_ops { |
|||
void (*notify) (void *opaque, audcnotification_e cmd); |
|||
void (*capture) (void *opaque, const void *buf, int size); |
|||
void (*destroy) (void *opaque); |
|||
}; |
|||
|
|||
struct capture_ops { |
|||
void (*info) (void *opaque); |
|||
void (*destroy) (void *opaque); |
|||
}; |
|||
|
|||
typedef struct CaptureState { |
|||
void *opaque; |
|||
struct capture_ops ops; |
|||
QLIST_ENTRY(CaptureState) entries; |
|||
} CaptureState; |
|||
|
|||
CaptureVoiceOut *AUD_add_capture( |
|||
AudioBackend *be, |
|||
struct audsettings *as, |
|||
struct audio_capture_ops *ops, |
|||
void *opaque |
|||
); |
|||
void AUD_del_capture (CaptureVoiceOut *cap, void *cb_opaque); |
|||
|
|||
#endif /* QEMU_AUDIO_CAPTURE_H */ |
|||
Loading…
Reference in new issue