1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
7 * This file defines the trusted audio interface.
15 * This interface is to be used by proxy implementations. All
16 * functions should be called from the main thread only. The
17 * resource returned is an Audio resource; most of the PPB_Audio
18 * interface is also usable on this resource.
20 [mainthread
, macro
="PPB_AUDIO_TRUSTED_INTERFACE"]
21 interface PPB_AudioTrusted
{
22 /** Returns an audio resource. */
23 PP_Resource CreateTrusted
(
24 [in] PP_Instance instance
);
27 * Opens a paused audio interface, used by trusted side of proxy.
28 * Returns PP_ERROR_WOULD_BLOCK on success, and invokes
29 * the |create_callback| asynchronously to complete.
30 * As this function should always be invoked from the main thread,
31 * do not use the blocking variant of PP_CompletionCallback.
34 [in] PP_Resource audio
,
35 [in] PP_Resource config
,
36 [in] PP_CompletionCallback create_callback
);
39 * Get the sync socket. Use once Open has completed.
40 * Returns PP_OK on success.
42 int32_t GetSyncSocket
(
43 [in] PP_Resource audio
,
44 [out] handle_t sync_socket
);
47 * Get the shared memory interface. Use once Open has completed.
48 * Returns PP_OK on success.
50 int32_t GetSharedMemory
(
51 [in] PP_Resource audio
,
52 [out] handle_t shm_handle
,
53 [out] uint32_t shm_size
);