OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ppapi/c/private/ppb_content_decryptor_private.h" | 5 #include "ppapi/c/private/ppb_content_decryptor_private.h" |
6 #include "ppapi/thunk/enter.h" | 6 #include "ppapi/thunk/enter.h" |
7 #include "ppapi/thunk/ppb_instance_api.h" | 7 #include "ppapi/thunk/ppb_instance_api.h" |
8 #include "ppapi/thunk/thunk.h" | 8 #include "ppapi/thunk/thunk.h" |
9 | 9 |
10 namespace ppapi { | 10 namespace ppapi { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 int32_t system_code) { | 48 int32_t system_code) { |
49 EnterInstance enter(instance); | 49 EnterInstance enter(instance); |
50 if (enter.succeeded()) { | 50 if (enter.succeeded()) { |
51 enter.functions()->KeyError(instance, key_system, session_id, media_error, | 51 enter.functions()->KeyError(instance, key_system, session_id, media_error, |
52 system_code); | 52 system_code); |
53 } | 53 } |
54 } | 54 } |
55 | 55 |
56 void DeliverBlock(PP_Instance instance, | 56 void DeliverBlock(PP_Instance instance, |
57 PP_Resource decrypted_block, | 57 PP_Resource decrypted_block, |
58 int32_t request_id) { | 58 const PP_DecryptedBlockInfo* block_info) { |
59 EnterInstance enter(instance); | 59 EnterInstance enter(instance); |
60 if (enter.succeeded()) | 60 if (enter.succeeded()) |
61 enter.functions()->DeliverBlock(instance, decrypted_block, request_id); | 61 enter.functions()->DeliverBlock(instance, decrypted_block, block_info); |
62 } | 62 } |
63 | 63 |
64 void DeliverFrame(PP_Instance instance, | 64 void DeliverFrame(PP_Instance instance, |
65 PP_Resource decrypted_frame, | 65 PP_Resource decrypted_frame, |
66 int32_t request_id) { | 66 const PP_DecryptedBlockInfo* block_info) { |
67 EnterInstance enter(instance); | 67 EnterInstance enter(instance); |
68 if (enter.succeeded()) | 68 if (enter.succeeded()) |
69 enter.functions()->DeliverFrame(instance, decrypted_frame, request_id); | 69 enter.functions()->DeliverFrame(instance, decrypted_frame, block_info); |
70 } | 70 } |
71 | 71 |
72 void DeliverSamples(PP_Instance instance, | 72 void DeliverSamples(PP_Instance instance, |
73 PP_Resource decrypted_samples, | 73 PP_Resource decrypted_samples, |
74 int32_t request_id) { | 74 const PP_DecryptedBlockInfo* block_info) { |
75 EnterInstance enter(instance); | 75 EnterInstance enter(instance); |
76 if (enter.succeeded()) | 76 if (enter.succeeded()) |
77 enter.functions()->DeliverSamples(instance, decrypted_samples, request_id); | 77 enter.functions()->DeliverSamples(instance, decrypted_samples, block_info); |
78 } | 78 } |
79 | 79 |
80 const PPB_ContentDecryptor_Private g_ppb_decryption_thunk = { | 80 const PPB_ContentDecryptor_Private g_ppb_decryption_thunk = { |
81 &NeedKey, | 81 &NeedKey, |
82 &KeyAdded, | 82 &KeyAdded, |
83 &KeyMessage, | 83 &KeyMessage, |
84 &KeyError, | 84 &KeyError, |
85 &DeliverBlock, | 85 &DeliverBlock, |
86 &DeliverFrame, | 86 &DeliverFrame, |
87 &DeliverSamples | 87 &DeliverSamples |
88 }; | 88 }; |
89 | 89 |
90 } // namespace | 90 } // namespace |
91 | 91 |
92 const PPB_ContentDecryptor_Private* | 92 const PPB_ContentDecryptor_Private* |
93 GetPPB_ContentDecryptor_Private_0_1_Thunk() { | 93 GetPPB_ContentDecryptor_Private_0_1_Thunk() { |
94 return &g_ppb_decryption_thunk; | 94 return &g_ppb_decryption_thunk; |
95 } | 95 } |
96 | 96 |
97 } // namespace thunk | 97 } // namespace thunk |
98 } // namespace ppapi | 98 } // namespace ppapi |
OLD | NEW |