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

Side by Side Diff: media/base/renderer.h

Issue 827013005: Avoid double task trampoline for Pipeline state transitions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 5 years, 11 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 | « media/base/pipeline_unittest.cc ('k') | media/filters/chunk_demuxer.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 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 #ifndef MEDIA_BASE_RENDERER_H_ 5 #ifndef MEDIA_BASE_RENDERER_H_
6 #define MEDIA_BASE_RENDERER_H_ 6 #define MEDIA_BASE_RENDERER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 12 matching lines...) Expand all
23 typedef base::Callback<void(const scoped_refptr<VideoFrame>&)> PaintCB; 23 typedef base::Callback<void(const scoped_refptr<VideoFrame>&)> PaintCB;
24 typedef base::Callback<base::TimeDelta()> TimeDeltaCB; 24 typedef base::Callback<base::TimeDelta()> TimeDeltaCB;
25 25
26 Renderer(); 26 Renderer();
27 27
28 // Stops rendering and fires any pending callbacks. 28 // Stops rendering and fires any pending callbacks.
29 virtual ~Renderer(); 29 virtual ~Renderer();
30 30
31 // Initializes the Renderer with |demuxer_stream_provider|, executing 31 // Initializes the Renderer with |demuxer_stream_provider|, executing
32 // |init_cb| upon completion. If initialization failed, fires |error_cb| 32 // |init_cb| upon completion. If initialization failed, fires |error_cb|
33 // before |init_cb|. |demuxer_stream_provider| must be valid throughout the 33 // before |init_cb|. |demuxer_stream_provider| must be valid throughout the
34 // lifetime of the Renderer object. 34 // lifetime of the Renderer object. |init_cb| must only be run after this
35 // method has returned.
35 // 36 //
36 // Permanent callbacks: 37 // Permanent callbacks:
37 // - |statistics_cb|: Executed periodically with rendering statistics. 38 // - |statistics_cb|: Executed periodically with rendering statistics.
38 // - |buffering_state_cb|: Executed when buffering state is changed. 39 // - |buffering_state_cb|: Executed when buffering state is changed.
39 // - |paint_cb|: Executed when there is a VideoFrame ready to paint. Can be 40 // - |paint_cb|: Executed when there is a VideoFrame ready to paint. Can be
40 // ignored if the Renderer handles the painting by itself. Can 41 // ignored if the Renderer handles the painting by itself. Can
41 // be called from any thread. 42 // be called from any thread.
42 // - |ended_cb|: Executed when rendering has reached the end of stream. 43 // - |ended_cb|: Executed when rendering has reached the end of stream.
43 // - |error_cb|: Executed if any error was encountered during rendering. 44 // - |error_cb|: Executed if any error was encountered during rendering.
44 virtual void Initialize(DemuxerStreamProvider* demuxer_stream_provider, 45 virtual void Initialize(DemuxerStreamProvider* demuxer_stream_provider,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Returns whether |this| renders video. 78 // Returns whether |this| renders video.
78 virtual bool HasVideo() = 0; 79 virtual bool HasVideo() = 0;
79 80
80 private: 81 private:
81 DISALLOW_COPY_AND_ASSIGN(Renderer); 82 DISALLOW_COPY_AND_ASSIGN(Renderer);
82 }; 83 };
83 84
84 } // namespace media 85 } // namespace media
85 86
86 #endif // MEDIA_BASE_RENDERER_H_ 87 #endif // MEDIA_BASE_RENDERER_H_
OLDNEW
« no previous file with comments | « media/base/pipeline_unittest.cc ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698