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

Side by Side Diff: webkit/plugins/ppapi/content_decryptor_delegate.h

Issue 11929015: Tighten up media::DecoderBuffer API contract for end of stream buffers (round 2). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 #ifndef WEBKIT_PLUGINS_PPAPI_CONTENT_DECRYPTOR_DELEGATE_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_CONTENT_DECRYPTOR_DELEGATE_H_
6 #define WEBKIT_PLUGINS_PPAPI_CONTENT_DECRYPTOR_DELEGATE_H_ 6 #define WEBKIT_PLUGINS_PPAPI_CONTENT_DECRYPTOR_DELEGATE_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 10
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 private: 104 private:
105 // Cancels the pending decrypt-and-decode callback for |stream_type|. 105 // Cancels the pending decrypt-and-decode callback for |stream_type|.
106 void CancelDecode(media::Decryptor::StreamType stream_type); 106 void CancelDecode(media::Decryptor::StreamType stream_type);
107 107
108 // Fills |resource| with a PPB_Buffer_Impl and copies |data| into the buffer 108 // Fills |resource| with a PPB_Buffer_Impl and copies |data| into the buffer
109 // resource. This method reuses |audio_input_resource_| and 109 // resource. This method reuses |audio_input_resource_| and
110 // |video_input_resource_| to reduce the latency in requesting new 110 // |video_input_resource_| to reduce the latency in requesting new
111 // PPB_Buffer_Impl resources. The caller must make sure that 111 // PPB_Buffer_Impl resources. The caller must make sure that
112 // |audio_input_resource_| or |video_input_resource_| is available before 112 // |audio_input_resource_| or |video_input_resource_| is available before
113 // calling this method. 113 // calling this method.
114 // If |data| is NULL, sets |*resource| to NULL. 114 //
115 // Returns true upon success and false if any error happened. 115 // Returns true upon success and false if any error happened.
116 bool MakeMediaBufferResource(media::Decryptor::StreamType stream_type, 116 bool MakeMediaBufferResource(media::Decryptor::StreamType stream_type,
117 const uint8* data, uint32_t size, 117 const uint8* data, uint32_t size,
118 scoped_refptr<PPB_Buffer_Impl>* resource); 118 scoped_refptr<PPB_Buffer_Impl>* resource);
119 119
120 void FreeBuffer(uint32_t buffer_id); 120 void FreeBuffer(uint32_t buffer_id);
121 121
122 void SetBufferToFreeInTrackingInfo(PP_DecryptTrackingInfo* tracking_info); 122 void SetBufferToFreeInTrackingInfo(PP_DecryptTrackingInfo* tracking_info);
123 123
124 const PP_Instance pp_instance_; 124 const PP_Instance pp_instance_;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 base::WeakPtrFactory<ContentDecryptorDelegate> weak_ptr_factory_; 165 base::WeakPtrFactory<ContentDecryptorDelegate> weak_ptr_factory_;
166 base::WeakPtr<ContentDecryptorDelegate> weak_this_; 166 base::WeakPtr<ContentDecryptorDelegate> weak_this_;
167 167
168 DISALLOW_COPY_AND_ASSIGN(ContentDecryptorDelegate); 168 DISALLOW_COPY_AND_ASSIGN(ContentDecryptorDelegate);
169 }; 169 };
170 170
171 } // namespace ppapi 171 } // namespace ppapi
172 } // namespace webkit 172 } // namespace webkit
173 173
174 #endif // WEBKIT_PLUGINS_PPAPI_CONTENT_DECRYPTOR_DELEGATE_H_ 174 #endif // WEBKIT_PLUGINS_PPAPI_CONTENT_DECRYPTOR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698