Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: content/renderer/media/android/media_source_delegate.h

Issue 935243002: Decryptors can report kNoKey to WebMediaPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android changes Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_
6 #define CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ 6 #define CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 ~MediaSourceDelegate() override; 55 ~MediaSourceDelegate() override;
56 56
57 // Initialize the MediaSourceDelegate. |media_source| will be owned by 57 // Initialize the MediaSourceDelegate. |media_source| will be owned by
58 // this object after this call. 58 // this object after this call.
59 void InitializeMediaSource( 59 void InitializeMediaSource(
60 const MediaSourceOpenedCB& media_source_opened_cb, 60 const MediaSourceOpenedCB& media_source_opened_cb,
61 const media::Demuxer::EncryptedMediaInitDataCB& 61 const media::Demuxer::EncryptedMediaInitDataCB&
62 encrypted_media_init_data_cb, 62 encrypted_media_init_data_cb,
63 const media::SetDecryptorReadyCB& set_decryptor_ready_cb, 63 const media::SetDecryptorReadyCB& set_decryptor_ready_cb,
64 const UpdateNetworkStateCB& update_network_state_cb, 64 const UpdateNetworkStateCB& update_network_state_cb,
65 const DurationChangeCB& duration_change_cb); 65 const DurationChangeCB& duration_change_cb,
66 const base::Closure& waiting_for_decryption_key_cb);
66 67
67 blink::WebTimeRanges Buffered() const; 68 blink::WebTimeRanges Buffered() const;
68 size_t DecodedFrameCount() const; 69 size_t DecodedFrameCount() const;
69 size_t DroppedFrameCount() const; 70 size_t DroppedFrameCount() const;
70 size_t AudioDecodedByteCount() const; 71 size_t AudioDecodedByteCount() const;
71 size_t VideoDecodedByteCount() const; 72 size_t VideoDecodedByteCount() const;
72 73
73 // In MSE case, calls ChunkDemuxer::CancelPendingSeek(). Also sets the 74 // In MSE case, calls ChunkDemuxer::CancelPendingSeek(). Also sets the
74 // expectation that a regular seek will be arriving and to trivially finish 75 // expectation that a regular seek will be arriving and to trivially finish
75 // any browser seeks that may be requested prior to the regular seek. 76 // any browser seeks that may be requested prior to the regular seek.
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 scoped_ptr<media::DecryptingDemuxerStream> video_decrypting_demuxer_stream_; 192 scoped_ptr<media::DecryptingDemuxerStream> video_decrypting_demuxer_stream_;
192 193
193 media::DemuxerStream* audio_stream_; 194 media::DemuxerStream* audio_stream_;
194 media::DemuxerStream* video_stream_; 195 media::DemuxerStream* video_stream_;
195 196
196 media::PipelineStatistics statistics_; 197 media::PipelineStatistics statistics_;
197 media::Ranges<base::TimeDelta> buffered_time_ranges_; 198 media::Ranges<base::TimeDelta> buffered_time_ranges_;
198 199
199 MediaSourceOpenedCB media_source_opened_cb_; 200 MediaSourceOpenedCB media_source_opened_cb_;
200 media::Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb_; 201 media::Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb_;
202 base::Closure waiting_for_decryption_key_cb_;
201 203
202 // Temporary for EME v0.1. In the future the init data type should be passed 204 // Temporary for EME v0.1. In the future the init data type should be passed
203 // through GenerateKeyRequest() directly from WebKit. 205 // through GenerateKeyRequest() directly from WebKit.
204 std::string init_data_type_; 206 std::string init_data_type_;
205 207
206 // Lock used to serialize access for |seeking_|. 208 // Lock used to serialize access for |seeking_|.
207 mutable base::Lock seeking_lock_; 209 mutable base::Lock seeking_lock_;
208 bool seeking_; 210 bool seeking_;
209 211
210 // Lock used to serialize access for |is_video_encrypted_|. 212 // Lock used to serialize access for |is_video_encrypted_|.
(...skipping 19 matching lines...) Expand all
230 base::WeakPtr<MediaSourceDelegate> main_weak_this_; 232 base::WeakPtr<MediaSourceDelegate> main_weak_this_;
231 base::WeakPtrFactory<MediaSourceDelegate> main_weak_factory_; 233 base::WeakPtrFactory<MediaSourceDelegate> main_weak_factory_;
232 base::WeakPtrFactory<MediaSourceDelegate> media_weak_factory_; 234 base::WeakPtrFactory<MediaSourceDelegate> media_weak_factory_;
233 235
234 DISALLOW_COPY_AND_ASSIGN(MediaSourceDelegate); 236 DISALLOW_COPY_AND_ASSIGN(MediaSourceDelegate);
235 }; 237 };
236 238
237 } // namespace content 239 } // namespace content
238 240
239 #endif // CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ 241 #endif // CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698