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

Side by Side Diff: media/formats/mp2t/es_parser_h264.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 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/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/numerics/safe_conversions.h" 9 #include "base/numerics/safe_conversions.h"
10 #include "media/base/buffers.h" 10 #include "media/base/buffers.h"
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 if (natural_size.width() == 0) 301 if (natural_size.width() == 0)
302 return false; 302 return false;
303 303
304 VideoDecoderConfig video_decoder_config( 304 VideoDecoderConfig video_decoder_config(
305 kCodecH264, 305 kCodecH264,
306 VIDEO_CODEC_PROFILE_UNKNOWN, 306 VIDEO_CODEC_PROFILE_UNKNOWN,
307 VideoFrame::YV12, 307 VideoFrame::YV12,
308 coded_size, 308 coded_size,
309 visible_rect, 309 visible_rect,
310 natural_size, 310 natural_size,
311 NULL, 0, 311 NULL, 0, false,
312 false); 312 false);
313 313
314 if (!video_decoder_config.Matches(last_video_decoder_config_)) { 314 if (!video_decoder_config.Matches(last_video_decoder_config_)) {
315 DVLOG(1) << "Profile IDC: " << sps->profile_idc; 315 DVLOG(1) << "Profile IDC: " << sps->profile_idc;
316 DVLOG(1) << "Level IDC: " << sps->level_idc; 316 DVLOG(1) << "Level IDC: " << sps->level_idc;
317 DVLOG(1) << "Pic width: " << coded_size.width(); 317 DVLOG(1) << "Pic width: " << coded_size.width();
318 DVLOG(1) << "Pic height: " << coded_size.height(); 318 DVLOG(1) << "Pic height: " << coded_size.height();
319 DVLOG(1) << "log2_max_frame_num_minus4: " 319 DVLOG(1) << "log2_max_frame_num_minus4: "
320 << sps->log2_max_frame_num_minus4; 320 << sps->log2_max_frame_num_minus4;
321 DVLOG(1) << "SAR: width=" << sps->sar_width 321 DVLOG(1) << "SAR: width=" << sps->sar_width
322 << " height=" << sps->sar_height; 322 << " height=" << sps->sar_height;
323 last_video_decoder_config_ = video_decoder_config; 323 last_video_decoder_config_ = video_decoder_config;
324 new_video_config_cb_.Run(video_decoder_config); 324 new_video_config_cb_.Run(video_decoder_config);
325 } 325 }
326 326
327 return true; 327 return true;
328 } 328 }
329 329
330 } // namespace mp2t 330 } // namespace mp2t
331 } // namespace media 331 } // namespace media
332 332
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698