OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 MEDIA_MOJO_CLIENTS_MOJO_DECRYPTOR_H_ | 5 #ifndef MEDIA_MOJO_CLIENTS_MOJO_DECRYPTOR_H_ |
6 #define MEDIA_MOJO_CLIENTS_MOJO_DECRYPTOR_H_ | 6 #define MEDIA_MOJO_CLIENTS_MOJO_DECRYPTOR_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 Status status, | 56 Status status, |
57 mojom::DecoderBufferPtr buffer); | 57 mojom::DecoderBufferPtr buffer); |
58 void OnBufferRead(const DecryptCB& decrypt_cb, | 58 void OnBufferRead(const DecryptCB& decrypt_cb, |
59 Status status, | 59 Status status, |
60 scoped_refptr<DecoderBuffer> buffer); | 60 scoped_refptr<DecoderBuffer> buffer); |
61 void OnAudioDecoded(const AudioDecodeCB& audio_decode_cb, | 61 void OnAudioDecoded(const AudioDecodeCB& audio_decode_cb, |
62 Status status, | 62 Status status, |
63 std::vector<mojom::AudioBufferPtr> audio_buffers); | 63 std::vector<mojom::AudioBufferPtr> audio_buffers); |
64 void OnVideoDecoded(const VideoDecodeCB& video_decode_cb, | 64 void OnVideoDecoded(const VideoDecodeCB& video_decode_cb, |
65 Status status, | 65 Status status, |
66 mojom::VideoFramePtr video_frame, | 66 const scoped_refptr<VideoFrame>& video_frame, |
67 mojom::FrameResourceReleaserPtr releaser); | 67 mojom::FrameResourceReleaserPtr releaser); |
68 | 68 |
69 base::ThreadChecker thread_checker_; | 69 base::ThreadChecker thread_checker_; |
70 | 70 |
71 mojom::DecryptorPtr remote_decryptor_; | 71 mojom::DecryptorPtr remote_decryptor_; |
72 | 72 |
73 // Helper class to send DecoderBuffer to the |remote_decryptor_| for decrypt | 73 // Helper class to send DecoderBuffer to the |remote_decryptor_| for decrypt |
74 // or decrypt-and-decode. | 74 // or decrypt-and-decode. |
75 std::unique_ptr<MojoDecoderBufferWriter> mojo_decoder_buffer_writer_; | 75 std::unique_ptr<MojoDecoderBufferWriter> mojo_decoder_buffer_writer_; |
76 | 76 |
77 // Helper class to receive decrypted DecoderBuffer from the | 77 // Helper class to receive decrypted DecoderBuffer from the |
78 // |remote_decryptor_|. | 78 // |remote_decryptor_|. |
79 std::unique_ptr<MojoDecoderBufferReader> mojo_decoder_buffer_reader_; | 79 std::unique_ptr<MojoDecoderBufferReader> mojo_decoder_buffer_reader_; |
80 | 80 |
81 NewKeyCB new_audio_key_cb_; | 81 NewKeyCB new_audio_key_cb_; |
82 NewKeyCB new_video_key_cb_; | 82 NewKeyCB new_video_key_cb_; |
83 | 83 |
84 base::WeakPtrFactory<MojoDecryptor> weak_factory_; | 84 base::WeakPtrFactory<MojoDecryptor> weak_factory_; |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(MojoDecryptor); | 86 DISALLOW_COPY_AND_ASSIGN(MojoDecryptor); |
87 }; | 87 }; |
88 | 88 |
89 } // namespace media | 89 } // namespace media |
90 | 90 |
91 #endif // MEDIA_MOJO_CLIENTS_MOJO_DECRYPTOR_H_ | 91 #endif // MEDIA_MOJO_CLIENTS_MOJO_DECRYPTOR_H_ |
OLD | NEW |