Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MEDIA_BASE_PIPELINE_CLIENT_H_ | |
| 6 #define MEDIA_BASE_PIPELINE_CLIENT_H_ | |
| 7 | |
| 8 #include "media/base/buffering_state.h" | |
| 9 #include "media/base/pipeline_metadata.h" | |
| 10 #include "media/base/pipeline_status.h" | |
| 11 #include "media/base/text_track.h" | |
| 12 | |
| 13 namespace media { | |
| 14 | |
| 15 class PipelineClient { | |
|
xhwang
2016/04/21 05:50:35
This can also be a inner class, e.g. Pipeline::Cli
alokp
2016/04/21 21:56:38
Sure. Do you have a better name for Client? Now th
| |
| 16 public: | |
| 17 virtual ~PipelineClient() {} | |
| 18 | |
| 19 // Executed whenever an error occurs but hasn't been reported already through | |
| 20 // another callback. | |
| 21 virtual void OnError(PipelineStatus status) {} | |
| 22 | |
| 23 // Executed whenever the media reaches the end. | |
| 24 virtual void OnEnded() {} | |
| 25 | |
| 26 // Executed when the content duration, container video size, start time, and | |
| 27 // whether the content has audio and/or video in supported formats are known. | |
| 28 virtual void OnMetadata(PipelineMetadata metadata) {} | |
| 29 | |
| 30 // Executed whenever there are changes in the buffering state of the pipeline. | |
| 31 virtual void OnBufferingStateChange(BufferingState state) {} | |
| 32 | |
| 33 // Executed whenever the presentation duration changes. | |
| 34 virtual void OnDurationChange() {} | |
| 35 | |
| 36 // Executed whenever a text track is added. | |
| 37 virtual void OnAddTextTrack(const TextTrackConfig& config, | |
| 38 const AddTextTrackDoneCB& done_cb) {} | |
| 39 | |
| 40 // Executed whenever the key needed to decrypt the stream is not available. | |
| 41 virtual void OnWaitingForDecryptionKey() {} | |
| 42 }; | |
| 43 | |
| 44 } // namespace media | |
| 45 | |
| 46 #endif // MEDIA_BASE_PIPELINE_CLIENT_H_ | |
| OLD | NEW |