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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 } | 62 } |
63 | 63 |
64 void DecoderInitialized(PP_Instance instance, | 64 void DecoderInitialized(PP_Instance instance, |
65 PP_Bool success, | 65 PP_Bool success, |
66 uint32_t request_id) { | 66 uint32_t request_id) { |
67 EnterInstance enter(instance); | 67 EnterInstance enter(instance); |
68 if (enter.succeeded()) | 68 if (enter.succeeded()) |
69 enter.functions()->DecoderInitialized(instance, success, request_id); | 69 enter.functions()->DecoderInitialized(instance, success, request_id); |
70 } | 70 } |
71 | 71 |
| 72 void DecoderDeinitializeDone(PP_Instance instance, |
| 73 PP_DecryptorStreamType decoder_type, |
| 74 uint32_t request_id) { |
| 75 EnterInstance enter(instance); |
| 76 if (enter.succeeded()) { |
| 77 enter.functions()->DecoderDeinitializeDone(instance, |
| 78 decoder_type, |
| 79 request_id); |
| 80 } |
| 81 } |
| 82 |
| 83 void DecoderResetDone(PP_Instance instance, |
| 84 PP_DecryptorStreamType decoder_type, |
| 85 uint32_t request_id) { |
| 86 EnterInstance enter(instance); |
| 87 if (enter.succeeded()) |
| 88 enter.functions()->DecoderResetDone(instance, decoder_type, request_id); |
| 89 } |
| 90 |
72 void DeliverFrame(PP_Instance instance, | 91 void DeliverFrame(PP_Instance instance, |
73 PP_Resource decrypted_frame, | 92 PP_Resource decrypted_frame, |
74 const PP_DecryptedFrameInfo* frame_info) { | 93 const PP_DecryptedFrameInfo* frame_info) { |
75 EnterInstance enter(instance); | 94 EnterInstance enter(instance); |
76 if (enter.succeeded()) | 95 if (enter.succeeded()) |
77 enter.functions()->DeliverFrame(instance, decrypted_frame, frame_info); | 96 enter.functions()->DeliverFrame(instance, decrypted_frame, frame_info); |
78 } | 97 } |
79 | 98 |
80 void DeliverSamples(PP_Instance instance, | 99 void DeliverSamples(PP_Instance instance, |
81 PP_Resource decrypted_samples, | 100 PP_Resource decrypted_samples, |
82 const PP_DecryptedBlockInfo* block_info) { | 101 const PP_DecryptedBlockInfo* block_info) { |
83 EnterInstance enter(instance); | 102 EnterInstance enter(instance); |
84 if (enter.succeeded()) | 103 if (enter.succeeded()) |
85 enter.functions()->DeliverSamples(instance, decrypted_samples, block_info); | 104 enter.functions()->DeliverSamples(instance, decrypted_samples, block_info); |
86 } | 105 } |
87 | 106 |
88 const PPB_ContentDecryptor_Private g_ppb_decryption_thunk = { | 107 const PPB_ContentDecryptor_Private g_ppb_decryption_thunk = { |
89 &NeedKey, | 108 &NeedKey, |
90 &KeyAdded, | 109 &KeyAdded, |
91 &KeyMessage, | 110 &KeyMessage, |
92 &KeyError, | 111 &KeyError, |
93 &DeliverBlock, | 112 &DeliverBlock, |
94 &DecoderInitialized, | 113 &DecoderInitialized, |
| 114 &DecoderDeinitializeDone, |
| 115 &DecoderResetDone, |
95 &DeliverFrame, | 116 &DeliverFrame, |
96 &DeliverSamples | 117 &DeliverSamples |
97 }; | 118 }; |
98 | 119 |
99 } // namespace | 120 } // namespace |
100 | 121 |
101 const PPB_ContentDecryptor_Private* | 122 const PPB_ContentDecryptor_Private* |
102 GetPPB_ContentDecryptor_Private_0_3_Thunk() { | 123 GetPPB_ContentDecryptor_Private_0_3_Thunk() { |
103 return &g_ppb_decryption_thunk; | 124 return &g_ppb_decryption_thunk; |
104 } | 125 } |
105 | 126 |
106 } // namespace thunk | 127 } // namespace thunk |
107 } // namespace ppapi | 128 } // namespace ppapi |
OLD | NEW |