| Index: webkit/media/android/media_source_delegate.h
|
| diff --git a/webkit/media/android/media_source_delegate.h b/webkit/media/android/media_source_delegate.h
|
| index 482f110465d6857a82fac0e185c598cf0f1fb5b8..6c749bc954d47a29fe91ad65308be100c27212fc 100644
|
| --- a/webkit/media/android/media_source_delegate.h
|
| +++ b/webkit/media/android/media_source_delegate.h
|
| @@ -31,6 +31,7 @@ class WebMediaSource;
|
|
|
| namespace webkit_media {
|
|
|
| +class KeyHandlingDemuxer;
|
| class ProxyDecryptor;
|
| class WebMediaPlayerProxyAndroid;
|
|
|
| @@ -39,15 +40,17 @@ class MediaSourceDelegate : public media::DemuxerHost {
|
| typedef base::Callback<void(WebKit::WebMediaPlayer::NetworkState)>
|
| UpdateNetworkStateCB;
|
|
|
| - MediaSourceDelegate(WebKit::WebFrame* frame,
|
| - WebKit::WebMediaPlayerClient* client,
|
| - WebMediaPlayerProxyAndroid* proxy,
|
| + MediaSourceDelegate(WebMediaPlayerProxyAndroid* proxy,
|
| int player_id,
|
| - media::MediaLog* media_log);
|
| + const UpdateNetworkStateCB& update_network_state_cb);
|
| virtual ~MediaSourceDelegate();
|
|
|
| - void Initialize(scoped_ptr<WebKit::WebMediaSource> media_source,
|
| - const UpdateNetworkStateCB& update_network_state_cb);
|
| + void InitializeMediaSource(WebKit::WebFrame* frame,
|
| + WebKit::WebMediaPlayerClient* client,
|
| + WebKit::WebMediaSource* media_source,
|
| + media::MediaLog* media_log);
|
| +
|
| + void InitializeMediaStream(media::Demuxer* demuxer);
|
|
|
| const WebKit::WebTimeRanges& Buffered();
|
| size_t DecodedFrameCount() const;
|
| @@ -85,24 +88,8 @@ class MediaSourceDelegate : public media::DemuxerHost {
|
| virtual void SetDuration(base::TimeDelta duration) OVERRIDE;
|
| virtual void OnDemuxerError(media::PipelineStatus status) OVERRIDE;
|
|
|
| - // Callbacks for ChunkDemuxer & Decryptor.
|
| + // Callbacks for Demuxer
|
| void OnDemuxerInitDone(media::PipelineStatus status);
|
| - void OnDemuxerOpened();
|
| - void OnKeyAdded(const std::string& key_system, const std::string& session_id);
|
| - void OnKeyError(const std::string& key_system,
|
| - const std::string& session_id,
|
| - media::Decryptor::KeyError error_code,
|
| - int system_code);
|
| - void OnKeyMessage(const std::string& key_system,
|
| - const std::string& session_id,
|
| - const std::string& message,
|
| - const std::string& default_url);
|
| - void OnNeedKey(const std::string& key_system,
|
| - const std::string& type,
|
| - const std::string& session_id,
|
| - scoped_ptr<uint8[]> init_data,
|
| - int init_data_size);
|
| - void OnDecryptorReady(media::Decryptor*);
|
|
|
| // Reads an access unit from the demuxer stream |stream| and stores it in
|
| // the |index|th access unit in |params|.
|
| @@ -121,36 +108,23 @@ class MediaSourceDelegate : public media::DemuxerHost {
|
|
|
| base::WeakPtrFactory<MediaSourceDelegate> weak_this_;
|
|
|
| - WebKit::WebMediaPlayerClient* const client_;
|
| WebMediaPlayerProxyAndroid* proxy_;
|
| int player_id_;
|
|
|
| - scoped_refptr<media::MediaLog> media_log_;
|
| UpdateNetworkStateCB update_network_state_cb_;
|
|
|
| - scoped_ptr<media::ChunkDemuxer> chunk_demuxer_;
|
| - scoped_ptr<WebKit::WebMediaSource> media_source_;
|
| + scoped_ptr<KeyHandlingDemuxer> demuxer_;
|
|
|
| media::PipelineStatistics statistics_;
|
| media::Ranges<base::TimeDelta> buffered_time_ranges_;
|
| // Keep a list of buffered time ranges.
|
| WebKit::WebTimeRanges buffered_web_time_ranges_;
|
|
|
| - // The decryptor that manages decryption keys and decrypts encrypted frames.
|
| - scoped_ptr<ProxyDecryptor> decryptor_;
|
| -
|
| - // The currently selected key system. Empty string means that no key system
|
| - // has been selected.
|
| - WebKit::WebString current_key_system_;
|
| -
|
| - // Temporary for EME v0.1. In the future the init data type should be passed
|
| - // through GenerateKeyRequest() directly from WebKit.
|
| - std::string init_data_type_;
|
| -
|
| scoped_ptr<media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params> audio_params_;
|
| scoped_ptr<media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params> video_params_;
|
|
|
| bool seeking_;
|
| + bool low_latency_mode_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(MediaSourceDelegate);
|
| };
|
|
|