Skip to content

ZoomLayout can not add SurfaceView or SurfaceViewRenderer of WebRTC? #240

@fluolite

Description

@fluolite

Describe the bug

Please add a clear description of what the bug is, and fill the list below.

  • Library version: 1.9.0
  • Reproducible in official demo app: NO
  • Device / Android version: Android15

To Reproduce

Steps to reproduce the behavior, possibly in the demo app:

        ZoomSurfaceView zoomLayout = new ZoomSurfaceView(context);
        zoomLayout.setLayoutParams(new FrameLayout.LayoutParams(
                FrameLayout.LayoutParams.MATCH_PARENT,
                FrameLayout.LayoutParams.MATCH_PARENT
        ));
        zoomLayout.setMinZoom(1.0f);
        zoomLayout.setMaxZoom(3.0f);
        zoomLayout.setZoomEnabled(true);
        zoomLayout.setHorizontalPanEnabled(true);
        zoomLayout.setVerticalPanEnabled(true);
        zoomLayout.setScrollEnabled(true);
        zoomLayout.setOneFingerScrollEnabled(true);
        zoomLayout.setTwoFingersScrollEnabled(true);
        zoomLayout.setBackgroundColor(Color.RED);
        zoomLayout.addView(remote_video_renderer);

Logs

If applicable, please add logs to help diagnose the problem.
Use ZoomLogger.setLogLevel(LEVEL_INFO) to stream all logs into LogCat.

Dimensions alignedw: 16777216 alignedh: 16777216 will result in overflow
2025-08-29 16:55:47.857 31816-1459  GraphicBufferAllocator  com.iot.uniplugin                    E  Failed to allocate (16777215 x 16777215) layerCount 1 format 2 usage 10000900: 3
2025-08-29 16:55:47.857 31816-1459  BufferQueueProducer     com.iot.uniplugin                    E  [SurfaceView[com.iot.uniplugin/io.dcloud.PandoraEntryActivity]#3(BLAST Consumer)3](id:7c4800000003,api:1,p:31816,c:31816) dequeueBuffer: createGraphicBuffer failed
2025-08-29 16:55:47.857 31816-1459  BufferQueueProducer     com.iot.uniplugin                    E  [SurfaceView[com.iot.uniplugin/io.dcloud.PandoraEntryActivity]#3(BLAST Consumer)3](id:7c4800000003,api:1,p:31816,c:31816) requestBuffer: slot 0 is not owned by the producer (state = FREE)
2025-08-29 16:55:47.857 31816-1459  Surface                 com.iot.uniplugin                    E  dequeueBuffer: IGraphicBufferProducer::requestBuffer failed: -22
2025-08-29 16:55:47.857 31816-1459  BufferQueueProducer     com.iot.uniplugin                    E  [SurfaceView[com.iot.uniplugin/io.dcloud.PandoraEntryActivity]#3(BLAST Consumer)3](id:7c4800000003,api:1,p:31816,c:31816) cancelBuffer: slot 0 is not owned by the producer (state = FREE)

APK

Link to a Github repo where the bug is reproducible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions