| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_ANDROID_DEMUXER_ANDROID_H_ | 5 #ifndef MEDIA_BASE_ANDROID_DEMUXER_ANDROID_H_ |
| 6 #define MEDIA_BASE_ANDROID_DEMUXER_ANDROID_H_ | 6 #define MEDIA_BASE_ANDROID_DEMUXER_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "media/base/demuxer_stream.h" | 10 #include "media/base/demuxer_stream.h" |
| 11 #include "media/base/media_export.h" | 11 #include "media/base/media_export.h" |
| 12 | 12 |
| 13 namespace media { | 13 namespace media { |
| 14 | 14 |
| 15 class DemuxerAndroidClient; | 15 class DemuxerAndroidClient; |
| 16 struct DemuxerConfigs; | 16 struct DemuxerConfigs; |
| 17 struct DemuxerData; | 17 struct DemuxerData; |
| 18 | 18 |
| 19 // Defines a demuxer with asynchronous operations. | 19 // Defines a demuxer with asynchronous operations. |
| 20 class MEDIA_EXPORT DemuxerAndroid { | 20 class MEDIA_EXPORT DemuxerAndroid { |
| 21 public: | 21 public: |
| 22 virtual ~DemuxerAndroid() {} | 22 virtual ~DemuxerAndroid() {} |
| 23 | 23 |
| 24 // Initializes this demuxer with |client| as the callback handler. | 24 // Initializes this demuxer with |client| as the callback handler. |
| 25 // Must be called prior to calling any other methods. | 25 // Must be called prior to calling any other methods. |
| 26 virtual void Initialize(DemuxerAndroidClient* client) = 0; | 26 virtual void Initialize(DemuxerAndroidClient* client) = 0; |
| 27 | 27 |
| 28 // Called to request the current audio/video decoder configurations. | |
| 29 virtual void RequestDemuxerConfigs() = 0; | |
| 30 | |
| 31 // Called to request additional data from the demuxer. | 28 // Called to request additional data from the demuxer. |
| 32 virtual void RequestDemuxerData(media::DemuxerStream::Type type) = 0; | 29 virtual void RequestDemuxerData(media::DemuxerStream::Type type) = 0; |
| 33 | 30 |
| 34 // Called to request the demuxer to seek to a particular media time. | 31 // Called to request the demuxer to seek to a particular media time. |
| 35 // |is_browser_seek| is true if the renderer is not previously expecting this | 32 // |is_browser_seek| is true if the renderer is not previously expecting this |
| 36 // seek and must coordinate with other regular seeks. Browser seek existence | 33 // seek and must coordinate with other regular seeks. Browser seek existence |
| 37 // should be hidden as much as possible from the renderer player and web apps. | 34 // should be hidden as much as possible from the renderer player and web apps. |
| 38 // TODO(wolenetz): Instead of doing browser seek, replay cached data since | 35 // TODO(wolenetz): Instead of doing browser seek, replay cached data since |
| 39 // last keyframe. See http://crbug.com/304234. | 36 // last keyframe. See http://crbug.com/304234. |
| 40 virtual void RequestDemuxerSeek(const base::TimeDelta& time_to_seek, | 37 virtual void RequestDemuxerSeek(const base::TimeDelta& time_to_seek, |
| (...skipping 26 matching lines...) Expand all Loading... |
| 67 // Called whenever the demuxer has detected a duration change. | 64 // Called whenever the demuxer has detected a duration change. |
| 68 virtual void OnDemuxerDurationChanged(base::TimeDelta duration) = 0; | 65 virtual void OnDemuxerDurationChanged(base::TimeDelta duration) = 0; |
| 69 | 66 |
| 70 protected: | 67 protected: |
| 71 virtual ~DemuxerAndroidClient() {} | 68 virtual ~DemuxerAndroidClient() {} |
| 72 }; | 69 }; |
| 73 | 70 |
| 74 } // namespace media | 71 } // namespace media |
| 75 | 72 |
| 76 #endif // MEDIA_BASE_ANDROID_DEMUXER_ANDROID_H_ | 73 #endif // MEDIA_BASE_ANDROID_DEMUXER_ANDROID_H_ |
| OLD | NEW |