mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Add tracing info for EOS signaling in the texture managers
PiperOrigin-RevId: 544063377
This commit is contained in:
parent
d895a46b28
commit
98eb339333
3 changed files with 37 additions and 1 deletions
|
|
@ -111,6 +111,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||||
() -> {
|
() -> {
|
||||||
if (framesToQueueForCurrentBitmap == 0 && pendingBitmaps.isEmpty()) {
|
if (framesToQueueForCurrentBitmap == 0 && pendingBitmaps.isEmpty()) {
|
||||||
shaderProgram.signalEndOfCurrentInputStream();
|
shaderProgram.signalEndOfCurrentInputStream();
|
||||||
|
DebugTraceUtil.recordBitmapTextureManagerSignalEndOfCurrentInputStream();
|
||||||
} else {
|
} else {
|
||||||
currentInputStreamEnded = true;
|
currentInputStreamEnded = true;
|
||||||
}
|
}
|
||||||
|
|
@ -201,6 +202,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||||
// Only signal end of stream after all pending bitmaps are processed.
|
// Only signal end of stream after all pending bitmaps are processed.
|
||||||
// TODO(b/269424561): Call signalEndOfCurrentInputStream on every bitmap
|
// TODO(b/269424561): Call signalEndOfCurrentInputStream on every bitmap
|
||||||
shaderProgram.signalEndOfCurrentInputStream();
|
shaderProgram.signalEndOfCurrentInputStream();
|
||||||
|
DebugTraceUtil.recordBitmapTextureManagerSignalEndOfCurrentInputStream();
|
||||||
currentInputStreamEnded = false;
|
currentInputStreamEnded = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,22 @@ public final class DebugTraceUtil {
|
||||||
private static final Queue<Long> EXTERNAL_TEXTURE_MANAGER_SIGNAL_EOCIS_TIMES_MS =
|
private static final Queue<Long> EXTERNAL_TEXTURE_MANAGER_SIGNAL_EOCIS_TIMES_MS =
|
||||||
new ArrayDeque<>();
|
new ArrayDeque<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The timestamps at which {@code BitmapTextureManager} signalled end of current input stream, in
|
||||||
|
* milliseconds.
|
||||||
|
*/
|
||||||
|
@GuardedBy("DebugTraceUtil.class")
|
||||||
|
private static final Queue<Long> BITMAP_TEXTURE_MANAGER_SIGNAL_EOCIS_TIMES_MS =
|
||||||
|
new ArrayDeque<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The timestamps at which {@code TexIdTextureManager} signalled end of current input stream, in
|
||||||
|
* milliseconds.
|
||||||
|
*/
|
||||||
|
@GuardedBy("DebugTraceUtil.class")
|
||||||
|
private static final Queue<Long> TEX_ID_TEXTURE_MANAGER_SIGNAL_EOCIS_TIMES_MS =
|
||||||
|
new ArrayDeque<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The timestamps at which {@code VideoFrameProcessor} signalled end of stream, in milliseconds.
|
* The timestamps at which {@code VideoFrameProcessor} signalled end of stream, in milliseconds.
|
||||||
*/
|
*/
|
||||||
|
|
@ -123,6 +139,8 @@ public final class DebugTraceUtil {
|
||||||
DECODER_SIGNAL_EOS_TIMES_MS.clear();
|
DECODER_SIGNAL_EOS_TIMES_MS.clear();
|
||||||
VIDEO_FRAME_PROCESSOR_RECEIVE_DECODER_EOS_TIMES_MS.clear();
|
VIDEO_FRAME_PROCESSOR_RECEIVE_DECODER_EOS_TIMES_MS.clear();
|
||||||
EXTERNAL_TEXTURE_MANAGER_SIGNAL_EOCIS_TIMES_MS.clear();
|
EXTERNAL_TEXTURE_MANAGER_SIGNAL_EOCIS_TIMES_MS.clear();
|
||||||
|
BITMAP_TEXTURE_MANAGER_SIGNAL_EOCIS_TIMES_MS.clear();
|
||||||
|
TEX_ID_TEXTURE_MANAGER_SIGNAL_EOCIS_TIMES_MS.clear();
|
||||||
VIDEO_FRAME_PROCESSOR_SIGNAL_EOS_TIMES_MS.clear();
|
VIDEO_FRAME_PROCESSOR_SIGNAL_EOS_TIMES_MS.clear();
|
||||||
ENCODER_RECEIVE_EOS_TIMES_MS.clear();
|
ENCODER_RECEIVE_EOS_TIMES_MS.clear();
|
||||||
MUXER_CAN_WRITE_VIDEO_SAMPLE.clear();
|
MUXER_CAN_WRITE_VIDEO_SAMPLE.clear();
|
||||||
|
|
@ -175,6 +193,14 @@ public final class DebugTraceUtil {
|
||||||
EXTERNAL_TEXTURE_MANAGER_SIGNAL_EOCIS_TIMES_MS.add(SystemClock.DEFAULT.elapsedRealtime());
|
EXTERNAL_TEXTURE_MANAGER_SIGNAL_EOCIS_TIMES_MS.add(SystemClock.DEFAULT.elapsedRealtime());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static synchronized void recordBitmapTextureManagerSignalEndOfCurrentInputStream() {
|
||||||
|
BITMAP_TEXTURE_MANAGER_SIGNAL_EOCIS_TIMES_MS.add(SystemClock.DEFAULT.elapsedRealtime());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static synchronized void recordTexIdTextureManagerSignalEndOfCurrentInputStream() {
|
||||||
|
TEX_ID_TEXTURE_MANAGER_SIGNAL_EOCIS_TIMES_MS.add(SystemClock.DEFAULT.elapsedRealtime());
|
||||||
|
}
|
||||||
|
|
||||||
public static synchronized void recordVideoFrameProcessorSignalEos() {
|
public static synchronized void recordVideoFrameProcessorSignalEos() {
|
||||||
VIDEO_FRAME_PROCESSOR_SIGNAL_EOS_TIMES_MS.add(SystemClock.DEFAULT.elapsedRealtime());
|
VIDEO_FRAME_PROCESSOR_SIGNAL_EOS_TIMES_MS.add(SystemClock.DEFAULT.elapsedRealtime());
|
||||||
}
|
}
|
||||||
|
|
@ -222,6 +248,10 @@ public final class DebugTraceUtil {
|
||||||
+ generateString(VIDEO_FRAME_PROCESSOR_RECEIVE_DECODER_EOS_TIMES_MS)
|
+ generateString(VIDEO_FRAME_PROCESSOR_RECEIVE_DECODER_EOS_TIMES_MS)
|
||||||
+ ", VFP ExtTexMgr signal EndOfCurrentInputStream: "
|
+ ", VFP ExtTexMgr signal EndOfCurrentInputStream: "
|
||||||
+ generateString(EXTERNAL_TEXTURE_MANAGER_SIGNAL_EOCIS_TIMES_MS)
|
+ generateString(EXTERNAL_TEXTURE_MANAGER_SIGNAL_EOCIS_TIMES_MS)
|
||||||
|
+ ", VFP BitmapTexMgr signal EndOfCurrentInputStream: "
|
||||||
|
+ generateString(BITMAP_TEXTURE_MANAGER_SIGNAL_EOCIS_TIMES_MS)
|
||||||
|
+ ", VFP TexIdTexMhr signal EndOfCurrentInputStream: "
|
||||||
|
+ generateString(TEX_ID_TEXTURE_MANAGER_SIGNAL_EOCIS_TIMES_MS)
|
||||||
+ ", VFP signal EOS: "
|
+ ", VFP signal EOS: "
|
||||||
+ generateString(VIDEO_FRAME_PROCESSOR_SIGNAL_EOS_TIMES_MS)
|
+ generateString(VIDEO_FRAME_PROCESSOR_SIGNAL_EOS_TIMES_MS)
|
||||||
+ ", Encoder receive EOS: "
|
+ ", Encoder receive EOS: "
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,11 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void signalEndOfCurrentInputStream() {
|
public void signalEndOfCurrentInputStream() {
|
||||||
videoFrameProcessingTaskExecutor.submit(frameConsumptionManager::signalEndOfCurrentStream);
|
videoFrameProcessingTaskExecutor.submit(
|
||||||
|
() -> {
|
||||||
|
frameConsumptionManager.signalEndOfCurrentStream();
|
||||||
|
DebugTraceUtil.recordTexIdTextureManagerSignalEndOfCurrentInputStream();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue