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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
419 if (webm_alpha && !strcmp(webm_alpha->value, "1")) { | 419 if (webm_alpha && !strcmp(webm_alpha->value, "1")) { |
420 format = VideoFrame::YV12A; | 420 format = VideoFrame::YV12A; |
421 } | 421 } |
422 | 422 |
423 config->Initialize(codec, | 423 config->Initialize(codec, |
424 profile, | 424 profile, |
425 format, | 425 format, |
426 coded_size, visible_rect, natural_size, | 426 coded_size, visible_rect, natural_size, |
427 stream->codec->extradata, stream->codec->extradata_size, | 427 stream->codec->extradata, stream->codec->extradata_size, |
428 is_encrypted, | 428 is_encrypted, |
429 false, // Low-delay mode is off. | |
scherkus (not reviewing)
2014/04/10 21:11:49
compare "live mode" parameter vs. usage of "low de
Sergey Ulanov
2014/04/10 23:10:07
Done.
| |
429 record_stats); | 430 record_stats); |
430 } | 431 } |
431 | 432 |
432 void VideoDecoderConfigToAVCodecContext( | 433 void VideoDecoderConfigToAVCodecContext( |
433 const VideoDecoderConfig& config, | 434 const VideoDecoderConfig& config, |
434 AVCodecContext* codec_context) { | 435 AVCodecContext* codec_context) { |
435 codec_context->codec_type = AVMEDIA_TYPE_VIDEO; | 436 codec_context->codec_type = AVMEDIA_TYPE_VIDEO; |
436 codec_context->codec_id = VideoCodecToCodecID(config.codec()); | 437 codec_context->codec_id = VideoCodecToCodecID(config.codec()); |
437 codec_context->profile = VideoCodecProfileToProfileID(config.profile()); | 438 codec_context->profile = VideoCodecProfileToProfileID(config.profile()); |
438 codec_context->coded_width = config.coded_size().width(); | 439 codec_context->coded_width = config.coded_size().width(); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
544 return PIX_FMT_YUVJ420P; | 545 return PIX_FMT_YUVJ420P; |
545 case VideoFrame::YV12A: | 546 case VideoFrame::YV12A: |
546 return PIX_FMT_YUVA420P; | 547 return PIX_FMT_YUVA420P; |
547 default: | 548 default: |
548 DVLOG(1) << "Unsupported VideoFrame::Format: " << video_format; | 549 DVLOG(1) << "Unsupported VideoFrame::Format: " << video_format; |
549 } | 550 } |
550 return PIX_FMT_NONE; | 551 return PIX_FMT_NONE; |
551 } | 552 } |
552 | 553 |
553 } // namespace media | 554 } // namespace media |
OLD | NEW |