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

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

Issue 2075303002: [DO NOT COMMIT] Initial MediaPlayerRenderer plumbing and basic features (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 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 "media/base/pipeline_status.h" 9 #include "media/base/pipeline_status.h"
9 #include "ui/gfx/geometry/size.h" 10 #include "ui/gfx/geometry/size.h"
10 11
11 namespace media { 12 namespace media {
12 13
13 // Interface used by Renderer, AudioRenderer, and VideoRenderer implementations 14 // Interface used by Renderer, AudioRenderer, VideoRenderer and
14 // to notify their clients. 15 // MediaPlayerRenderer implementations to notify their clients.
15 class RendererClient { 16 class RendererClient {
16 public: 17 public:
17 // Executed if any error was encountered after Renderer initialization. 18 // Executed if any error was encountered after Renderer initialization.
18 virtual void OnError(PipelineStatus status) = 0; 19 virtual void OnError(PipelineStatus status) = 0;
19 20
20 // Executed when rendering has reached the end of stream. 21 // Executed when rendering has reached the end of stream.
21 virtual void OnEnded() = 0; 22 virtual void OnEnded() = 0;
22 23
23 // Executed periodically with rendering statistics. 24 // Executed periodically with rendering statistics.
24 virtual void OnStatisticsUpdate(const PipelineStatistics& stats) = 0; 25 virtual void OnStatisticsUpdate(const PipelineStatistics& stats) = 0;
25 26
26 // Executed when buffering state is changed. 27 // Executed when buffering state is changed.
27 virtual void OnBufferingStateChange(BufferingState state) = 0; 28 virtual void OnBufferingStateChange(BufferingState state) = 0;
28 29
29 // Executed whenever the key needed to decrypt the stream is not available. 30 // Executed whenever the key needed to decrypt the stream is not available.
30 virtual void OnWaitingForDecryptionKey() = 0; 31 virtual void OnWaitingForDecryptionKey() = 0;
31 32
32 // Executed for the first video frame and whenever natural size changes. 33 // Executed for the first video frame and whenever natural size changes.
33 // Only used if media stream contains video track. 34 // Only used if media stream contains video track.
34 virtual void OnVideoNaturalSizeChange(const gfx::Size& size) = 0; 35 virtual void OnVideoNaturalSizeChange(const gfx::Size& size) = 0;
35 36
36 // Executed for the first video frame and whenever opacity changes. 37 // Executed for the first video frame and whenever opacity changes.
37 // Only used if media stream contains video track. 38 // Only used if media stream contains video track.
38 virtual void OnVideoOpacityChange(bool opaque) = 0; 39 virtual void OnVideoOpacityChange(bool opaque) = 0;
40
41 // 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).
43 virtual void OnDurationChange(base::TimeDelta duration) = 0;
xhwang 2016/06/22 17:39:02 As discussed offline, this change sgtm :) Now we h
39 }; 44 };
40 45
41 } // namespace media 46 } // namespace media
42 47
43 #endif // MEDIA_BASE_RENDERER_CLIENT_H_ 48 #endif // MEDIA_BASE_RENDERER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698