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

Side by Side Diff: webkit/media/crypto/proxy_decryptor.h

Issue 10969028: Add video decoding methods in Decryptor and add DecryptingVideoDecoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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.
ddorwin 2012/09/21 00:36:08 Does this class eventually go away?
xhwang 2012/09/25 23:52:32 Not. This class is handling the kNoKey logic which
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_CRYPTO_PROXY_DECRYPTOR_H_ 5 #ifndef WEBKIT_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_
6 #define WEBKIT_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ 6 #define WEBKIT_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 const uint8* key, 50 const uint8* key,
51 int key_length, 51 int key_length,
52 const uint8* init_data, 52 const uint8* init_data,
53 int init_data_length, 53 int init_data_length,
54 const std::string& session_id) OVERRIDE; 54 const std::string& session_id) OVERRIDE;
55 virtual void CancelKeyRequest(const std::string& key_system, 55 virtual void CancelKeyRequest(const std::string& key_system,
56 const std::string& session_id) OVERRIDE; 56 const std::string& session_id) OVERRIDE;
57 virtual void Decrypt(const scoped_refptr<media::DecoderBuffer>& encrypted, 57 virtual void Decrypt(const scoped_refptr<media::DecoderBuffer>& encrypted,
58 const DecryptCB& decrypt_cb) OVERRIDE; 58 const DecryptCB& decrypt_cb) OVERRIDE;
59 virtual void Stop() OVERRIDE; 59 virtual void Stop() OVERRIDE;
60 virtual void InitializeVideoDecoder(const media::VideoDecoderConfig& config,
61 const InitializeCB& init_cb) OVERRIDE;
62 virtual void DecryptAndDecodeVideo(
63 const scoped_refptr<media::DecoderBuffer>& encrypted,
64 const VideoDecodeCB& video_decode_cb) OVERRIDE;
65 virtual void ResetVideoDecoder() OVERRIDE;
66 virtual void StopVideoDecoder() OVERRIDE;
60 67
61 private: 68 private:
62 scoped_ptr<media::Decryptor> CreatePpapiDecryptor( 69 scoped_ptr<media::Decryptor> CreatePpapiDecryptor(
63 const std::string& key_system); 70 const std::string& key_system);
64 scoped_ptr<media::Decryptor> CreateDecryptor(const std::string& key_system); 71 scoped_ptr<media::Decryptor> CreateDecryptor(const std::string& key_system);
65 72
66 // Helper function that makes sure decryptor_->Decrypt() runs on the 73 // Helper function that makes sure decryptor_->Decrypt() runs on the
67 // |message_loop|. 74 // |message_loop|.
68 void DecryptOnMessageLoop( 75 void DecryptOnMessageLoop(
69 const scoped_refptr<base::MessageLoopProxy>& message_loop_proxy, 76 const scoped_refptr<base::MessageLoopProxy>& message_loop_proxy,
(...skipping 20 matching lines...) Expand all
90 scoped_ptr<media::Decryptor> decryptor_; 97 scoped_ptr<media::Decryptor> decryptor_;
91 std::vector<base::Closure> pending_decrypt_closures_; 98 std::vector<base::Closure> pending_decrypt_closures_;
92 bool stopped_; 99 bool stopped_;
93 100
94 DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor); 101 DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor);
95 }; 102 };
96 103
97 } // namespace webkit_media 104 } // namespace webkit_media
98 105
99 #endif // WEBKIT_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ 106 #endif // WEBKIT_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698