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

Unified Diff: media/base/text_renderer.h

Issue 23702007: Render inband text tracks in the media pipeline (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 4 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/base/text_renderer.h
diff --git a/media/base/text_renderer.h b/media/base/text_renderer.h
new file mode 100644
index 0000000000000000000000000000000000000000..f96186a96adc832f2eae46873627898045a731ac
--- /dev/null
+++ b/media/base/text_renderer.h
@@ -0,0 +1,48 @@
+// 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.
+
+#ifndef MEDIA_BASE_TEXT_RENDERER_H_
+#define MEDIA_BASE_TEXT_RENDERER_H_
+
+#include "base/callback.h"
+#include "media/base/media_export.h"
+#include "media/base/pipeline_status.h"
+
+namespace media {
+
+class Demuxer;
+
+class MEDIA_EXPORT TextRenderer {
acolwell GONE FROM CHROMIUM 2013/09/12 00:15:15 I don't anticipate us having more than 1 TextRende
Matthew Heaney (Chromium) 2013/09/13 19:51:54 Done.
+ public:
+ TextRenderer();
+ virtual ~TextRenderer();
+
+ // Initialize a TextRenderer with text streams in |demuxer|, executing
+ // |init_cb| upon completion.
+ //
+ // |ended_cb| is executed when all of the text tracks have reached end
+ // of stream.
+ virtual void Initialize(Demuxer* demuxer,
+ const PipelineStatusCB& init_cb,
+ const base::Closure& ended_cb) = 0;
+
+ // Start text track cue decoding and rendering, executing |callback| when
+ // playback is underway.
+ virtual void Play(const base::Closure& callback) = 0;
+
+ // Temporarily suspend decoding and rendering the text track, executing
+ // |callback| when playback has been suspended.
+ virtual void Pause(const base::Closure& callback) = 0;
+
+ // Stop all operations in preparation for being deleted, executing |callback|
+ // when complete.
+ virtual void Stop(const base::Closure& callback) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TextRenderer);
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_TEXT_RENDERER_H_

Powered by Google App Engine
This is Rietveld 408576698