| 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 "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 if (webm_alpha && !strcmp(webm_alpha->value, "1")) { | 414 if (webm_alpha && !strcmp(webm_alpha->value, "1")) { |
| 415 format = VideoFrame::YV12A; | 415 format = VideoFrame::YV12A; |
| 416 } | 416 } |
| 417 | 417 |
| 418 config->Initialize(codec, | 418 config->Initialize(codec, |
| 419 profile, | 419 profile, |
| 420 format, | 420 format, |
| 421 coded_size, visible_rect, natural_size, | 421 coded_size, visible_rect, natural_size, |
| 422 stream->codec->extradata, stream->codec->extradata_size, | 422 stream->codec->extradata, stream->codec->extradata_size, |
| 423 is_encrypted, | 423 is_encrypted, |
| 424 false, // Live mode is off. |
| 424 record_stats); | 425 record_stats); |
| 425 } | 426 } |
| 426 | 427 |
| 427 void VideoDecoderConfigToAVCodecContext( | 428 void VideoDecoderConfigToAVCodecContext( |
| 428 const VideoDecoderConfig& config, | 429 const VideoDecoderConfig& config, |
| 429 AVCodecContext* codec_context) { | 430 AVCodecContext* codec_context) { |
| 430 codec_context->codec_type = AVMEDIA_TYPE_VIDEO; | 431 codec_context->codec_type = AVMEDIA_TYPE_VIDEO; |
| 431 codec_context->codec_id = VideoCodecToCodecID(config.codec()); | 432 codec_context->codec_id = VideoCodecToCodecID(config.codec()); |
| 432 codec_context->profile = VideoCodecProfileToProfileID(config.profile()); | 433 codec_context->profile = VideoCodecProfileToProfileID(config.profile()); |
| 433 codec_context->coded_width = config.coded_size().width(); | 434 codec_context->coded_width = config.coded_size().width(); |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 return false; | 573 return false; |
| 573 | 574 |
| 574 *out = parsed_time; | 575 *out = parsed_time; |
| 575 return true; | 576 return true; |
| 576 } | 577 } |
| 577 | 578 |
| 578 return false; | 579 return false; |
| 579 } | 580 } |
| 580 | 581 |
| 581 } // namespace media | 582 } // namespace media |
| OLD | NEW |