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

Side by Side Diff: ppapi/thunk/ppb_content_decryptor_private_thunk.cc

Issue 11028087: Add decoder de-initialize and reset to the Pepper CDM API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Finish first pass. Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 const PP_DecryptedBlockInfo* block_info) { 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, block_info); 61 enter.functions()->DeliverBlock(instance, decrypted_block, block_info);
62 } 62 }
63 63
64 void DecoderReset(PP_Instance instance, uint32_t request_id) {
65 EnterInstance enter(instance);
66 if (enter.succeeded())
67 enter.functions()->DecoderReset(instance, request_id);
68 }
69
70 void DecoderStopped(PP_Instance instance, uint32_t request_id) {
71 EnterInstance enter(instance);
72 if (enter.succeeded())
73 enter.functions()->DecoderStopped(instance, request_id);
74 }
75
64 void DeliverFrame(PP_Instance instance, 76 void DeliverFrame(PP_Instance instance,
65 PP_Resource decrypted_frame, 77 PP_Resource decrypted_frame,
66 const PP_DecryptedFrameInfo* frame_info) { 78 const PP_DecryptedFrameInfo* frame_info) {
67 EnterInstance enter(instance); 79 EnterInstance enter(instance);
68 if (enter.succeeded()) 80 if (enter.succeeded())
69 enter.functions()->DeliverFrame(instance, decrypted_frame, frame_info); 81 enter.functions()->DeliverFrame(instance, decrypted_frame, frame_info);
70 } 82 }
71 83
72 void DeliverSamples(PP_Instance instance, 84 void DeliverSamples(PP_Instance instance,
73 PP_Resource decrypted_samples, 85 PP_Resource decrypted_samples,
74 const PP_DecryptedBlockInfo* block_info) { 86 const PP_DecryptedBlockInfo* block_info) {
75 EnterInstance enter(instance); 87 EnterInstance enter(instance);
76 if (enter.succeeded()) 88 if (enter.succeeded())
77 enter.functions()->DeliverSamples(instance, decrypted_samples, block_info); 89 enter.functions()->DeliverSamples(instance, decrypted_samples, block_info);
78 } 90 }
79 91
80 const PPB_ContentDecryptor_Private g_ppb_decryption_thunk = { 92 const PPB_ContentDecryptor_Private g_ppb_decryption_thunk = {
81 &NeedKey, 93 &NeedKey,
82 &KeyAdded, 94 &KeyAdded,
83 &KeyMessage, 95 &KeyMessage,
84 &KeyError, 96 &KeyError,
85 &DeliverBlock, 97 &DeliverBlock,
98 &DecoderReset,
99 &DecoderStopped,
86 &DeliverFrame, 100 &DeliverFrame,
87 &DeliverSamples 101 &DeliverSamples
88 }; 102 };
89 103
90 } // namespace 104 } // namespace
91 105
92 const PPB_ContentDecryptor_Private* 106 const PPB_ContentDecryptor_Private*
93 GetPPB_ContentDecryptor_Private_0_2_Thunk() { 107 GetPPB_ContentDecryptor_Private_0_3_Thunk() {
94 return &g_ppb_decryption_thunk; 108 return &g_ppb_decryption_thunk;
95 } 109 }
96 110
97 } // namespace thunk 111 } // namespace thunk
98 } // namespace ppapi 112 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698