Remove timeStampMs from EncodedImage.

This field shouldn't have been in the class in the first place.

Bug: webrtc:7760
Change-Id: If3c1d24f18a643249da1ed072bdfe06a37a7da12
Reviewed-on: https://chromium-review.googlesource.com/535539
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18593}
This commit is contained in:
Sami Kalliomäki 2017-06-14 13:46:58 +02:00 committed by Commit Bot
parent 4eccdaa314
commit 26ecfcc1c1
2 changed files with 5 additions and 14 deletions

View File

@ -26,19 +26,17 @@ public class EncodedImage {
public final ByteBuffer buffer;
public final int encodedWidth;
public final int encodedHeight;
public final long timeStampMs;
public final long captureTimeMs;
public final FrameType frameType;
public final int rotation;
public final boolean completeFrame;
public final Integer qp;
private EncodedImage(ByteBuffer buffer, int encodedWidth, int encodedHeight, long timeStampMs,
long captureTimeMs, FrameType frameType, int rotation, boolean completeFrame, Integer qp) {
private EncodedImage(ByteBuffer buffer, int encodedWidth, int encodedHeight, long captureTimeMs,
FrameType frameType, int rotation, boolean completeFrame, Integer qp) {
this.buffer = buffer;
this.encodedWidth = encodedWidth;
this.encodedHeight = encodedHeight;
this.timeStampMs = timeStampMs;
this.captureTimeMs = captureTimeMs;
this.frameType = frameType;
this.rotation = rotation;
@ -54,7 +52,6 @@ public class EncodedImage {
private ByteBuffer buffer;
private int encodedWidth;
private int encodedHeight;
private long timeStampMs;
private long captureTimeMs;
private EncodedImage.FrameType frameType;
private int rotation;
@ -78,11 +75,6 @@ public class EncodedImage {
return this;
}
public Builder setTimeStampMs(long timeStampMs) {
this.timeStampMs = timeStampMs;
return this;
}
public Builder setCaptureTimeMs(long captureTimeMs) {
this.captureTimeMs = captureTimeMs;
return this;
@ -109,8 +101,8 @@ public class EncodedImage {
}
public EncodedImage createEncodedImage() {
return new EncodedImage(buffer, encodedWidth, encodedHeight, timeStampMs, captureTimeMs,
frameType, rotation, completeFrame, qp);
return new EncodedImage(buffer, encodedWidth, encodedHeight, captureTimeMs, frameType,
rotation, completeFrame, qp);
}
}
}

View File

@ -18,8 +18,8 @@ import android.os.Bundle;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Deque;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.LinkedBlockingDeque;
@ -259,7 +259,6 @@ class HardwareVideoEncoder implements VideoEncoder {
// subsampled at one byte per four pixels.
int bufferSize = videoFrame.getBuffer().getHeight() * videoFrame.getBuffer().getWidth() * 3 / 2;
EncodedImage.Builder builder = EncodedImage.builder()
.setTimeStampMs(presentationTimestampMs)
.setCaptureTimeMs(presentationTimestampMs)
.setCompleteFrame(true)
.setEncodedWidth(videoFrame.getWidth())