| 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, | |
| 48 const InitCB& init_cb, | 47 const InitCB& init_cb, |
| 49 const OutputCB& output_cb) override; | 48 const OutputCB& output_cb) override; |
| 50 void Decode(const scoped_refptr<DecoderBuffer>& buffer, | 49 void Decode(const scoped_refptr<DecoderBuffer>& buffer, |
| 51 const DecodeCB& decode_cb) override; | 50 const DecodeCB& decode_cb) override; |
| 52 void Reset(const base::Closure& closure) override; | 51 void Reset(const base::Closure& closure) override; |
| 53 int GetMaxDecodeRequests() const override; | 52 int GetMaxDecodeRequests() const override; |
| 54 | 53 |
| 55 // Holds the next init/decode/reset callback from firing. | 54 // Holds the next init/decode/reset callback from firing. |
| 56 void HoldNextInit(); | 55 void HoldNextInit(); |
| 57 void HoldDecode(); | 56 void HoldDecode(); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 119 |
| 121 // NOTE: Weak pointers must be invalidated before all other member variables. | 120 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 122 base::WeakPtrFactory<FakeVideoDecoder> weak_factory_; | 121 base::WeakPtrFactory<FakeVideoDecoder> weak_factory_; |
| 123 | 122 |
| 124 DISALLOW_COPY_AND_ASSIGN(FakeVideoDecoder); | 123 DISALLOW_COPY_AND_ASSIGN(FakeVideoDecoder); |
| 125 }; | 124 }; |
| 126 | 125 |
| 127 } // namespace media | 126 } // namespace media |
| 128 | 127 |
| 129 #endif // MEDIA_FILTERS_FAKE_VIDEO_DECODER_H_ | 128 #endif // MEDIA_FILTERS_FAKE_VIDEO_DECODER_H_ |
| OLD | NEW |