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

Side by Side Diff: media/filters/ffmpeg_demuxer.cc

Issue 1348973003: Roll ffmpeg for M47. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment. Created 5 years, 3 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
« no previous file with comments | « media/ffmpeg/ffmpeg_regression_tests.cc ('k') | media/filters/ffmpeg_video_decoder_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/filters/ffmpeg_demuxer.h" 5 #include "media/filters/ffmpeg_demuxer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 // when using external decoder (e.g. hardware decoder), so override them 1028 // when using external decoder (e.g. hardware decoder), so override them
1029 // here, to make sure this translates into a valid VideoDecoderConfig. 1029 // here, to make sure this translates into a valid VideoDecoderConfig.
1030 if (stream->codec->coded_width == 0 && 1030 if (stream->codec->coded_width == 0 &&
1031 stream->codec->coded_height == 0) { 1031 stream->codec->coded_height == 0) {
1032 DCHECK(stream->codec->width > 0); 1032 DCHECK(stream->codec->width > 0);
1033 DCHECK(stream->codec->height > 0); 1033 DCHECK(stream->codec->height > 0);
1034 stream->codec->coded_width = stream->codec->width; 1034 stream->codec->coded_width = stream->codec->width;
1035 stream->codec->coded_height = stream->codec->height; 1035 stream->codec->coded_height = stream->codec->height;
1036 } 1036 }
1037 if (stream->codec->pix_fmt == AV_PIX_FMT_NONE) { 1037 if (stream->codec->pix_fmt == AV_PIX_FMT_NONE) {
1038 stream->codec->pix_fmt = PIX_FMT_YUV420P; 1038 stream->codec->pix_fmt = AV_PIX_FMT_YUV420P;
1039 } 1039 }
1040 } 1040 }
1041 #endif 1041 #endif
1042 // Log the codec detected, whether it is supported or not. 1042 // Log the codec detected, whether it is supported or not.
1043 UMA_HISTOGRAM_SPARSE_SLOWLY("Media.DetectedVideoCodecHash", 1043 UMA_HISTOGRAM_SPARSE_SLOWLY("Media.DetectedVideoCodecHash",
1044 GetCodecHash(codec_context)); 1044 GetCodecHash(codec_context));
1045 1045
1046 // Ensure the codec is supported. IsValidConfig() also checks that the 1046 // Ensure the codec is supported. IsValidConfig() also checks that the
1047 // frame size and visible size are valid. 1047 // frame size and visible size are valid.
1048 AVStreamToVideoDecoderConfig(stream, &video_config); 1048 AVStreamToVideoDecoderConfig(stream, &video_config);
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 1457
1458 void FFmpegDemuxer::SetLiveness(DemuxerStream::Liveness liveness) { 1458 void FFmpegDemuxer::SetLiveness(DemuxerStream::Liveness liveness) {
1459 DCHECK(task_runner_->BelongsToCurrentThread()); 1459 DCHECK(task_runner_->BelongsToCurrentThread());
1460 for (const auto& stream : streams_) { // |stream| is a ref to a pointer. 1460 for (const auto& stream : streams_) { // |stream| is a ref to a pointer.
1461 if (stream) 1461 if (stream)
1462 stream->SetLiveness(liveness); 1462 stream->SetLiveness(liveness);
1463 } 1463 }
1464 } 1464 }
1465 1465
1466 } // namespace media 1466 } // namespace media
OLDNEW
« no previous file with comments | « media/ffmpeg/ffmpeg_regression_tests.cc ('k') | media/filters/ffmpeg_video_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698