Bug 698328 - Add a new cubeb backend based on AudioTrack.cpp. r=kinetik
[gecko.git] / media / libcubeb / src / cubeb-internal.h
blobf617a56adf054c553dbee8ad80fe0db5c720bfab
1 /*
2 * Copyright © 2013 Mozilla Foundation
4 * This program is made available under an ISC-style license. See the
5 * accompanying file LICENSE for details.
6 */
7 #if !defined(CUBEB_INTERNAL_0eb56756_4e20_4404_a76d_42bf88cd15a5)
8 #define CUBEB_INTERNAL_0eb56756_4e20_4404_a76d_42bf88cd15a5
10 #include "cubeb/cubeb.h"
12 struct cubeb_ops {
13 int (* init)(cubeb ** context, char const * context_name);
14 char const * (* get_backend_id)(cubeb * context);
15 void (* destroy)(cubeb * context);
16 int (* stream_init)(cubeb * context, cubeb_stream ** stream, char const * stream_name,
17 cubeb_stream_params stream_params, unsigned int latency,
18 cubeb_data_callback data_callback,
19 cubeb_state_callback state_callback,
20 void * user_ptr);
21 void (* stream_destroy)(cubeb_stream * stream);
22 int (* stream_start)(cubeb_stream * stream);
23 int (* stream_stop)(cubeb_stream * stream);
24 int (* stream_get_position)(cubeb_stream * stream, uint64_t * position);
27 #endif /* CUBEB_INTERNAL_0eb56756_4e20_4404_a76d_42bf88cd15a5 */