| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include <list> | 5 #include <list> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // - all frames are delayed: |delayed_frame_count| = |cycle_count| | 37 // - all frames are delayed: |delayed_frame_count| = |cycle_count| |
| 38 // - all frames are provided instantly: |delayed_frame_count| = 0 | 38 // - all frames are provided instantly: |delayed_frame_count| = 0 |
| 39 // |config_idx| is a list of frame index before which there is | 39 // |config_idx| is a list of frame index before which there is |
| 40 // a change of decoder configuration. | 40 // a change of decoder configuration. |
| 41 DummyDemuxerStream(int cycle_count, | 41 DummyDemuxerStream(int cycle_count, |
| 42 int delayed_frame_count, | 42 int delayed_frame_count, |
| 43 const std::list<int>& config_idx); | 43 const std::list<int>& config_idx); |
| 44 virtual ~DummyDemuxerStream(); | 44 virtual ~DummyDemuxerStream(); |
| 45 | 45 |
| 46 // ::media::DemuxerStream implementation. | 46 // ::media::DemuxerStream implementation. |
| 47 virtual void Read(const ReadCB& read_cb) OVERRIDE; | 47 virtual void Read(const ReadCB& read_cb) override; |
| 48 virtual ::media::AudioDecoderConfig audio_decoder_config() OVERRIDE; | 48 virtual ::media::AudioDecoderConfig audio_decoder_config() override; |
| 49 virtual ::media::VideoDecoderConfig video_decoder_config() OVERRIDE; | 49 virtual ::media::VideoDecoderConfig video_decoder_config() override; |
| 50 virtual Type type() OVERRIDE; | 50 virtual Type type() override; |
| 51 virtual bool SupportsConfigChanges() OVERRIDE; | 51 virtual bool SupportsConfigChanges() override; |
| 52 virtual ::media::VideoRotation video_rotation() OVERRIDE; | 52 virtual ::media::VideoRotation video_rotation() override; |
| 53 | 53 |
| 54 bool has_pending_read() const { | 54 bool has_pending_read() const { |
| 55 return has_pending_read_; | 55 return has_pending_read_; |
| 56 } | 56 } |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 void DoRead(const ReadCB& read_cb); | 59 void DoRead(const ReadCB& read_cb); |
| 60 | 60 |
| 61 // Demuxer configuration. | 61 // Demuxer configuration. |
| 62 const int cycle_count_; | 62 const int cycle_count_; |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 scoped_ptr<base::MessageLoop> message_loop(new base::MessageLoop()); | 336 scoped_ptr<base::MessageLoop> message_loop(new base::MessageLoop()); |
| 337 Initialize(demuxer_stream_.get()); | 337 Initialize(demuxer_stream_.get()); |
| 338 message_loop->PostTask( | 338 message_loop->PostTask( |
| 339 FROM_HERE, | 339 FROM_HERE, |
| 340 base::Bind(&DemuxerStreamAdapterTest::Start, base::Unretained(this))); | 340 base::Bind(&DemuxerStreamAdapterTest::Start, base::Unretained(this))); |
| 341 message_loop->Run(); | 341 message_loop->Run(); |
| 342 } | 342 } |
| 343 | 343 |
| 344 } // namespace media | 344 } // namespace media |
| 345 } // namespace chromecast | 345 } // namespace chromecast |
| OLD | NEW |