OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PIPELINE_H_ | 5 #ifndef MEDIA_BASE_PIPELINE_H_ |
6 #define MEDIA_BASE_PIPELINE_H_ | 6 #define MEDIA_BASE_PIPELINE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // Executed whenever the presentation duration changes. | 49 // Executed whenever the presentation duration changes. |
50 virtual void OnDurationChange() = 0; | 50 virtual void OnDurationChange() = 0; |
51 | 51 |
52 // Executed whenever a text track is added. | 52 // Executed whenever a text track is added. |
53 // The client is expected to create a TextTrack and call |done_cb|. | 53 // The client is expected to create a TextTrack and call |done_cb|. |
54 virtual void OnAddTextTrack(const TextTrackConfig& config, | 54 virtual void OnAddTextTrack(const TextTrackConfig& config, |
55 const AddTextTrackDoneCB& done_cb) = 0; | 55 const AddTextTrackDoneCB& done_cb) = 0; |
56 | 56 |
57 // Executed whenever the key needed to decrypt the stream is not available. | 57 // Executed whenever the key needed to decrypt the stream is not available. |
58 virtual void OnWaitingForDecryptionKey() = 0; | 58 virtual void OnWaitingForDecryptionKey() = 0; |
| 59 |
| 60 // Executed for the first video frame and whenever natural size changes. |
| 61 virtual void OnVideoNaturalSizeChange(const gfx::Size& size) = 0; |
| 62 |
| 63 // Executed for the first video frame and whenever opacity changes. |
| 64 virtual void OnVideoOpacityChange(bool opaque) = 0; |
59 }; | 65 }; |
60 | 66 |
61 virtual ~Pipeline() {} | 67 virtual ~Pipeline() {} |
62 | 68 |
63 // Build a pipeline to using the given |demuxer| and |renderer| to construct | 69 // Build a pipeline to using the given |demuxer| and |renderer| to construct |
64 // a filter chain, executing |seek_cb| when the initial seek has completed. | 70 // a filter chain, executing |seek_cb| when the initial seek has completed. |
65 // Methods on PipelineClient may be called up until Stop() has completed. | 71 // Methods on PipelineClient may be called up until Stop() has completed. |
66 // It is an error to call this method after the pipeline has already started. | 72 // It is an error to call this method after the pipeline has already started. |
67 virtual void Start(Demuxer* demuxer, | 73 virtual void Start(Demuxer* demuxer, |
68 std::unique_ptr<Renderer> renderer, | 74 std::unique_ptr<Renderer> renderer, |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 // Gets the current pipeline statistics. | 157 // Gets the current pipeline statistics. |
152 virtual PipelineStatistics GetStatistics() const = 0; | 158 virtual PipelineStatistics GetStatistics() const = 0; |
153 | 159 |
154 virtual void SetCdm(CdmContext* cdm_context, | 160 virtual void SetCdm(CdmContext* cdm_context, |
155 const CdmAttachedCB& cdm_attached_cb) = 0; | 161 const CdmAttachedCB& cdm_attached_cb) = 0; |
156 }; | 162 }; |
157 | 163 |
158 } // namespace media | 164 } // namespace media |
159 | 165 |
160 #endif // MEDIA_BASE_PIPELINE_H_ | 166 #endif // MEDIA_BASE_PIPELINE_H_ |
OLD | NEW |