| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FAKE_VIDEO_DECODER_H_ | 5 #ifndef MEDIA_FILTERS_FAKE_VIDEO_DECODER_H_ |
| 6 #define MEDIA_FILTERS_FAKE_VIDEO_DECODER_H_ | 6 #define MEDIA_FILTERS_FAKE_VIDEO_DECODER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // count over all calls will be equal to total_bytes_decoded(). | 37 // count over all calls will be equal to total_bytes_decoded(). |
| 38 FakeVideoDecoder(int decoding_delay, | 38 FakeVideoDecoder(int decoding_delay, |
| 39 int max_parallel_decoding_requests, | 39 int max_parallel_decoding_requests, |
| 40 const BytesDecodedCB& bytes_decoded_cb); | 40 const BytesDecodedCB& bytes_decoded_cb); |
| 41 ~FakeVideoDecoder() override; | 41 ~FakeVideoDecoder() override; |
| 42 | 42 |
| 43 // VideoDecoder implementation. | 43 // VideoDecoder implementation. |
| 44 std::string GetDisplayName() const override; | 44 std::string GetDisplayName() const override; |
| 45 void Initialize(const VideoDecoderConfig& config, | 45 void Initialize(const VideoDecoderConfig& config, |
| 46 bool low_delay, | 46 bool low_delay, |
| 47 const SetCdmReadyCB& set_cdm_ready_cb, |
| 47 const InitCB& init_cb, | 48 const InitCB& init_cb, |
| 48 const OutputCB& output_cb) override; | 49 const OutputCB& output_cb) override; |
| 49 void Decode(const scoped_refptr<DecoderBuffer>& buffer, | 50 void Decode(const scoped_refptr<DecoderBuffer>& buffer, |
| 50 const DecodeCB& decode_cb) override; | 51 const DecodeCB& decode_cb) override; |
| 51 void Reset(const base::Closure& closure) override; | 52 void Reset(const base::Closure& closure) override; |
| 52 int GetMaxDecodeRequests() const override; | 53 int GetMaxDecodeRequests() const override; |
| 53 | 54 |
| 54 // Holds the next init/decode/reset callback from firing. | 55 // Holds the next init/decode/reset callback from firing. |
| 55 void HoldNextInit(); | 56 void HoldNextInit(); |
| 56 void HoldDecode(); | 57 void HoldDecode(); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 120 |
| 120 // NOTE: Weak pointers must be invalidated before all other member variables. | 121 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 121 base::WeakPtrFactory<FakeVideoDecoder> weak_factory_; | 122 base::WeakPtrFactory<FakeVideoDecoder> weak_factory_; |
| 122 | 123 |
| 123 DISALLOW_COPY_AND_ASSIGN(FakeVideoDecoder); | 124 DISALLOW_COPY_AND_ASSIGN(FakeVideoDecoder); |
| 124 }; | 125 }; |
| 125 | 126 |
| 126 } // namespace media | 127 } // namespace media |
| 127 | 128 |
| 128 #endif // MEDIA_FILTERS_FAKE_VIDEO_DECODER_H_ | 129 #endif // MEDIA_FILTERS_FAKE_VIDEO_DECODER_H_ |
| OLD | NEW |