| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 } | 326 } |
| 327 NotifyDemuxerReady(""); | 327 NotifyDemuxerReady(""); |
| 328 } | 328 } |
| 329 | 329 |
| 330 void MediaSourceDelegate::OnDemuxerStopDone() { | 330 void MediaSourceDelegate::OnDemuxerStopDone() { |
| 331 DVLOG(1) << "MediaSourceDelegate::OnDemuxerStopDone() : " << player_id_; | 331 DVLOG(1) << "MediaSourceDelegate::OnDemuxerStopDone() : " << player_id_; |
| 332 chunk_demuxer_.reset(); | 332 chunk_demuxer_.reset(); |
| 333 delete this; | 333 delete this; |
| 334 } | 334 } |
| 335 | 335 |
| 336 void MediaSourceDelegate::OnMediaConfigRequest() { |
| 337 NotifyDemuxerReady(""); |
| 338 } |
| 339 |
| 336 void MediaSourceDelegate::NotifyDemuxerReady(const std::string& key_system) { | 340 void MediaSourceDelegate::NotifyDemuxerReady(const std::string& key_system) { |
| 337 MediaPlayerHostMsg_DemuxerReady_Params params; | 341 MediaPlayerHostMsg_DemuxerReady_Params params; |
| 338 DemuxerStream* audio_stream = demuxer_->GetStream(DemuxerStream::AUDIO); | 342 DemuxerStream* audio_stream = demuxer_->GetStream(DemuxerStream::AUDIO); |
| 339 if (audio_stream) { | 343 if (audio_stream) { |
| 340 const media::AudioDecoderConfig& config = | 344 const media::AudioDecoderConfig& config = |
| 341 audio_stream->audio_decoder_config(); | 345 audio_stream->audio_decoder_config(); |
| 342 params.audio_codec = config.codec(); | 346 params.audio_codec = config.codec(); |
| 343 params.audio_channels = | 347 params.audio_channels = |
| 344 media::ChannelLayoutToChannelCount(config.channel_layout()); | 348 media::ChannelLayoutToChannelCount(config.channel_layout()); |
| 345 params.audio_sampling_rate = config.samples_per_second(); | 349 params.audio_sampling_rate = config.samples_per_second(); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 } | 404 } |
| 401 | 405 |
| 402 scoped_ptr<media::TextTrack> MediaSourceDelegate::OnAddTextTrack( | 406 scoped_ptr<media::TextTrack> MediaSourceDelegate::OnAddTextTrack( |
| 403 media::TextKind kind, | 407 media::TextKind kind, |
| 404 const std::string& label, | 408 const std::string& label, |
| 405 const std::string& language) { | 409 const std::string& language) { |
| 406 return scoped_ptr<media::TextTrack>(); | 410 return scoped_ptr<media::TextTrack>(); |
| 407 } | 411 } |
| 408 | 412 |
| 409 } // namespace webkit_media | 413 } // namespace webkit_media |
| OLD | NEW |