Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: chromecast/media/cma/test/demuxer_stream_for_test.h

Issue 1171263004: Allow setting memory limits on media::DemuxerStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merged CL that adds get/set buffer size on WMP Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chromecast/media/cma/test/demuxer_stream_for_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CHROMECAST_MEDIA_CMA_TEST_DUMMY_DEMUXER_STREAM_H_ 5 #ifndef CHROMECAST_MEDIA_CMA_TEST_DUMMY_DEMUXER_STREAM_H_
6 #define CHROMECAST_MEDIA_CMA_TEST_DUMMY_DEMUXER_STREAM_H_ 6 #define CHROMECAST_MEDIA_CMA_TEST_DUMMY_DEMUXER_STREAM_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 28 matching lines...) Expand all
39 const std::list<int>& config_idx); 39 const std::list<int>& config_idx);
40 ~DemuxerStreamForTest() override; 40 ~DemuxerStreamForTest() override;
41 41
42 // ::media::DemuxerStream implementation. 42 // ::media::DemuxerStream implementation.
43 void Read(const ReadCB& read_cb) override; 43 void Read(const ReadCB& read_cb) override;
44 ::media::AudioDecoderConfig audio_decoder_config() override; 44 ::media::AudioDecoderConfig audio_decoder_config() override;
45 ::media::VideoDecoderConfig video_decoder_config() override; 45 ::media::VideoDecoderConfig video_decoder_config() override;
46 Type type() const override; 46 Type type() const override;
47 bool SupportsConfigChanges() override; 47 bool SupportsConfigChanges() override;
48 ::media::VideoRotation video_rotation() override; 48 ::media::VideoRotation video_rotation() override;
49 size_t GetMemoryLimit() const override;
50 void SetMemoryLimit(size_t memory_limit) override;
49 51
50 bool has_pending_read() const { return has_pending_read_; } 52 bool has_pending_read() const { return has_pending_read_; }
51 53
52 // Frame duration 54 // Frame duration
53 static const int kDemuxerStreamForTestFrameDuration = 40; 55 static const int kDemuxerStreamForTestFrameDuration = 40;
54 56
55 private: 57 private:
56 void DoRead(const ReadCB& read_cb); 58 void DoRead(const ReadCB& read_cb);
57 59
58 // Demuxer configuration. 60 // Demuxer configuration.
59 int total_frame_count_; 61 int total_frame_count_;
60 const int cycle_count_; 62 const int cycle_count_;
61 const int delayed_frame_count_; 63 const int delayed_frame_count_;
62 std::list<int> config_idx_; 64 std::list<int> config_idx_;
63 65
64 // Number of frames sent so far. 66 // Number of frames sent so far.
65 int frame_count_; 67 int frame_count_;
66 68
67 bool has_pending_read_; 69 bool has_pending_read_;
68 70
69 DISALLOW_COPY_AND_ASSIGN(DemuxerStreamForTest); 71 DISALLOW_COPY_AND_ASSIGN(DemuxerStreamForTest);
70 }; 72 };
71 73
72 } // namespace media 74 } // namespace media
73 } // namespace chromecast 75 } // namespace chromecast
74 #endif 76 #endif
OLDNEW
« no previous file with comments | « no previous file | chromecast/media/cma/test/demuxer_stream_for_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698