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

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

Issue 523283002: media: Introduce DemuxerStreamProvider interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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/time/time.h" 9 #include "base/time/time.h"
10 #include "media/base/buffering_state.h" 10 #include "media/base/buffering_state.h"
11 #include "media/base/media_export.h" 11 #include "media/base/media_export.h"
12 #include "media/base/pipeline_status.h" 12 #include "media/base/pipeline_status.h"
13 13
14 namespace media { 14 namespace media {
15 15
16 class MediaKeys; 16 class MediaKeys;
17 17
18 class MEDIA_EXPORT Renderer { 18 class MEDIA_EXPORT Renderer {
19 public: 19 public:
20 typedef base::Callback<base::TimeDelta()> TimeDeltaCB; 20 typedef base::Callback<base::TimeDelta()> TimeDeltaCB;
21 21
22 Renderer(); 22 Renderer();
23 23
24 // Stops rendering and fires any pending callbacks. 24 // Stops rendering and fires any pending callbacks.
25 virtual ~Renderer(); 25 virtual ~Renderer();
26 26
27 // Initializes the Renderer, executing |init_cb| upon completion. 27 // Initializes the Renderer, executing |init_cb| upon completion.
28 // TODO(xhwang): Provide a set of DemuxerStreams in Initialize().
29 // TODO(xhwang): Replace |init_cb| with a Closure. 28 // TODO(xhwang): Replace |init_cb| with a Closure.
30 // 29 //
31 // Permanent callbacks: 30 // Permanent callbacks:
32 // - |statistics_cb|: Executed periodically with rendering statistics. 31 // - |statistics_cb|: Executed periodically with rendering statistics.
33 // - |time_cb|: Executed whenever time has advanced through rendering. 32 // - |time_cb|: Executed whenever time has advanced through rendering.
34 // - |ended_cb|: Executed when rendering has reached the end of stream. 33 // - |ended_cb|: Executed when rendering has reached the end of stream.
35 // - |error_cb|: Executed if any error was encountered during rendering. 34 // - |error_cb|: Executed if any error was encountered during rendering.
36 virtual void Initialize(const PipelineStatusCB& init_cb, 35 virtual void Initialize(const PipelineStatusCB& init_cb,
37 const StatisticsCB& statistics_cb, 36 const StatisticsCB& statistics_cb,
38 const base::Closure& ended_cb, 37 const base::Closure& ended_cb,
(...skipping 27 matching lines...) Expand all
66 // Associates the |cdm| with this Renderer. 65 // Associates the |cdm| with this Renderer.
67 virtual void SetCdm(MediaKeys* cdm) = 0; 66 virtual void SetCdm(MediaKeys* cdm) = 0;
68 67
69 private: 68 private:
70 DISALLOW_COPY_AND_ASSIGN(Renderer); 69 DISALLOW_COPY_AND_ASSIGN(Renderer);
71 }; 70 };
72 71
73 } // namespace media 72 } // namespace media
74 73
75 #endif // MEDIA_BASE_RENDERER_H_ 74 #endif // MEDIA_BASE_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698