| 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/ffmpeg/ffmpeg_common.h" | 5 #include "media/ffmpeg/ffmpeg_common.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "media/base/decoder_buffer.h" | 9 #include "media/base/decoder_buffer.h" |
| 10 #include "media/base/video_frame.h" | 10 #include "media/base/video_frame.h" |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 sample_format = kSampleFormatS16; | 284 sample_format = kSampleFormatS16; |
| 285 } | 285 } |
| 286 | 286 |
| 287 config->Initialize(codec, | 287 config->Initialize(codec, |
| 288 sample_format, | 288 sample_format, |
| 289 channel_layout, | 289 channel_layout, |
| 290 codec_context->sample_rate, | 290 codec_context->sample_rate, |
| 291 codec_context->extradata, | 291 codec_context->extradata, |
| 292 codec_context->extradata_size, | 292 codec_context->extradata_size, |
| 293 is_encrypted, | 293 is_encrypted, |
| 294 record_stats); | 294 record_stats, |
| 295 base::TimeDelta(), |
| 296 base::TimeDelta()); |
| 295 if (codec != kCodecOpus) { | 297 if (codec != kCodecOpus) { |
| 296 DCHECK_EQ(av_get_bytes_per_sample(codec_context->sample_fmt) * 8, | 298 DCHECK_EQ(av_get_bytes_per_sample(codec_context->sample_fmt) * 8, |
| 297 config->bits_per_channel()); | 299 config->bits_per_channel()); |
| 298 } | 300 } |
| 299 } | 301 } |
| 300 | 302 |
| 301 void AVStreamToAudioDecoderConfig( | 303 void AVStreamToAudioDecoderConfig( |
| 302 const AVStream* stream, | 304 const AVStream* stream, |
| 303 AudioDecoderConfig* config, | 305 AudioDecoderConfig* config, |
| 304 bool record_stats) { | 306 bool record_stats) { |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 return PIX_FMT_YUV420P; | 511 return PIX_FMT_YUV420P; |
| 510 case VideoFrame::YV12A: | 512 case VideoFrame::YV12A: |
| 511 return PIX_FMT_YUVA420P; | 513 return PIX_FMT_YUVA420P; |
| 512 default: | 514 default: |
| 513 DVLOG(1) << "Unsupported VideoFrame::Format: " << video_format; | 515 DVLOG(1) << "Unsupported VideoFrame::Format: " << video_format; |
| 514 } | 516 } |
| 515 return PIX_FMT_NONE; | 517 return PIX_FMT_NONE; |
| 516 } | 518 } |
| 517 | 519 |
| 518 } // namespace media | 520 } // namespace media |
| OLD | NEW |