Chromium Code Reviews| 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..7c7ee281daa7bbb4470bc86b4b947c3fe66c3cb1 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; |
| @@ -38,16 +39,20 @@ class MediaSourceDelegate : public media::DemuxerHost { |
| public: |
| typedef base::Callback<void(WebKit::WebMediaPlayer::NetworkState)> |
| UpdateNetworkStateCB; |
| + typedef base::Callback<void(const media::Demuxer*)> DestroyDemuxerCB; |
| - 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, |
|
Ami GONE FROM CHROMIUM
2013/05/08 20:26:44
Is it easy to see why this variant wouldn't want a
|
| + const DestroyDemuxerCB& destroy_demuxer_cb); |
| const WebKit::WebTimeRanges& Buffered(); |
| size_t DecodedFrameCount() const; |
| @@ -85,24 +90,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 +110,24 @@ 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_; |
| + DestroyDemuxerCB destroy_demuxer_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 is_media_stream_; |
|
Ami GONE FROM CHROMIUM
2013/05/08 20:26:44
Should this not be a MediaSourceType?
In fact sin
wonsik
2013/05/13 14:03:48
Done.
|
| DISALLOW_COPY_AND_ASSIGN(MediaSourceDelegate); |
| }; |