Chromium Code Reviews| Index: media/base/pipeline_client.h |
| diff --git a/media/base/pipeline_client.h b/media/base/pipeline_client.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b3e9bfb97afdd6d91dfd6a4df8c9235e0ee7aeae |
| --- /dev/null |
| +++ b/media/base/pipeline_client.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef MEDIA_BASE_PIPELINE_CLIENT_H_ |
| +#define MEDIA_BASE_PIPELINE_CLIENT_H_ |
| + |
| +#include "media/base/buffering_state.h" |
| +#include "media/base/pipeline_metadata.h" |
| +#include "media/base/pipeline_status.h" |
| +#include "media/base/text_track.h" |
| + |
| +namespace media { |
| + |
| +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
|
| + public: |
| + virtual ~PipelineClient() {} |
| + |
| + // Executed whenever an error occurs but hasn't been reported already through |
| + // another callback. |
| + virtual void OnError(PipelineStatus status) {} |
| + |
| + // Executed whenever the media reaches the end. |
| + virtual void OnEnded() {} |
| + |
| + // Executed when the content duration, container video size, start time, and |
| + // whether the content has audio and/or video in supported formats are known. |
| + virtual void OnMetadata(PipelineMetadata metadata) {} |
| + |
| + // Executed whenever there are changes in the buffering state of the pipeline. |
| + virtual void OnBufferingStateChange(BufferingState state) {} |
| + |
| + // Executed whenever the presentation duration changes. |
| + virtual void OnDurationChange() {} |
| + |
| + // Executed whenever a text track is added. |
| + virtual void OnAddTextTrack(const TextTrackConfig& config, |
| + const AddTextTrackDoneCB& done_cb) {} |
| + |
| + // Executed whenever the key needed to decrypt the stream is not available. |
| + virtual void OnWaitingForDecryptionKey() {} |
| +}; |
| + |
| +} // namespace media |
| + |
| +#endif // MEDIA_BASE_PIPELINE_CLIENT_H_ |