Implement PUSH_BLANK_BUFFERS_ON_STOP in Codec2
PUSH_BLANK_BUFFERS_ON_STOP is a MediaCodec feature that instructs a
codec to display a blank frame at end of playback on codecs configured
with an output surface.
The feature has existed for a while and been implemented for OMX-based
codecs, but it was missing from the newer Codec2-based codecs.
Test: atest DecoderPushBlankBuffersOnStopTest#testPushBlankBuffersOnStopAvc
Bug: 210587592
Change-Id: I3ec3117e991224134cb6cb6b6a601e063e96be26
diff --git a/media/codec2/sfplugin/CCodecBufferChannel.h b/media/codec2/sfplugin/CCodecBufferChannel.h
index 26eef30..b3a5f4b 100644
--- a/media/codec2/sfplugin/CCodecBufferChannel.h
+++ b/media/codec2/sfplugin/CCodecBufferChannel.h
@@ -181,6 +181,11 @@
void setMetaMode(MetaMode mode);
+ /**
+ * Push a blank buffer to the configured native output surface.
+ */
+ status_t pushBlankBufferToOutputSurface();
+
private:
class QueueGuard;