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

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

Issue 2366373003: Not for submission. fastSeek prototype. (Closed)
Patch Set: Created 4 years, 2 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/renderer.h ('k') | media/base/stream_position.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_CLIENT_H_ 5 #ifndef MEDIA_BASE_RENDERER_CLIENT_H_
6 #define MEDIA_BASE_RENDERER_CLIENT_H_ 6 #define MEDIA_BASE_RENDERER_CLIENT_H_
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "media/base/pipeline_status.h" 9 #include "media/base/pipeline_status.h"
10 #include "ui/gfx/geometry/size.h" 10 #include "ui/gfx/geometry/size.h"
11 11
12 namespace media { 12 namespace media {
13 13
14 // Interface used by Renderer, AudioRenderer, VideoRenderer and 14 // Interface used by Renderer, AudioRenderer, VideoRenderer and
15 // MediaPlayerRenderer implementations to notify their clients. 15 // MediaPlayerRenderer implementations to notify their clients.
16 class RendererClient { 16 class RendererClient {
17 public: 17 public:
18 // Executed if any error was encountered after Renderer initialization. 18 // Executed if any error was encountered after Renderer initialization.
19 virtual void OnError(PipelineStatus status) = 0; 19 virtual void OnError(PipelineStatus status) = 0;
20 20
21 // Executed when rendering has reached the end of stream. 21 // Executed when rendering has reached the end of stream.
22 virtual void OnEnded() = 0; 22 virtual void OnEnded() = 0;
23 23
24 // Executed periodically with rendering statistics. 24 // Executed periodically with rendering statistics.
25 virtual void OnStatisticsUpdate(const PipelineStatistics& stats) = 0; 25 virtual void OnStatisticsUpdate(const PipelineStatistics& stats) = 0;
26 26
27 virtual void OnFirstVideoFrameTimestampKnown(base::TimeDelta timestamp) = 0;
28
27 // Executed when buffering state is changed. 29 // Executed when buffering state is changed.
28 virtual void OnBufferingStateChange(BufferingState state) = 0; 30 virtual void OnBufferingStateChange(BufferingState state) = 0;
29 31
30 // Executed whenever the key needed to decrypt the stream is not available. 32 // Executed whenever the key needed to decrypt the stream is not available.
31 virtual void OnWaitingForDecryptionKey() = 0; 33 virtual void OnWaitingForDecryptionKey() = 0;
32 34
33 // Executed for the first video frame and whenever natural size changes. 35 // Executed for the first video frame and whenever natural size changes.
34 // Only used if media stream contains video track. 36 // Only used if media stream contains video track.
35 virtual void OnVideoNaturalSizeChange(const gfx::Size& size) = 0; 37 virtual void OnVideoNaturalSizeChange(const gfx::Size& size) = 0;
36 38
37 // Executed for the first video frame and whenever opacity changes. 39 // Executed for the first video frame and whenever opacity changes.
38 // Only used if media stream contains video track. 40 // Only used if media stream contains video track.
39 virtual void OnVideoOpacityChange(bool opaque) = 0; 41 virtual void OnVideoOpacityChange(bool opaque) = 0;
40 42
41 // Executed when video metadata is first read, and whenever it changes. 43 // Executed when video metadata is first read, and whenever it changes.
42 // Only used when we are using a URL demuxer (e.g. for MediaPlayerRenderer). 44 // Only used when we are using a URL demuxer (e.g. for MediaPlayerRenderer).
43 virtual void OnDurationChange(base::TimeDelta duration) = 0; 45 virtual void OnDurationChange(base::TimeDelta duration) = 0;
44 }; 46 };
45 47
46 } // namespace media 48 } // namespace media
47 49
48 #endif // MEDIA_BASE_RENDERER_CLIENT_H_ 50 #endif // MEDIA_BASE_RENDERER_CLIENT_H_
OLDNEW
« no previous file with comments | « media/base/renderer.h ('k') | media/base/stream_position.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698