Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(675)

Unified Diff: ppapi/c/dev/ppb_audio_trusted_dev.h

Issue 5202002: changes for proxy audio (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/c/dev/ppb_audio_trusted_dev.h
===================================================================
--- ppapi/c/dev/ppb_audio_trusted_dev.h (revision 66651)
+++ ppapi/c/dev/ppb_audio_trusted_dev.h (working copy)
@@ -5,23 +5,34 @@
#ifndef PPAPI_C_DEV_PPB_AUDIO_TRUSTED_DEV_H_
#define PPAPI_C_DEV_PPB_AUDIO_TRUSTED_DEV_H_
+#include "ppapi/c/pp_completion_callback.h"
+#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_resource.h"
-#define PPB_AUDIO_TRUSTED_DEV_INTERFACE "PPB_AudioTrusted(Dev);0.1"
+#define PPB_AUDIO_TRUSTED_DEV_INTERFACE "PPB_AudioTrusted(Dev);0.2"
-// This interface is used to get access to the audio buffer and a socket on
-// which the client can block until the audio is ready to accept more data.
-// This interface should be used by NaCl to implement the Audio interface.
+// This interface is to be used by proxy implementations. All
+// functions should be called from the main thread only. The
+// resource returned is an Audio resource; most of the PPB_Audio_Dev
+// interface is also usable on this resource.
struct PPB_AudioTrusted_Dev {
- // Returns a Buffer object that has the audio buffer.
- PP_Resource (*GetBuffer)(PP_Resource audio);
-
- // Returns a select()-able/Wait()-able OS-specific descriptor. The browser
- // will put a byte on the socket each time the buffer is ready to be filled.
- // The plugin can then implement its own audio thread using select()/poll() to
- // block until the browser is ready to receive data.
- int (*GetOSDescriptor)(PP_Resource audio);
+ // Returns an audio resource.
+ PP_Resource (*CreateTrusted)(PP_Instance instance);
+ // Opens a paused audio interface, used by trusted side of proxy.
brettw 2010/11/22 18:22:09 Put blank lines between functions.
nfullagar 2010/11/23 02:48:58 Done.
+ // Returns 0 on success, negative error code on failure
+ int32_t (*Open)(PP_Resource audio, PP_Resource config,
brettw 2010/11/22 18:22:09 Rather than "Returns 0 on success, negative error
neb 2010/11/22 19:48:26 Why is Open() separate from CreateTrusted(), aren'
brettw 2010/11/22 20:14:47 At least in my patch, I this separation because I
nfullagar 2010/11/23 02:48:58 Done.
nfullagar 2010/11/23 02:48:58 Same as Brett, needed to pass PP_Resource in the c
+ PP_CompletionCallback create_callback);
+ // Get the sync socket. Use from completion callback.
+ // Returns PP_TRUE on success.
+ PP_Bool (*GetSyncSocket)(PP_Resource audio, int* sync_socket);
+ // Get the shared memory interface. Use from completion callback.
+ // Returns PP_TRUE on success.
+ PP_Bool (*GetSharedMemory)(PP_Resource audio,
+ uint64_t* shm_handle,
+ int32_t* shm_size);
+ // Close the resource. If the completion callback passed in on Open
+ // has not yet fired, it will be fired from here with an error condition.
+ void (*Close)(PP_Resource audio);
brettw 2010/11/22 18:22:09 I don't think we need this. There's no way to inte
nfullagar 2010/11/23 02:48:58 Close() removed
};
#endif // PPAPI_C_DEV_PPB_AUDIO_TRUSTED_DEV_H_
-

Powered by Google App Engine
This is Rietveld 408576698