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

Side by Side Diff: media/cast/test/sender.cc

Issue 1131113004: Convert JsonWriter::Write to taking a const ref for the in-param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 5 years, 7 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/cast/sender/fake_software_video_encoder.cc ('k') | media/cast/test/simulator.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // Test application that simulates a cast sender - Data can be either generated 5 // Test application that simulates a cast sender - Data can be either generated
6 // or read from a file. 6 // or read from a file.
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 scoped_ptr<media::cast::ReceiverTimeOffsetEstimatorImpl> estimator) { 180 scoped_ptr<media::cast::ReceiverTimeOffsetEstimatorImpl> estimator) {
181 cast_environment->Logging()->RemoveRawEventSubscriber( 181 cast_environment->Logging()->RemoveRawEventSubscriber(
182 video_event_subscriber.get()); 182 video_event_subscriber.get());
183 cast_environment->Logging()->RemoveRawEventSubscriber( 183 cast_environment->Logging()->RemoveRawEventSubscriber(
184 audio_event_subscriber.get()); 184 audio_event_subscriber.get());
185 cast_environment->Logging()->RemoveRawEventSubscriber(estimator.get()); 185 cast_environment->Logging()->RemoveRawEventSubscriber(estimator.get());
186 186
187 scoped_ptr<base::DictionaryValue> stats = video_event_subscriber->GetStats(); 187 scoped_ptr<base::DictionaryValue> stats = video_event_subscriber->GetStats();
188 std::string json; 188 std::string json;
189 base::JSONWriter::WriteWithOptions( 189 base::JSONWriter::WriteWithOptions(
190 stats.get(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &json); 190 *stats, base::JSONWriter::OPTIONS_PRETTY_PRINT, &json);
191 VLOG(0) << "Video stats: " << json; 191 VLOG(0) << "Video stats: " << json;
192 192
193 stats = audio_event_subscriber->GetStats(); 193 stats = audio_event_subscriber->GetStats();
194 json.clear(); 194 json.clear();
195 base::JSONWriter::WriteWithOptions( 195 base::JSONWriter::WriteWithOptions(
196 stats.get(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &json); 196 *stats, base::JSONWriter::OPTIONS_PRETTY_PRINT, &json);
197 VLOG(0) << "Audio stats: " << json; 197 VLOG(0) << "Audio stats: " << json;
198 } 198 }
199 199
200 } // namespace 200 } // namespace
201 201
202 int main(int argc, char** argv) { 202 int main(int argc, char** argv) {
203 base::AtExitManager at_exit; 203 base::AtExitManager at_exit;
204 base::CommandLine::Init(argc, argv); 204 base::CommandLine::Init(argc, argv);
205 InitLogging(logging::LoggingSettings()); 205 InitLogging(logging::LoggingSettings());
206 206
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 base::Unretained(cast_sender.get()), 371 base::Unretained(cast_sender.get()),
372 audio_config, 372 audio_config,
373 base::Bind(&QuitLoopOnInitializationResult))); 373 base::Bind(&QuitLoopOnInitializationResult)));
374 io_message_loop.Run(); // Wait for audio initialization. 374 io_message_loop.Run(); // Wait for audio initialization.
375 375
376 fake_media_source->Start(cast_sender->audio_frame_input(), 376 fake_media_source->Start(cast_sender->audio_frame_input(),
377 cast_sender->video_frame_input()); 377 cast_sender->video_frame_input());
378 io_message_loop.Run(); 378 io_message_loop.Run();
379 return 0; 379 return 0;
380 } 380 }
OLDNEW
« no previous file with comments | « media/cast/sender/fake_software_video_encoder.cc ('k') | media/cast/test/simulator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698