| 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 AVRational aspect_ratio = { 1, 1 }; | 375 AVRational aspect_ratio = { 1, 1 }; |
| 376 if (stream->sample_aspect_ratio.num) | 376 if (stream->sample_aspect_ratio.num) |
| 377 aspect_ratio = stream->sample_aspect_ratio; | 377 aspect_ratio = stream->sample_aspect_ratio; |
| 378 else if (stream->codec->sample_aspect_ratio.num) | 378 else if (stream->codec->sample_aspect_ratio.num) |
| 379 aspect_ratio = stream->codec->sample_aspect_ratio; | 379 aspect_ratio = stream->codec->sample_aspect_ratio; |
| 380 | 380 |
| 381 VideoCodec codec = CodecIDToVideoCodec(stream->codec->codec_id); | 381 VideoCodec codec = CodecIDToVideoCodec(stream->codec->codec_id); |
| 382 | 382 |
| 383 VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN; | 383 VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN; |
| 384 if (codec == kCodecVP8) | 384 if (codec == kCodecVP8) |
| 385 profile = VP8PROFILE_MAIN; | 385 profile = VP8PROFILE_ANY; |
| 386 else if (codec == kCodecVP9) | 386 else if (codec == kCodecVP9) |
| 387 profile = VP9PROFILE_MAIN; | 387 profile = VP9PROFILE_ANY; |
| 388 else | 388 else |
| 389 profile = ProfileIDToVideoCodecProfile(stream->codec->profile); | 389 profile = ProfileIDToVideoCodecProfile(stream->codec->profile); |
| 390 | 390 |
| 391 gfx::Size natural_size = GetNaturalSize( | 391 gfx::Size natural_size = GetNaturalSize( |
| 392 visible_rect.size(), aspect_ratio.num, aspect_ratio.den); | 392 visible_rect.size(), aspect_ratio.num, aspect_ratio.den); |
| 393 | 393 |
| 394 if (record_stats) { | 394 if (record_stats) { |
| 395 // Note the PRESUBMIT_IGNORE_UMA_MAX below, this silences the PRESUBMIT.py | 395 // Note the PRESUBMIT_IGNORE_UMA_MAX below, this silences the PRESUBMIT.py |
| 396 // check for uma enum max usage, since we're abusing | 396 // check for uma enum max usage, since we're abusing |
| 397 // UMA_HISTOGRAM_ENUMERATION to report a discrete value. | 397 // UMA_HISTOGRAM_ENUMERATION to report a discrete value. |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 return false; | 586 return false; |
| 587 | 587 |
| 588 *out = parsed_time; | 588 *out = parsed_time; |
| 589 return true; | 589 return true; |
| 590 } | 590 } |
| 591 | 591 |
| 592 return false; | 592 return false; |
| 593 } | 593 } |
| 594 | 594 |
| 595 } // namespace media | 595 } // namespace media |
| OLD | NEW |