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

Side by Side Diff: media/formats/mp2t/es_parser_h264.cc

Issue 1221903003: Change the video color space default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 5 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/formats/mp2t/es_adapter_video_unittest.cc ('k') | media/formats/mp4/mp4_stream_parser.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/formats/mp2t/es_parser_h264.h" 5 #include "media/formats/mp2t/es_parser_h264.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/numerics/safe_conversions.h" 8 #include "base/numerics/safe_conversions.h"
9 #include "media/base/buffers.h" 9 #include "media/base/buffers.h"
10 #include "media/base/stream_parser_buffer.h" 10 #include "media/base/stream_parser_buffer.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 gfx::Size natural_size( 275 gfx::Size natural_size(
276 (visible_rect.width() * sar_width) / sar_height, 276 (visible_rect.width() * sar_width) / sar_height,
277 visible_rect.height()); 277 visible_rect.height());
278 if (natural_size.width() == 0) 278 if (natural_size.width() == 0)
279 return false; 279 return false;
280 280
281 VideoDecoderConfig video_decoder_config( 281 VideoDecoderConfig video_decoder_config(
282 kCodecH264, 282 kCodecH264,
283 VIDEO_CODEC_PROFILE_UNKNOWN, 283 VIDEO_CODEC_PROFILE_UNKNOWN,
284 VideoFrame::YV12, 284 VideoFrame::YV12,
285 VideoFrame::COLOR_SPACE_HD_REC709,
285 coded_size, 286 coded_size,
286 visible_rect, 287 visible_rect,
287 natural_size, 288 natural_size,
288 NULL, 0, 289 NULL, 0,
289 false); 290 false);
290 291
291 if (!video_decoder_config.Matches(last_video_decoder_config_)) { 292 if (!video_decoder_config.Matches(last_video_decoder_config_)) {
292 DVLOG(1) << "Profile IDC: " << sps->profile_idc; 293 DVLOG(1) << "Profile IDC: " << sps->profile_idc;
293 DVLOG(1) << "Level IDC: " << sps->level_idc; 294 DVLOG(1) << "Level IDC: " << sps->level_idc;
294 DVLOG(1) << "Pic width: " << coded_size.width(); 295 DVLOG(1) << "Pic width: " << coded_size.width();
295 DVLOG(1) << "Pic height: " << coded_size.height(); 296 DVLOG(1) << "Pic height: " << coded_size.height();
296 DVLOG(1) << "log2_max_frame_num_minus4: " 297 DVLOG(1) << "log2_max_frame_num_minus4: "
297 << sps->log2_max_frame_num_minus4; 298 << sps->log2_max_frame_num_minus4;
298 DVLOG(1) << "SAR: width=" << sps->sar_width 299 DVLOG(1) << "SAR: width=" << sps->sar_width
299 << " height=" << sps->sar_height; 300 << " height=" << sps->sar_height;
300 last_video_decoder_config_ = video_decoder_config; 301 last_video_decoder_config_ = video_decoder_config;
301 es_adapter_.OnConfigChanged(video_decoder_config); 302 es_adapter_.OnConfigChanged(video_decoder_config);
302 } 303 }
303 304
304 return true; 305 return true;
305 } 306 }
306 307
307 } // namespace mp2t 308 } // namespace mp2t
308 } // namespace media 309 } // namespace media
OLDNEW
« no previous file with comments | « media/formats/mp2t/es_adapter_video_unittest.cc ('k') | media/formats/mp4/mp4_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698