OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "media/filters/decrypting_demuxer_stream.h" | 5 #include "media/filters/decrypting_demuxer_stream.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
370 } | 370 } |
371 | 371 |
372 void DecryptingDemuxerStream::InitializeDecoderConfig() { | 372 void DecryptingDemuxerStream::InitializeDecoderConfig() { |
373 // The decoder selector or upstream demuxer make sure the stream is valid. | 373 // The decoder selector or upstream demuxer make sure the stream is valid. |
374 DCHECK(IsStreamValid(demuxer_stream_)); | 374 DCHECK(IsStreamValid(demuxer_stream_)); |
375 | 375 |
376 switch (demuxer_stream_->type()) { | 376 switch (demuxer_stream_->type()) { |
377 case AUDIO: { | 377 case AUDIO: { |
378 AudioDecoderConfig input_audio_config = | 378 AudioDecoderConfig input_audio_config = |
379 demuxer_stream_->audio_decoder_config(); | 379 demuxer_stream_->audio_decoder_config(); |
380 audio_config_.Initialize( | 380 audio_config_ = demuxer_stream_->audio_decoder_config(); |
DaleCurtis
2017/02/24 18:03:50
Comments would be helpful for these. As it is, it
xhwang
2017/02/24 18:18:15
:)
Done.
| |
381 input_audio_config.codec(), input_audio_config.sample_format(), | 381 if (audio_config_.is_encrypted()) |
382 input_audio_config.channel_layout(), | 382 audio_config_.set_is_encrypted(false); |
383 input_audio_config.samples_per_second(), | |
384 input_audio_config.extra_data(), Unencrypted(), | |
385 input_audio_config.seek_preroll(), input_audio_config.codec_delay()); | |
386 break; | 383 break; |
387 } | 384 } |
388 | 385 |
389 case VIDEO: { | 386 case VIDEO: { |
390 VideoDecoderConfig input_video_config = | 387 video_config_ = demuxer_stream_->video_decoder_config(); |
391 demuxer_stream_->video_decoder_config(); | 388 if (video_config_.is_encrypted()) |
392 video_config_.Initialize( | 389 video_config_.set_is_encrypted(false); |
393 input_video_config.codec(), input_video_config.profile(), | |
394 input_video_config.format(), input_video_config.color_space(), | |
395 input_video_config.coded_size(), input_video_config.visible_rect(), | |
396 input_video_config.natural_size(), input_video_config.extra_data(), | |
397 Unencrypted()); | |
398 break; | 390 break; |
399 } | 391 } |
400 | 392 |
401 default: | 393 default: |
402 NOTREACHED(); | 394 NOTREACHED(); |
403 return; | 395 return; |
404 } | 396 } |
405 } | 397 } |
406 | 398 |
407 } // namespace media | 399 } // namespace media |
OLD | NEW |