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

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

Issue 290003002: Remove OnMoreIOData() (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed the media unittests on mac. Created 6 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/audio/win/audio_output_win_unittest.cc ('k') | no next file » | 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 #include <algorithm> 5 #include <algorithm>
6 #include <climits> 6 #include <climits>
7 #include <cstdarg> 7 #include <cstdarg>
8 #include <cstdio> 8 #include <cstdio>
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 // Note: Only logging underruns after the first frame has been received. 370 // Note: Only logging underruns after the first frame has been received.
371 LOG_IF(WARNING, currently_playing_audio_frame_start_ != -1) 371 LOG_IF(WARNING, currently_playing_audio_frame_start_ != -1)
372 << "Audio: Playback underrun of " << samples_remaining << " samples!"; 372 << "Audio: Playback underrun of " << samples_remaining << " samples!";
373 dest->ZeroFramesPartial(dest->frames() - samples_remaining, 373 dest->ZeroFramesPartial(dest->frames() - samples_remaining,
374 samples_remaining); 374 samples_remaining);
375 } 375 }
376 376
377 return dest->frames(); 377 return dest->frames();
378 } 378 }
379 379
380 virtual int OnMoreIOData(AudioBus* source,
381 AudioBus* dest,
382 AudioBuffersState buffers_state) OVERRIDE {
383 return OnMoreData(dest, buffers_state);
384 }
385
386 virtual void OnError(AudioOutputStream* stream) OVERRIDE { 380 virtual void OnError(AudioOutputStream* stream) OVERRIDE {
387 LOG(ERROR) << "AudioOutputStream reports an error. " 381 LOG(ERROR) << "AudioOutputStream reports an error. "
388 << "Playback is unlikely to continue."; 382 << "Playback is unlikely to continue.";
389 } 383 }
390 384
391 // End of AudioSourceCallback implementation. 385 // End of AudioSourceCallback implementation.
392 //////////////////////////////////////////////////////////////////// 386 ////////////////////////////////////////////////////////////////////
393 387
394 void ScheduleVideoPlayout() { 388 void ScheduleVideoPlayout() {
395 DCHECK(cast_env()->CurrentlyOn(CastEnvironment::MAIN)); 389 DCHECK(cast_env()->CurrentlyOn(CastEnvironment::MAIN));
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 audio_config, 576 audio_config,
583 video_config, 577 video_config,
584 window_width, 578 window_width,
585 window_height); 579 window_height);
586 player.Start(); 580 player.Start();
587 581
588 base::MessageLoop().Run(); // Run forever (i.e., until SIGTERM). 582 base::MessageLoop().Run(); // Run forever (i.e., until SIGTERM).
589 NOTREACHED(); 583 NOTREACHED();
590 return 0; 584 return 0;
591 } 585 }
OLDNEW
« no previous file with comments | « media/audio/win/audio_output_win_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698