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

Unified Diff: media/filters/fake_demuxer_stream.h

Issue 15085011: Add FakeVideoDecoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: media/filters/fake_demuxer_stream.h
diff --git a/media/filters/fake_demuxer_stream.h b/media/filters/fake_demuxer_stream.h
index 1b20ba7b6c36657575a2dbd3032cbd03c34a5326..17975997d94db97d6c31a6f298c1a7f8aac0a1ce 100644
--- a/media/filters/fake_demuxer_stream.h
+++ b/media/filters/fake_demuxer_stream.h
@@ -35,10 +35,17 @@ class MEDIA_EXPORT FakeDemuxerStream : public DemuxerStream {
virtual Type type() OVERRIDE;
virtual void EnableBitstreamConverter() OVERRIDE;
+ int num_buffers_returned() const { return num_buffers_returned_; }
+
// Upon the next read, holds the read callback until SatisfyRead() or Reset()
// is called.
void HoldNextRead();
+ // Upon the next config change read, holds the read callback until
+ // SatisfyRead() or Reset() is called. If there is no config change any more,
+ // no read will be held.
+ void HoldNextConfigChangeRead();
+
// Satisfies the pending read with the next scheduled status and buffer.
void SatisfyRead();
@@ -59,6 +66,8 @@ class MEDIA_EXPORT FakeDemuxerStream : public DemuxerStream {
// Number of frames left with the current decoder config.
int num_buffers_left_in_current_config_;
+ int num_buffers_returned_;
+
base::TimeDelta current_timestamp_;
base::TimeDelta duration_;
@@ -68,7 +77,11 @@ class MEDIA_EXPORT FakeDemuxerStream : public DemuxerStream {
VideoDecoderConfig video_decoder_config_;
ReadCB read_cb_;
- bool hold_next_read_;
+
+ int next_read_num_;
+ // Zero-based number indicating which read operation should be held. -1 means
+ // no read shall be held.
+ int read_to_hold_;
DISALLOW_COPY_AND_ASSIGN(FakeDemuxerStream);
};

Powered by Google App Engine
This is Rietveld 408576698