OLD | NEW |
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 "media/base/pipeline_status.h" | 8 #include "media/base/pipeline_status.h" |
9 #include "ui/gfx/geometry/size.h" | 9 #include "ui/gfx/geometry/size.h" |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 // Executed whenever the key needed to decrypt the stream is not available. | 29 // Executed whenever the key needed to decrypt the stream is not available. |
30 virtual void OnWaitingForDecryptionKey() = 0; | 30 virtual void OnWaitingForDecryptionKey() = 0; |
31 | 31 |
32 // Executed for the first video frame and whenever natural size changes. | 32 // Executed for the first video frame and whenever natural size changes. |
33 // Only used if media stream contains video track. | 33 // Only used if media stream contains video track. |
34 virtual void OnVideoNaturalSizeChange(const gfx::Size& size) = 0; | 34 virtual void OnVideoNaturalSizeChange(const gfx::Size& size) = 0; |
35 | 35 |
36 // Executed for the first video frame and whenever opacity changes. | 36 // Executed for the first video frame and whenever opacity changes. |
37 // Only used if media stream contains video track. | 37 // Only used if media stream contains video track. |
38 virtual void OnVideoOpacityChange(bool opaque) = 0; | 38 virtual void OnVideoOpacityChange(bool opaque) = 0; |
| 39 |
| 40 // Called to report current media time. |
| 41 // |curr_time| and |max_time| can be used to interpolate time between |
| 42 // calls to OnTimeUpdate(). |
| 43 // |max_time| is typically the media timestamp of the last audio frame |
| 44 // buffered by the audio hardware. |
| 45 // |max_time| must be greater or equal to |time_usec|. |
| 46 // |capture_time| is the timestamp at which the media times were captured. |
| 47 virtual void OnTimeUpdate(base::TimeDelta curr_time, |
| 48 base::TimeDelta max_time, |
| 49 base::TimeTicks capture_time) = 0; |
39 }; | 50 }; |
40 | 51 |
41 } // namespace media | 52 } // namespace media |
42 | 53 |
43 #endif // MEDIA_BASE_RENDERER_CLIENT_H_ | 54 #endif // MEDIA_BASE_RENDERER_CLIENT_H_ |
OLD | NEW |