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 #ifndef WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ | 5 #ifndef WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ |
6 #define WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ | 6 #define WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
| 14 #include "media/base/decryptor_client.h" |
14 #include "media/base/pipeline.h" | 15 #include "media/base/pipeline.h" |
15 #include "media/crypto/decryptor_client.h" | |
16 #include "media/filters/chunk_demuxer.h" | 16 #include "media/filters/chunk_demuxer.h" |
17 #include "media/filters/chunk_demuxer_client.h" | 17 #include "media/filters/chunk_demuxer_client.h" |
18 #include "media/filters/ffmpeg_video_decoder.h" | 18 #include "media/filters/ffmpeg_video_decoder.h" |
19 #include "webkit/media/buffered_data_source.h" | 19 #include "webkit/media/buffered_data_source.h" |
20 #include "webkit/media/skcanvas_video_renderer.h" | 20 #include "webkit/media/skcanvas_video_renderer.h" |
21 | 21 |
22 class SkCanvas; | 22 class SkCanvas; |
23 | 23 |
24 namespace base { | 24 namespace base { |
25 class MessageLoopProxy; | 25 class MessageLoopProxy; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 bool DemuxerAppend(const std::string& id, const uint8* data, size_t length); | 105 bool DemuxerAppend(const std::string& id, const uint8* data, size_t length); |
106 void DemuxerAbort(const std::string& id); | 106 void DemuxerAbort(const std::string& id); |
107 void DemuxerEndOfStream(media::PipelineStatus status); | 107 void DemuxerEndOfStream(media::PipelineStatus status); |
108 void DemuxerShutdown(); | 108 void DemuxerShutdown(); |
109 | 109 |
110 // DecryptorClient implementation. | 110 // DecryptorClient implementation. |
111 virtual void KeyAdded(const std::string& key_system, | 111 virtual void KeyAdded(const std::string& key_system, |
112 const std::string& session_id) OVERRIDE; | 112 const std::string& session_id) OVERRIDE; |
113 virtual void KeyError(const std::string& key_system, | 113 virtual void KeyError(const std::string& key_system, |
114 const std::string& session_id, | 114 const std::string& session_id, |
115 media::AesDecryptor::KeyError error_code, | 115 media::Decryptor::KeyError error_code, |
116 int system_code) OVERRIDE; | 116 int system_code) OVERRIDE; |
117 virtual void KeyMessage(const std::string& key_system, | 117 virtual void KeyMessage(const std::string& key_system, |
118 const std::string& session_id, | 118 const std::string& session_id, |
119 scoped_array<uint8> message, | 119 scoped_array<uint8> message, |
120 int message_length, | 120 int message_length, |
121 const std::string& default_url) OVERRIDE; | 121 const std::string& default_url) OVERRIDE; |
122 virtual void NeedKey(const std::string& key_system, | 122 virtual void NeedKey(const std::string& key_system, |
123 const std::string& session_id, | 123 const std::string& session_id, |
124 scoped_array<uint8> init_data, | 124 scoped_array<uint8> init_data, |
125 int init_data_size) OVERRIDE; | 125 int init_data_size) OVERRIDE; |
(...skipping 24 matching lines...) Expand all Loading... |
150 void DemuxerOpenedTask(const scoped_refptr<media::ChunkDemuxer>& demuxer); | 150 void DemuxerOpenedTask(const scoped_refptr<media::ChunkDemuxer>& demuxer); |
151 void DemuxerClosedTask(); | 151 void DemuxerClosedTask(); |
152 | 152 |
153 // Notify |webmediaplayer_| that a key has been added. | 153 // Notify |webmediaplayer_| that a key has been added. |
154 void KeyAddedTask(const std::string& key_system, | 154 void KeyAddedTask(const std::string& key_system, |
155 const std::string& session_id); | 155 const std::string& session_id); |
156 | 156 |
157 // Notify |webmediaplayer_| that a key error occurred. | 157 // Notify |webmediaplayer_| that a key error occurred. |
158 void KeyErrorTask(const std::string& key_system, | 158 void KeyErrorTask(const std::string& key_system, |
159 const std::string& session_id, | 159 const std::string& session_id, |
160 media::AesDecryptor::KeyError error_code, | 160 media::Decryptor::KeyError error_code, |
161 int system_code); | 161 int system_code); |
162 | 162 |
163 // Notify |webmediaplayer_| that a key message has been generated. | 163 // Notify |webmediaplayer_| that a key message has been generated. |
164 void KeyMessageTask(const std::string& key_system, | 164 void KeyMessageTask(const std::string& key_system, |
165 const std::string& session_id, | 165 const std::string& session_id, |
166 scoped_array<uint8> message, | 166 scoped_array<uint8> message, |
167 int message_length, | 167 int message_length, |
168 const std::string& default_url); | 168 const std::string& default_url); |
169 | 169 |
170 // Notify |webmediaplayer_| that a key is needed for decryption. | 170 // Notify |webmediaplayer_| that a key is needed for decryption. |
(...skipping 15 matching lines...) Expand all Loading... |
186 int outstanding_repaints_; | 186 int outstanding_repaints_; |
187 | 187 |
188 scoped_refptr<media::ChunkDemuxer> chunk_demuxer_; | 188 scoped_refptr<media::ChunkDemuxer> chunk_demuxer_; |
189 | 189 |
190 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerProxy); | 190 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerProxy); |
191 }; | 191 }; |
192 | 192 |
193 } // namespace webkit_media | 193 } // namespace webkit_media |
194 | 194 |
195 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ | 195 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_PROXY_H_ |
OLD | NEW |