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

Unified Diff: ppapi/shared_impl/ppb_audio_shared.h

Issue 10809079: Modify the PPB_Audio_Shared code for NaCl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 months 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
« no previous file with comments | « ppapi/shared_impl/DEPS ('k') | ppapi/shared_impl/ppb_audio_shared.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/ppb_audio_shared.h
===================================================================
--- ppapi/shared_impl/ppb_audio_shared.h (revision 148266)
+++ ppapi/shared_impl/ppb_audio_shared.h (working copy)
@@ -13,6 +13,10 @@
#include "ppapi/shared_impl/resource.h"
#include "ppapi/thunk/ppb_audio_api.h"
+#if defined(OS_NACL)
+#include "native_client/src/untrusted/irt/irt_ppapi.h"
+#endif
+
namespace ppapi {
// Implements the logic to map shared memory and run the audio thread signaled
@@ -54,6 +58,11 @@
size_t shared_memory_size,
base::SyncSocket::Handle socket_handle);
+#if defined(OS_NACL)
+ // NaCl has a special API for IRT code to create threads that can call back
+ // into user code.
+ static void SetThreadFunctions(const struct PP_ThreadFunctions* functions);
+#endif
private:
// Starts execution of the audio thread.
void StartThread();
@@ -79,9 +88,16 @@
// The size of the sample buffer in bytes.
size_t shared_memory_size_;
+#if !defined(OS_NACL)
// When the callback is set, this thread is spawned for calling it.
scoped_ptr<base::DelegateSimpleThread> audio_thread_;
+#else
+ uintptr_t thread_id_;
+ bool thread_active_;
+ static void CallRun(void* self);
+#endif
+
// Callback to call when audio is ready to accept new samples.
PPB_Audio_Callback callback_;
« no previous file with comments | « ppapi/shared_impl/DEPS ('k') | ppapi/shared_impl/ppb_audio_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698