| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 // count over all calls will be equal to total_bytes_decoded(). | 40 // count over all calls will be equal to total_bytes_decoded(). |
| 41 FakeVideoDecoder(int decoding_delay, | 41 FakeVideoDecoder(int decoding_delay, |
| 42 int max_parallel_decoding_requests, | 42 int max_parallel_decoding_requests, |
| 43 const BytesDecodedCB& bytes_decoded_cb); | 43 const BytesDecodedCB& bytes_decoded_cb); |
| 44 ~FakeVideoDecoder() override; | 44 ~FakeVideoDecoder() override; |
| 45 | 45 |
| 46 // VideoDecoder implementation. | 46 // VideoDecoder implementation. |
| 47 std::string GetDisplayName() const override; | 47 std::string GetDisplayName() const override; |
| 48 void Initialize(const VideoDecoderConfig& config, | 48 void Initialize(const VideoDecoderConfig& config, |
| 49 bool low_delay, | 49 bool low_delay, |
| 50 const SetCdmReadyCB& set_cdm_ready_cb, | 50 CdmContext* cdm_context, |
| 51 const InitCB& init_cb, | 51 const InitCB& init_cb, |
| 52 const OutputCB& output_cb) override; | 52 const OutputCB& output_cb) override; |
| 53 void Decode(const scoped_refptr<DecoderBuffer>& buffer, | 53 void Decode(const scoped_refptr<DecoderBuffer>& buffer, |
| 54 const DecodeCB& decode_cb) override; | 54 const DecodeCB& decode_cb) override; |
| 55 void Reset(const base::Closure& closure) override; | 55 void Reset(const base::Closure& closure) override; |
| 56 int GetMaxDecodeRequests() const override; | 56 int GetMaxDecodeRequests() const override; |
| 57 | 57 |
| 58 // Holds the next init/decode/reset callback from firing. | 58 // Holds the next init/decode/reset callback from firing. |
| 59 void HoldNextInit(); | 59 void HoldNextInit(); |
| 60 void HoldDecode(); | 60 void HoldDecode(); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 // NOTE: Weak pointers must be invalidated before all other member variables. | 124 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 125 base::WeakPtrFactory<FakeVideoDecoder> weak_factory_; | 125 base::WeakPtrFactory<FakeVideoDecoder> weak_factory_; |
| 126 | 126 |
| 127 DISALLOW_COPY_AND_ASSIGN(FakeVideoDecoder); | 127 DISALLOW_COPY_AND_ASSIGN(FakeVideoDecoder); |
| 128 }; | 128 }; |
| 129 | 129 |
| 130 } // namespace media | 130 } // namespace media |
| 131 | 131 |
| 132 #endif // MEDIA_FILTERS_FAKE_VIDEO_DECODER_H_ | 132 #endif // MEDIA_FILTERS_FAKE_VIDEO_DECODER_H_ |
| OLD | NEW |