Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: media/ffmpeg/ffmpeg_common.cc

Issue 231283005: Add live mode detection in WebM MediaSource parser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698