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

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

Issue 1274123003: Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no media changes Created 5 years, 4 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_unittest.cc ('k') | media/renderers/video_renderer_impl_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 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "media/formats/mp4/box_definitions.h" 9 #include "media/formats/mp4/box_definitions.h"
10 #include "media/formats/mp4/rcheck.h" 10 #include "media/formats/mp4/rcheck.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } 139 }
140 140
141 void SetFlagsOnSamples(const std::string& sample_info, 141 void SetFlagsOnSamples(const std::string& sample_info,
142 TrackFragmentRun* trun) { 142 TrackFragmentRun* trun) {
143 // US - SampleDependsOnUnknown & IsSyncSample 143 // US - SampleDependsOnUnknown & IsSyncSample
144 // UN - SampleDependsOnUnknown & IsNonSyncSample 144 // UN - SampleDependsOnUnknown & IsNonSyncSample
145 // OS - SampleDependsOnOthers & IsSyncSample 145 // OS - SampleDependsOnOthers & IsSyncSample
146 // ON - SampleDependsOnOthers & IsNonSyncSample 146 // ON - SampleDependsOnOthers & IsNonSyncSample
147 // NS - SampleDependsOnNoOthers & IsSyncSample 147 // NS - SampleDependsOnNoOthers & IsSyncSample
148 // NN - SampleDependsOnNoOthers & IsNonSyncSample 148 // NN - SampleDependsOnNoOthers & IsNonSyncSample
149 std::vector<std::string> flags_data; 149 std::vector<std::string> flags_data = base::SplitString(
150 base::SplitString(sample_info, ' ', &flags_data); 150 sample_info, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
151 151
152 if (flags_data.size() == 1u) { 152 if (flags_data.size() == 1u) {
153 // Simulates the first_sample_flags_present set scenario, 153 // Simulates the first_sample_flags_present set scenario,
154 // where only one sample_flag value is set and the default 154 // where only one sample_flag value is set and the default
155 // flags are used for everything else. 155 // flags are used for everything else.
156 ASSERT_GE(trun->sample_count, flags_data.size()); 156 ASSERT_GE(trun->sample_count, flags_data.size());
157 } else { 157 } else {
158 ASSERT_EQ(trun->sample_count, flags_data.size()); 158 ASSERT_EQ(trun->sample_count, flags_data.size());
159 } 159 }
160 160
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 707
708 iter_->AdvanceRun(); 708 iter_->AdvanceRun();
709 709
710 // Verify that nothing is marked as a random access point. 710 // Verify that nothing is marked as a random access point.
711 EXPECT_EQ("2 KR P PR P KR K", KeyframeAndRAPInfo(iter_.get())); 711 EXPECT_EQ("2 KR P PR P KR K", KeyframeAndRAPInfo(iter_.get()));
712 } 712 }
713 713
714 714
715 } // namespace mp4 715 } // namespace mp4
716 } // namespace media 716 } // namespace media
OLDNEW
« no previous file with comments | « media/formats/mp4/avc_unittest.cc ('k') | media/renderers/video_renderer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698