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

Unified Diff: media/base/fake_text_track_stream.h

Issue 23702007: Render inband text tracks in the media pipeline (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix compile errors 11/21 #6 Created 7 years, 1 month 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
« no previous file with comments | « media/base/demuxer_stream.h ('k') | media/base/fake_text_track_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/fake_text_track_stream.h
diff --git a/media/base/fake_text_track_stream.h b/media/base/fake_text_track_stream.h
new file mode 100644
index 0000000000000000000000000000000000000000..254e960bd624b7347c22328cbcf8d49f82f2af2c
--- /dev/null
+++ b/media/base/fake_text_track_stream.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/message_loop/message_loop.h"
+#include "media/base/audio_decoder_config.h"
+#include "media/base/demuxer_stream.h"
+#include "media/base/video_decoder_config.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace media {
+
+// Fake implementation of the DemuxerStream. These are the stream objects
+// we pass to the text renderer object when streams are added and removed.
+class FakeTextTrackStream : public DemuxerStream {
+ public:
+ FakeTextTrackStream();
+ virtual ~FakeTextTrackStream();
+
+ // DemuxerStream implementation.
+ virtual void Read(const ReadCB&) OVERRIDE;
+ MOCK_METHOD0(audio_decoder_config, AudioDecoderConfig());
+ MOCK_METHOD0(video_decoder_config, VideoDecoderConfig());
+ virtual Type type() OVERRIDE;
+ MOCK_METHOD0(EnableBitstreamConverter, void());
+
+ void SatisfyPendingRead(const base::TimeDelta& start,
+ const base::TimeDelta& duration,
+ const std::string& id,
+ const std::string& content,
+ const std::string& settings);
+ void AbortPendingRead();
+ void SendEosNotification();
+
+ void Stop();
+
+ MOCK_METHOD0(OnRead, void());
+
+ private:
+ scoped_refptr<base::MessageLoopProxy> message_loop_;
+ ReadCB read_cb_;
+ bool stopping_;
+
+ DISALLOW_COPY_AND_ASSIGN(FakeTextTrackStream);
+};
+
+} // namespace media
« no previous file with comments | « media/base/demuxer_stream.h ('k') | media/base/fake_text_track_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698