Revert "Partial frame capture API part 6"
This reverts commit 7752ad672809f9f251619671f2d89c765334405c. Reason for revert: Partial Capture API is not needed, according to new info from the Chrome team. Original change's description: > Partial frame capture API part 6 > > Pass partial frames capability in SinkWants through VideoBroadcaster. > > Bug: webrtc:10152 > Change-Id: I9e5166b22fa5bfbd91ef0f10dae217cc94e042c4 > Reviewed-on: https://webrtc-review.googlesource.com/c/120660 > Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> > Reviewed-by: Niels Moller <nisse@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#26554} TBR=ilnik@webrtc.org,nisse@webrtc.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: webrtc:10152 Change-Id: I0aaf7ccc61218f7fa9a433bb2788a092588e6cfe Reviewed-on: https://webrtc-review.googlesource.com/c/122090 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26629}
This commit is contained in:
parent
85fc32540e
commit
fd5d4737e8
@ -87,16 +87,11 @@ void VideoBroadcaster::OnDiscardedFrame() {
|
|||||||
void VideoBroadcaster::UpdateWants() {
|
void VideoBroadcaster::UpdateWants() {
|
||||||
VideoSinkWants wants;
|
VideoSinkWants wants;
|
||||||
wants.rotation_applied = false;
|
wants.rotation_applied = false;
|
||||||
wants.partial_frames = true;
|
|
||||||
for (auto& sink : sink_pairs()) {
|
for (auto& sink : sink_pairs()) {
|
||||||
// wants.rotation_applied == ANY(sink.wants.rotation_applied)
|
// wants.rotation_applied == ANY(sink.wants.rotation_applied)
|
||||||
if (sink.wants.rotation_applied) {
|
if (sink.wants.rotation_applied) {
|
||||||
wants.rotation_applied = true;
|
wants.rotation_applied = true;
|
||||||
}
|
}
|
||||||
// wants.partial_frames == ALL(sink.wants.partial_frames)
|
|
||||||
if (!sink.wants.partial_frames) {
|
|
||||||
wants.partial_frames = false;
|
|
||||||
}
|
|
||||||
// wants.max_pixel_count == MIN(sink.wants.max_pixel_count)
|
// wants.max_pixel_count == MIN(sink.wants.max_pixel_count)
|
||||||
if (sink.wants.max_pixel_count < wants.max_pixel_count) {
|
if (sink.wants.max_pixel_count < wants.max_pixel_count) {
|
||||||
wants.max_pixel_count = sink.wants.max_pixel_count;
|
wants.max_pixel_count = sink.wants.max_pixel_count;
|
||||||
|
|||||||
@ -204,26 +204,3 @@ TEST(VideoBroadcasterTest, SinkWantsBlackFrames) {
|
|||||||
EXPECT_TRUE(sink2.black_frame());
|
EXPECT_TRUE(sink2.black_frame());
|
||||||
EXPECT_EQ(30, sink2.timestamp_us());
|
EXPECT_EQ(30, sink2.timestamp_us());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(VideoBroadcasterTest, SinkWantsPartialFrames) {
|
|
||||||
VideoBroadcaster broadcaster;
|
|
||||||
EXPECT_FALSE(broadcaster.wants().partial_frames);
|
|
||||||
|
|
||||||
FakeVideoRenderer sink1;
|
|
||||||
VideoSinkWants wants1;
|
|
||||||
wants1.partial_frames = true;
|
|
||||||
broadcaster.AddOrUpdateSink(&sink1, wants1);
|
|
||||||
|
|
||||||
FakeVideoRenderer sink2;
|
|
||||||
VideoSinkWants wants2;
|
|
||||||
wants2.partial_frames = false;
|
|
||||||
broadcaster.AddOrUpdateSink(&sink2, wants2);
|
|
||||||
|
|
||||||
EXPECT_FALSE(broadcaster.wants().partial_frames);
|
|
||||||
|
|
||||||
// Change second sink to also want partial frames.
|
|
||||||
wants2.partial_frames = true;
|
|
||||||
broadcaster.AddOrUpdateSink(&sink2, wants2);
|
|
||||||
|
|
||||||
EXPECT_TRUE(broadcaster.wants().partial_frames);
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user