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

Side by Side Diff: media/formats/mp4/box_definitions.cc

Issue 1553493002: Global conversion of Pass()→std::move() on OS=linux chromecast=1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix fragile include order Created 4 years, 12 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/mp4/avc.cc ('k') | media/formats/mp4/hevc.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/mp4/box_definitions.h" 5 #include "media/formats/mp4/box_definitions.h"
6 6
7 #include <utility>
8
7 #include "base/logging.h" 9 #include "base/logging.h"
8 #include "media/base/video_types.h" 10 #include "media/base/video_types.h"
9 #include "media/base/video_util.h" 11 #include "media/base/video_util.h"
10 #include "media/formats/mp4/avc.h" 12 #include "media/formats/mp4/avc.h"
11 #include "media/formats/mp4/es_descriptor.h" 13 #include "media/formats/mp4/es_descriptor.h"
12 #include "media/formats/mp4/rcheck.h" 14 #include "media/formats/mp4/rcheck.h"
13 15
14 #if defined(ENABLE_HEVC_DEMUXING) 16 #if defined(ENABLE_HEVC_DEMUXING)
15 #include "media/formats/mp4/hevc.h" 17 #include "media/formats/mp4/hevc.h"
16 #endif 18 #endif
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 return false; 515 return false;
514 } 516 }
515 } 517 }
516 518
517 if (IsFormatValidH264(format, sinf)) { 519 if (IsFormatValidH264(format, sinf)) {
518 DVLOG(2) << __FUNCTION__ 520 DVLOG(2) << __FUNCTION__
519 << " reading AVCDecoderConfigurationRecord (avcC)"; 521 << " reading AVCDecoderConfigurationRecord (avcC)";
520 scoped_ptr<AVCDecoderConfigurationRecord> avcConfig( 522 scoped_ptr<AVCDecoderConfigurationRecord> avcConfig(
521 new AVCDecoderConfigurationRecord()); 523 new AVCDecoderConfigurationRecord());
522 RCHECK(reader->ReadChild(avcConfig.get())); 524 RCHECK(reader->ReadChild(avcConfig.get()));
523 frame_bitstream_converter = make_scoped_refptr( 525 frame_bitstream_converter =
524 new AVCBitstreamConverter(avcConfig.Pass())); 526 make_scoped_refptr(new AVCBitstreamConverter(std::move(avcConfig)));
525 video_codec = kCodecH264; 527 video_codec = kCodecH264;
526 video_codec_profile = H264PROFILE_MAIN; 528 video_codec_profile = H264PROFILE_MAIN;
527 #if defined(ENABLE_HEVC_DEMUXING) 529 #if defined(ENABLE_HEVC_DEMUXING)
528 } else if (IsFormatValidHEVC(format, sinf)) { 530 } else if (IsFormatValidHEVC(format, sinf)) {
529 DVLOG(2) << __FUNCTION__ 531 DVLOG(2) << __FUNCTION__
530 << " parsing HEVCDecoderConfigurationRecord (hvcC)"; 532 << " parsing HEVCDecoderConfigurationRecord (hvcC)";
531 scoped_ptr<HEVCDecoderConfigurationRecord> hevcConfig( 533 scoped_ptr<HEVCDecoderConfigurationRecord> hevcConfig(
532 new HEVCDecoderConfigurationRecord()); 534 new HEVCDecoderConfigurationRecord());
533 RCHECK(reader->ReadChild(hevcConfig.get())); 535 RCHECK(reader->ReadChild(hevcConfig.get()));
534 frame_bitstream_converter = make_scoped_refptr( 536 frame_bitstream_converter =
535 new HEVCBitstreamConverter(hevcConfig.Pass())); 537 make_scoped_refptr(new HEVCBitstreamConverter(std::move(hevcConfig)));
536 video_codec = kCodecHEVC; 538 video_codec = kCodecHEVC;
537 #endif 539 #endif
538 } else { 540 } else {
539 // Unknown/unsupported format 541 // Unknown/unsupported format
540 MEDIA_LOG(ERROR, reader->media_log()) << __FUNCTION__ 542 MEDIA_LOG(ERROR, reader->media_log()) << __FUNCTION__
541 << " unsupported video format " 543 << " unsupported video format "
542 << FourCCToString(format); 544 << FourCCToString(format);
543 return false; 545 return false;
544 } 546 }
545 547
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 SampleDependsOn IndependentAndDisposableSamples::sample_depends_on( 1041 SampleDependsOn IndependentAndDisposableSamples::sample_depends_on(
1040 size_t i) const { 1042 size_t i) const {
1041 if (i >= sample_depends_on_.size()) 1043 if (i >= sample_depends_on_.size())
1042 return kSampleDependsOnUnknown; 1044 return kSampleDependsOnUnknown;
1043 1045
1044 return sample_depends_on_[i]; 1046 return sample_depends_on_[i];
1045 } 1047 }
1046 1048
1047 } // namespace mp4 1049 } // namespace mp4
1048 } // namespace media 1050 } // namespace media
OLDNEW
« no previous file with comments | « media/formats/mp4/avc.cc ('k') | media/formats/mp4/hevc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698