Skip to content

Commit

Permalink
Remove deprecated constructor in DefaultVideoFrameProcessor.Factory
Browse files Browse the repository at this point in the history
Remove deprecated factory constructor and replace all call instances of it.

PiperOrigin-RevId: 525476062
  • Loading branch information
tof-tof authored and rohitjoins committed Apr 24, 2023
1 parent 3bcdac9 commit 6dcb018
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private VideoFrameProcessorTestRunner.Builder getDefaultFrameProcessorTestRunner
String testId) {
return new VideoFrameProcessorTestRunner.Builder()
.setTestId(testId)
.setVideoFrameProcessorFactory(new DefaultVideoFrameProcessor.Factory())
.setVideoFrameProcessorFactory(new DefaultVideoFrameProcessor.Factory.Builder().build())
.setIsInputTextureExternal(false)
.setOnOutputFrameAvailableListener(
unused -> checkNotNull(framesProduced).incrementAndGet());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ private VideoFrameProcessorTestRunner.Builder getDefaultFrameProcessorTestRunner
String testId) {
return new VideoFrameProcessorTestRunner.Builder()
.setTestId(testId)
.setVideoFrameProcessorFactory(new DefaultVideoFrameProcessor.Factory())
.setVideoFrameProcessorFactory(new DefaultVideoFrameProcessor.Factory.Builder().build())
.setVideoAssetPath(INPUT_SDR_MP4_ASSET_STRING);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ private void processFramesToEndOfStream(
CountDownLatch videoFrameProcessingEndedCountDownLatch = new CountDownLatch(1);
defaultVideoFrameProcessor =
checkNotNull(
new DefaultVideoFrameProcessor.Factory()
new DefaultVideoFrameProcessor.Factory.Builder()
.build()
.create(
getApplicationContext(),
ImmutableList.of((GlEffect) (context, useHdr) -> blankFrameProducer),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,6 @@ private Factory(
this.textureOutputListener = textureOutputListener;
}

// TODO(276913828): Remove and change all calls to a builder.
/**
* @deprecated Use {@link DefaultVideoFrameProcessor.Factory.Builder} instead.
*/
@Deprecated
public Factory() {
this(
/* enableColorTransfers= */ true,
GlObjectsProvider.DEFAULT,
/* textureOutputListener= */ null);
}

/**
* {@inheritDoc}
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,6 @@ private VideoFrameProcessorTestRunner.Builder getDefaultFrameProcessorTestRunner
String testId) {
return new VideoFrameProcessorTestRunner.Builder()
.setTestId(testId)
.setVideoFrameProcessorFactory(new DefaultVideoFrameProcessor.Factory());
.setVideoFrameProcessorFactory(new DefaultVideoFrameProcessor.Factory.Builder().build());
}
}

0 comments on commit 6dcb018

Please sign in to comment.