| 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 WEBKIT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ | 5 #ifndef WEBKIT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ |
| 6 #define WEBKIT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ | 6 #define WEBKIT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 const WebKit::WebTimeRanges& Buffered(); | 65 const WebKit::WebTimeRanges& Buffered(); |
| 66 size_t DecodedFrameCount() const; | 66 size_t DecodedFrameCount() const; |
| 67 size_t DroppedFrameCount() const; | 67 size_t DroppedFrameCount() const; |
| 68 size_t AudioDecodedByteCount() const; | 68 size_t AudioDecodedByteCount() const; |
| 69 size_t VideoDecodedByteCount() const; | 69 size_t VideoDecodedByteCount() const; |
| 70 | 70 |
| 71 void Seek(base::TimeDelta time); | 71 void Seek(base::TimeDelta time); |
| 72 | 72 |
| 73 void CancelPendingSeek(); | 73 void CancelPendingSeek(); |
| 74 | 74 |
| 75 void NotifyDemuxerReady(const std::string& key_system); | 75 void NotifyKeyAdded(const std::string& key_system); |
| 76 | 76 |
| 77 // Called when DemuxerStreamPlayer needs to read data from ChunkDemuxer. | 77 // Called when DemuxerStreamPlayer needs to read data from ChunkDemuxer. |
| 78 // If it's the first request after the seek, |seek_done| will be true. | 78 // If it's the first request after the seek, |seek_done| will be true. |
| 79 void OnReadFromDemuxer(media::DemuxerStream::Type type, bool seek_done); | 79 void OnReadFromDemuxer(media::DemuxerStream::Type type, bool seek_done); |
| 80 | 80 |
| 81 // Called when the player needs the new config data from ChunkDemuxer. | 81 // Called when the player needs the new config data from ChunkDemuxer. |
| 82 void OnMediaConfigRequest(); | 82 void OnMediaConfigRequest(); |
| 83 | 83 |
| 84 // Called by the Destroyer to destroy an instance of this object. | 84 // Called by the Destroyer to destroy an instance of this object. |
| 85 void Destroy(); | 85 void Destroy(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 100 void OnDemuxerInitDone(media::PipelineStatus status); | 100 void OnDemuxerInitDone(media::PipelineStatus status); |
| 101 void OnDemuxerStopDone(); | 101 void OnDemuxerStopDone(); |
| 102 void OnDemuxerOpened(); | 102 void OnDemuxerOpened(); |
| 103 void OnNeedKey(const std::string& type, | 103 void OnNeedKey(const std::string& type, |
| 104 const std::string& session_id, | 104 const std::string& session_id, |
| 105 scoped_ptr<uint8[]> init_data, | 105 scoped_ptr<uint8[]> init_data, |
| 106 int init_data_size); | 106 int init_data_size); |
| 107 scoped_ptr<media::TextTrack> OnAddTextTrack(media::TextKind kind, | 107 scoped_ptr<media::TextTrack> OnAddTextTrack(media::TextKind kind, |
| 108 const std::string& label, | 108 const std::string& label, |
| 109 const std::string& language); | 109 const std::string& language); |
| 110 void NotifyDemuxerReady(const std::string& key_system); |
| 111 bool CanNotifyDemuxerReady(); |
| 110 | 112 |
| 111 // Reads an access unit from the demuxer stream |stream| and stores it in | 113 // Reads an access unit from the demuxer stream |stream| and stores it in |
| 112 // the |index|th access unit in |params|. | 114 // the |index|th access unit in |params|. |
| 113 void ReadFromDemuxerStream( | 115 void ReadFromDemuxerStream( |
| 114 media::DemuxerStream* stream, | 116 media::DemuxerStream* stream, |
| 115 media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params* params, | 117 media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params* params, |
| 116 size_t index); | 118 size_t index); |
| 117 void OnBufferReady( | 119 void OnBufferReady( |
| 118 media::DemuxerStream* stream, | 120 media::DemuxerStream* stream, |
| 119 media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params* params, | 121 media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params* params, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 149 WebKit::WebString current_key_system_; | 151 WebKit::WebString current_key_system_; |
| 150 | 152 |
| 151 // Temporary for EME v0.1. In the future the init data type should be passed | 153 // Temporary for EME v0.1. In the future the init data type should be passed |
| 152 // through GenerateKeyRequest() directly from WebKit. | 154 // through GenerateKeyRequest() directly from WebKit. |
| 153 std::string init_data_type_; | 155 std::string init_data_type_; |
| 154 | 156 |
| 155 scoped_ptr<media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params> audio_params_; | 157 scoped_ptr<media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params> audio_params_; |
| 156 scoped_ptr<media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params> video_params_; | 158 scoped_ptr<media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params> video_params_; |
| 157 | 159 |
| 158 bool seeking_; | 160 bool seeking_; |
| 161 bool key_added_; |
| 159 size_t access_unit_size_; | 162 size_t access_unit_size_; |
| 160 | 163 |
| 161 DISALLOW_COPY_AND_ASSIGN(MediaSourceDelegate); | 164 DISALLOW_COPY_AND_ASSIGN(MediaSourceDelegate); |
| 162 }; | 165 }; |
| 163 | 166 |
| 164 } // namespace webkit_media | 167 } // namespace webkit_media |
| 165 #endif // WEBKIT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ | 168 #endif // WEBKIT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ |
| OLD | NEW |