Skip to content

Commit

Permalink
fix naming and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
AradiPatrik committed Feb 6, 2024
1 parent e890be6 commit 61b1c66
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import android.opengl.EGLSurface;
import android.opengl.GLES20;
import android.util.SparseArray;

import androidx.annotation.GuardedBy;
import androidx.annotation.IntRange;
import androidx.annotation.Nullable;
Expand All @@ -43,18 +42,15 @@
import androidx.media3.common.util.Size;
import androidx.media3.common.util.UnstableApi;
import androidx.media3.common.util.Util;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;

import org.checkerframework.checker.nullness.qual.MonotonicNonNull;

import java.io.IOException;
import java.util.ArrayDeque;
import java.util.Iterator;
import java.util.List;
import java.util.Queue;
import java.util.concurrent.ExecutorService;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;

/**
* A basic {@link VideoCompositor} implementation that takes in frames from input sources' streams
Expand Down Expand Up @@ -146,9 +142,9 @@ public DefaultVideoCompositor(
}

@Override
public synchronized int registerInputSource(int sequenceId) {
inputSources.put(sequenceId, new InputSource());
return sequenceId;
public synchronized int registerInputSource(int sequenceIndex) {
inputSources.put(sequenceIndex, new InputSource());
return sequenceIndex;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ public void onEnded() {
onPreProcessingVideoFrameProcessorEnded(videoCompositorInputId);
}
});

preProcessors.put(videoCompositorInputId, preProcessor);
return videoCompositorInputId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ interface Listener {
* Registers a new input source, and returns a unique {@code inputId} corresponding to this
* source, to be used in {@link #queueInputTexture}.
*
* @param sequenceId The sequence ID of the input source, which is can be used to determine the
* order of the input sources.
* @param sequenceIndex The sequence index of the input source, which is can be used to determine
* the order of the input sources.
*/
int registerInputSource(int sequenceId);
int registerInputSource(int sequenceIndex);
/**
* Signals that no more frames will come from the upstream {@link GlTextureProducer.Listener}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ public SampleExporter(Format firstInputFormat, MuxerWrapper muxerWrapper) {
* @param sequenceIndex The sequence index of the input.
* @throws ExportException If an error occurs getting the input.
*/
public abstract GraphInput getInput(EditedMediaItem editedMediaItem, Format format, int sequenceIndex) throws ExportException;
public abstract GraphInput getInput(
EditedMediaItem editedMediaItem, Format format, int sequenceIndex) throws ExportException;

/**
* Processes the input data and returns whether it may be possible to process more data by calling
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ public SampleConsumer onOutputFormat(Format assetLoaderOutputFormat) throws Expo
}

GraphInput sampleExporterInput =
sampleExporter.getInput(firstEditedMediaItem, assetLoaderOutputFormat, sequenceIndex);
sampleExporter.getInput(firstEditedMediaItem, assetLoaderOutputFormat, sequenceIndex);
OnMediaItemChangedListener onMediaItemChangedListener =
(editedMediaItem, durationUs, decodedFormat, isLast) -> {
onMediaItemChanged(trackType, durationUs, isLast);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import android.media.MediaCodecInfo;
import android.util.Pair;
import android.view.Surface;

import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import androidx.media3.common.C;
Expand All @@ -50,17 +49,14 @@
import androidx.media3.effect.DebugTraceUtil;
import androidx.media3.effect.VideoCompositorSettings;
import androidx.media3.exoplayer.mediacodec.MediaCodecUtil;

import com.google.common.collect.ImmutableList;
import com.google.common.util.concurrent.MoreExecutors;

import java.nio.ByteBuffer;
import java.util.List;
import org.checkerframework.checker.initialization.qual.Initialized;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
import org.checkerframework.dataflow.qual.Pure;

import java.nio.ByteBuffer;
import java.util.List;

/** Processes, encodes and muxes raw video frames. */
/* package */ final class VideoSampleExporter extends SampleExporter {

Expand Down

0 comments on commit 61b1c66

Please sign in to comment.