Repository navigation
feat: Implement low-latency MediaCodec H.264 hardware video decoder - #4
Conversation
- Implement H264Decoder using MediaCodec synchronous API compliant with KitKat (API 19). - Run dedicated rendering/draining thread polling dequeueOutputBuffer and rendering directly to Surface. - Handle SPS/PPS flags (BUFFER_FLAG_CODEC_CONFIG) and dynamic format changes (INFO_OUTPUT_FORMAT_CHANGED). - Connect LibreCastServer binary video stream chunks via ReceiverService directly to H264Decoder. - Add SurfaceView in activity_main.xml and implement SurfaceHolder.Callback in MainActivity to start/stop decoder. - Auto-hide status overlay on first video frame rendered. - Add unit tests for H264Decoder state management. Co-authored-by: ClausValcaTD <193546948+ClausValcaTD@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Implement an ultra-low-latency H.264 (video/avc) hardware decoder pipeline using Android's native MediaCodec synchronous API (minSdk 19 / KitKat compliant).
Key changes:
H264Decoder.javamanagingMediaCodec.createDecoderByType("video/avc")with synchronous API (dequeueInputBuffer/dequeueOutputBufferwithgetInputBuffers()/getOutputBuffers()).H264Decoderrendering directly toSurfaceviareleaseOutputBuffer(index, true)with minimal buffering to eliminate queue bloat.BUFFER_FLAG_CODEC_CONFIG) and dynamic format updates (INFO_OUTPUT_FORMAT_CHANGED).LibreCastServer.onMessageviaReceiverServicetoMainActivity/H264Decoder.feedFrame().SurfaceViewinactivity_main.xmland implementedSurfaceHolder.CallbackinMainActivity.javafor clean lifecycle management.H264DecoderTest.java.PR created automatically by Jules for task 9026275089647310302 started by @ClausValcaTD