Closed
Labels
Description
Follow-up to #119 / #131. The first step decodes MJPEG with BitmapFactory on the decode thread and draws it with lockCanvas() — works on every device, fine for 1280×720 at 5 fps (.133 /stream=2).
For higher resolutions / frame rates and for multi-view, use the hardware JPEG decoder when the device has one:
- Probe
MediaCodecListfor a decoder ofvideo/jpeg(the AG-216 listsOMX.allwinner.video.decoder.mjpeg; other vendors usevideo/mjpegor none). - Feed whole JPEG frames from
JpegAssembleras input buffers, output to the surface like H.264/H.265 (nolockCanvas(), so no surface swap when the codec changes). - Fall back to the bitmap path when no decoder exists or configuration fails.
- Then MJPEG cells in multi-view (today they are paused with
MJPEG: single view only), with frame skipping as the cheap mode instead of key frames (Multi-view: adaptive decoding — full rate or key frames per cell, learnt device capacity #85).
Activity
fix: look for the JPEG decoder in ALL_CODECS and log the video decode…
fix: try the AG-216's JPEG decoder by name when the codec list leaves…
Merge pull request #135 from OpenIPC/feat/mjpeg-hw
compot-dev commentedon Oct 13, 2026
Single view done in #135 (hardware
video/jpegdecoder where the platform exposes one, software otherwise). On the AG-216 the platform does not expose its JPEG decoder (declared in the vendor XML, creating it by name fails with0xfffffffe), so it uses the software path. Left here: MJPEG cells in multi-view.Merge pull request #139 from OpenIPC/feat/mjpeg-multiview
compot-dev commentedon Oct 13, 2026
Done: hardware MJPEG through MediaCodec where the device exposes a JPEG decoder (#135), and MJPEG cells in multi-view (#139, ea5c093) with the same hardware-then-software choice per stream. On the AG-216 the vendor JPEG decoder cannot be created (
0xfffffffe), so it runs on the software path there.feat: MJPEG through the device's hardware JPEG decoder (MediaCodec vi…
fix: look for the JPEG decoder in ALL_CODECS and log the video decode…
fix: try the AG-216's JPEG decoder by name when the codec list leaves…
Merge pull request #135 from OpenIPC/feat/mjpeg-hw
feat: MJPEG cells in multi-view, one frame per second in the cheap mo…
Merge pull request #139 from OpenIPC/feat/mjpeg-multiview