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

Side by Side Diff: talk/app/webrtc/peerconnectionfactory_unittest.cc

Issue 1575223003: Added mute logic to VideoTrackRenderers. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 4 years, 11 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 | « no previous file | talk/app/webrtc/test/fakevideotrackrenderer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 factory_->CreateVideoSource(capturer, NULL)); 353 factory_->CreateVideoSource(capturer, NULL));
354 ASSERT_TRUE(source.get() != NULL); 354 ASSERT_TRUE(source.get() != NULL);
355 rtc::scoped_refptr<VideoTrackInterface> track( 355 rtc::scoped_refptr<VideoTrackInterface> track(
356 factory_->CreateVideoTrack("testlabel", source)); 356 factory_->CreateVideoTrack("testlabel", source));
357 ASSERT_TRUE(track.get() != NULL); 357 ASSERT_TRUE(track.get() != NULL);
358 FakeVideoTrackRenderer local_renderer(track); 358 FakeVideoTrackRenderer local_renderer(track);
359 359
360 EXPECT_EQ(0, local_renderer.num_rendered_frames()); 360 EXPECT_EQ(0, local_renderer.num_rendered_frames());
361 EXPECT_TRUE(capturer->CaptureFrame()); 361 EXPECT_TRUE(capturer->CaptureFrame());
362 EXPECT_EQ(1, local_renderer.num_rendered_frames()); 362 EXPECT_EQ(1, local_renderer.num_rendered_frames());
363 EXPECT_FALSE(local_renderer.black_frame());
363 364
364 track->set_enabled(false); 365 track->set_enabled(false);
365 EXPECT_TRUE(capturer->CaptureFrame()); 366 EXPECT_TRUE(capturer->CaptureFrame());
366 EXPECT_EQ(1, local_renderer.num_rendered_frames()); 367 EXPECT_EQ(2, local_renderer.num_rendered_frames());
368 EXPECT_TRUE(local_renderer.black_frame());
367 369
368 track->set_enabled(true); 370 track->set_enabled(true);
369 EXPECT_TRUE(capturer->CaptureFrame()); 371 EXPECT_TRUE(capturer->CaptureFrame());
370 EXPECT_EQ(2, local_renderer.num_rendered_frames()); 372 EXPECT_EQ(3, local_renderer.num_rendered_frames());
373 EXPECT_FALSE(local_renderer.black_frame());
371 } 374 }
372
OLDNEW
« no previous file with comments | « no previous file | talk/app/webrtc/test/fakevideotrackrenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698