| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2008 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that be | 3 * Use of this source code is governed by a BSD-style license that be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 // Native Client Photo Darkroom demo | 7 // Native Client Photo Darkroom demo |
| 8 // Uses SRPC (Simple Remote Procedure Call) | 8 // Uses SRPC (Simple Remote Procedure Call) |
| 9 // Uses low level NaCl multimedia system. | 9 // Uses low level NaCl multimedia system. |
| 10 // Runs in the browser. | 10 // Runs in the browser. |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 pthread_mutex_destroy(&mutex_); | 543 pthread_mutex_destroy(&mutex_); |
| 544 } | 544 } |
| 545 | 545 |
| 546 | 546 |
| 547 // SRPC function OpenPhoto | 547 // SRPC function OpenPhoto |
| 548 // invoked via Javascript, called from SRPC service thread. | 548 // invoked via Javascript, called from SRPC service thread. |
| 549 void OpenPhoto(NaClSrpcRpc* rpc, | 549 void OpenPhoto(NaClSrpcRpc* rpc, |
| 550 NaClSrpcArg** in_args, | 550 NaClSrpcArg** in_args, |
| 551 NaClSrpcArg** out_args, | 551 NaClSrpcArg** out_args, |
| 552 NaClSrpcClosure* done) { | 552 NaClSrpcClosure* done) { |
| 553 char* filename = in_args[0]->u.sval; | 553 char* filename = in_args[0]->arrays.str; |
| 554 g_darkroom.SetLoadFilename(filename); | 554 g_darkroom.SetLoadFilename(filename); |
| 555 rpc->result = NACL_SRPC_RESULT_OK; | 555 rpc->result = NACL_SRPC_RESULT_OK; |
| 556 done->Run(done); | 556 done->Run(done); |
| 557 } | 557 } |
| 558 | 558 |
| 559 | 559 |
| 560 // SRPC function UpdateSaturation | 560 // SRPC function UpdateSaturation |
| 561 // invoked via Javascript, called from SRPC service thread. | 561 // invoked via Javascript, called from SRPC service thread. |
| 562 void UpdateSaturation(NaClSrpcRpc* rpc, | 562 void UpdateSaturation(NaClSrpcRpc* rpc, |
| 563 NaClSrpcArg** in_args, | 563 NaClSrpcArg** in_args, |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 } | 866 } |
| 867 // initialize nacl video | 867 // initialize nacl video |
| 868 Initialize(); | 868 Initialize(); |
| 869 // run the photo demo loop | 869 // run the photo demo loop |
| 870 RunDemo(); | 870 RunDemo(); |
| 871 // shutdown nacl video | 871 // shutdown nacl video |
| 872 Shutdown(); | 872 Shutdown(); |
| 873 NaClSrpcModuleFini(); | 873 NaClSrpcModuleFini(); |
| 874 return 0; | 874 return 0; |
| 875 } | 875 } |
| OLD | NEW |