OLD | NEW |
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/mp4/mp4_stream_parser.h" | 5 #include "media/formats/mp4/mp4_stream_parser.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "media/base/audio_decoder_config.h" | 10 #include "media/base/audio_decoder_config.h" |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 | 286 |
287 // TODO(strobe): Recover correct crop box | 287 // TODO(strobe): Recover correct crop box |
288 gfx::Size coded_size(entry.width, entry.height); | 288 gfx::Size coded_size(entry.width, entry.height); |
289 gfx::Rect visible_rect(coded_size); | 289 gfx::Rect visible_rect(coded_size); |
290 gfx::Size natural_size = GetNaturalSize(visible_rect.size(), | 290 gfx::Size natural_size = GetNaturalSize(visible_rect.size(), |
291 entry.pixel_aspect.h_spacing, | 291 entry.pixel_aspect.h_spacing, |
292 entry.pixel_aspect.v_spacing); | 292 entry.pixel_aspect.v_spacing); |
293 is_video_track_encrypted_ = entry.sinf.info.track_encryption.is_encrypted; | 293 is_video_track_encrypted_ = entry.sinf.info.track_encryption.is_encrypted; |
294 DVLOG(1) << "is_video_track_encrypted_: " << is_video_track_encrypted_; | 294 DVLOG(1) << "is_video_track_encrypted_: " << is_video_track_encrypted_; |
295 video_config.Initialize(kCodecH264, H264PROFILE_MAIN, PIXEL_FORMAT_YV12, | 295 video_config.Initialize(kCodecH264, H264PROFILE_MAIN, PIXEL_FORMAT_YV12, |
296 COLOR_SPACE_UNSPECIFIED, coded_size, visible_rect, | 296 COLOR_SPACE_HD_REC709, coded_size, visible_rect, |
297 natural_size, | 297 natural_size, |
298 // No decoder-specific buffer needed for AVC; | 298 // No decoder-specific buffer needed for AVC; |
299 // SPS/PPS are embedded in the video stream | 299 // SPS/PPS are embedded in the video stream |
300 NULL, 0, is_video_track_encrypted_, false); | 300 NULL, 0, is_video_track_encrypted_, false); |
301 has_video_ = true; | 301 has_video_ = true; |
302 video_track_id_ = track->header.track_id; | 302 video_track_id_ = track->header.track_id; |
303 } | 303 } |
304 } | 304 } |
305 | 305 |
306 RCHECK(config_cb_.Run(audio_config, video_config, TextTrackConfigMap())); | 306 RCHECK(config_cb_.Run(audio_config, video_config, TextTrackConfigMap())); |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 runs.AdvanceSample(); | 639 runs.AdvanceSample(); |
640 } | 640 } |
641 runs.AdvanceRun(); | 641 runs.AdvanceRun(); |
642 } | 642 } |
643 | 643 |
644 return true; | 644 return true; |
645 } | 645 } |
646 | 646 |
647 } // namespace mp4 | 647 } // namespace mp4 |
648 } // namespace media | 648 } // namespace media |
OLD | NEW |