| 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 #include "webkit/renderer/media/android/media_source_delegate.h" | 5 #include "webkit/renderer/media/android/media_source_delegate.h" |
| 6 | 6 |
| 7 #include "base/message_loop_proxy.h" | 7 #include "base/message_loop_proxy.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "media/base/android/demuxer_stream_player_params.h" | 9 #include "media/base/android/demuxer_stream_player_params.h" |
| 10 #include "media/base/bind_to_loop.h" | 10 #include "media/base/bind_to_loop.h" |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 } | 302 } |
| 303 NotifyDemuxerReady(""); | 303 NotifyDemuxerReady(""); |
| 304 } | 304 } |
| 305 | 305 |
| 306 void MediaSourceDelegate::OnDemuxerStopDone() { | 306 void MediaSourceDelegate::OnDemuxerStopDone() { |
| 307 DVLOG(1) << "MediaSourceDelegate::OnDemuxerStopDone() : " << player_id_; | 307 DVLOG(1) << "MediaSourceDelegate::OnDemuxerStopDone() : " << player_id_; |
| 308 chunk_demuxer_.reset(); | 308 chunk_demuxer_.reset(); |
| 309 delete this; | 309 delete this; |
| 310 } | 310 } |
| 311 | 311 |
| 312 void MediaSourceDelegate::OnMediaConfigRequest() { |
| 313 NotifyDemuxerReady(""); |
| 314 } |
| 315 |
| 312 void MediaSourceDelegate::NotifyDemuxerReady(const std::string& key_system) { | 316 void MediaSourceDelegate::NotifyDemuxerReady(const std::string& key_system) { |
| 313 MediaPlayerHostMsg_DemuxerReady_Params params; | 317 MediaPlayerHostMsg_DemuxerReady_Params params; |
| 314 DemuxerStream* audio_stream = chunk_demuxer_->GetStream(DemuxerStream::AUDIO); | 318 DemuxerStream* audio_stream = chunk_demuxer_->GetStream(DemuxerStream::AUDIO); |
| 315 if (audio_stream) { | 319 if (audio_stream) { |
| 316 const media::AudioDecoderConfig& config = | 320 const media::AudioDecoderConfig& config = |
| 317 audio_stream->audio_decoder_config(); | 321 audio_stream->audio_decoder_config(); |
| 318 params.audio_codec = config.codec(); | 322 params.audio_codec = config.codec(); |
| 319 params.audio_channels = | 323 params.audio_channels = |
| 320 media::ChannelLayoutToChannelCount(config.channel_layout()); | 324 media::ChannelLayoutToChannelCount(config.channel_layout()); |
| 321 params.audio_sampling_rate = config.samples_per_second(); | 325 params.audio_sampling_rate = config.samples_per_second(); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 } | 371 } |
| 368 | 372 |
| 369 scoped_ptr<media::TextTrack> MediaSourceDelegate::OnAddTextTrack( | 373 scoped_ptr<media::TextTrack> MediaSourceDelegate::OnAddTextTrack( |
| 370 media::TextKind kind, | 374 media::TextKind kind, |
| 371 const std::string& label, | 375 const std::string& label, |
| 372 const std::string& language) { | 376 const std::string& language) { |
| 373 return scoped_ptr<media::TextTrack>(); | 377 return scoped_ptr<media::TextTrack>(); |
| 374 } | 378 } |
| 375 | 379 |
| 376 } // namespace webkit_media | 380 } // namespace webkit_media |
| OLD | NEW |