Chromium Code Reviews| 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 MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_ | 5 #ifndef MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_ | 
| 6 #define MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_ | 6 #define MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_ | 
| 7 | 7 | 
| 8 #include "base/callback.h" | 8 #include "base/callback.h" | 
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" | 
| 10 #include "media/base/decryptor.h" | 10 #include "media/base/decryptor.h" | 
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 void SetDecryptor(Decryptor* decryptor); | 86 void SetDecryptor(Decryptor* decryptor); | 
| 87 | 87 | 
| 88 // Callback for Decryptor::InitializeVideoDecoder(). | 88 // Callback for Decryptor::InitializeVideoDecoder(). | 
| 89 void FinishInitialization(bool success); | 89 void FinishInitialization(bool success); | 
| 90 | 90 | 
| 91 // Carries out the buffer reading operation scheduled by Read(). | 91 // Carries out the buffer reading operation scheduled by Read(). | 
| 92 void DoRead(const ReadCB& read_cb); | 92 void DoRead(const ReadCB& read_cb); | 
| 93 | 93 | 
| 94 void ReadFromDemuxerStream(); | 94 void ReadFromDemuxerStream(); | 
| 95 | 95 | 
| 96 // Callback for DemuxerStream::Read(). | |
| 97 void DecryptAndDecodeBuffer(DemuxerStream::Status status, | |
| 98 const scoped_refptr<DecoderBuffer>& buffer); | |
| 99 | |
| 100 // Carries out the buffer decrypting/decoding operation scheduled by | 96 // Carries out the buffer decrypting/decoding operation scheduled by | 
| 101 // DecryptAndDecodeBuffer(). | 97 // DecryptAndDecodeBuffer(). | 
| 
 
xhwang
2012/11/20 17:54:34
ditto
 
scherkus (not reviewing)
2012/11/20 19:16:07
Done.
 
 | |
| 102 void DoDecryptAndDecodeBuffer(DemuxerStream::Status status, | 98 void DoDecryptAndDecodeBuffer(DemuxerStream::Status status, | 
| 103 const scoped_refptr<DecoderBuffer>& buffer); | 99 const scoped_refptr<DecoderBuffer>& buffer); | 
| 104 | 100 | 
| 105 void DecodePendingBuffer(); | 101 void DecodePendingBuffer(); | 
| 106 | 102 | 
| 107 // Callback for Decryptor::DecryptAndDecodeVideo(). | 103 // Callback for Decryptor::DecryptAndDecodeVideo(). | 
| 108 void DeliverFrame(int buffer_size, | 104 void DeliverFrame(int buffer_size, | 
| 109 Decryptor::Status status, | 105 Decryptor::Status status, | 
| 110 const scoped_refptr<VideoFrame>& frame); | 106 const scoped_refptr<VideoFrame>& frame); | 
| 111 | 107 | 
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 157 // A unique ID to trace Decryptor::DecryptAndDecodeVideo() call and the | 153 // A unique ID to trace Decryptor::DecryptAndDecodeVideo() call and the | 
| 158 // matching DecryptCB call (in DoDeliverFrame()). | 154 // matching DecryptCB call (in DoDeliverFrame()). | 
| 159 uint32 trace_id_; | 155 uint32 trace_id_; | 
| 160 | 156 | 
| 161 DISALLOW_COPY_AND_ASSIGN(DecryptingVideoDecoder); | 157 DISALLOW_COPY_AND_ASSIGN(DecryptingVideoDecoder); | 
| 162 }; | 158 }; | 
| 163 | 159 | 
| 164 } // namespace media | 160 } // namespace media | 
| 165 | 161 | 
| 166 #endif // MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_ | 162 #endif // MEDIA_FILTERS_DECRYPTING_VIDEO_DECODER_H_ | 
| OLD | NEW |