Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

WoogeenSurfaceRenderer Circular Shape

Germán_C_
Beginner
128 Views

Hi,

I'm trying to shape my stream preview as a circle but after a few seconds it goes square again.
Here you can see the issue: 
https://www.youtube.com/watch?v=8WnFywDCZrI

 

As a renderer I'm extending WoogenSurfaceRenderer and shaping it as a circle:

public class CircularSurfaceRenderer extends WoogeenSurfaceRenderer {
    private float x;
    private float y;

    public CircularSurfaceRenderer(Context context, float x, float y) {
        super(context);
        this.x = x;
        this.y = y;
    }

    public CircularSurfaceRenderer(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected void dispatchDraw(Canvas canvas) {
        Path path = new Path();
        int count = canvas.save();

        path.addCircle(x, y, 100, Path.Direction.CW);

        canvas.clipPath(path);
        super.dispatchDraw(canvas);
        canvas.restoreToCount(count);
    }

 

 

0 Kudos
8 Replies
He_Z_Intel
Employee
128 Views

Hi Germán, i had a quick try with your code and didn't reproduce the issue.

maybe you could try to track which method(s) will be triggered in WoogeenSurfaceRenderer when the circle becomes a square,

i'll appreciate it if let me know your result :)

Germán_C_
Beginner
128 Views

Hi, 

I debugged and it seems to become square-shaped after one renderFrame execution, but I can't tell exactly after which event because after a few hours of debugging I couldn't find any consistent flow.

Did remain circle shaped for you? Maybe we are using a different WoogenSurfaceRenderer class version?

Thanks again,

German.

Yolanda_C_
Beginner
128 Views

I'm experiencing the same, but only when rendering YUV textures. For OES textures seems to work fine.

He_Z_Intel
Employee
128 Views

Germán and Yolanda, which version(s) of Woogeen SDK did you use?

 

Yolanda_C_
Beginner
128 Views

He, I'm using version 3.2.1.

Germán_C_
Beginner
128 Views

Hey, v3.3 here.

Yolanda_C_
Beginner
128 Views

I fixed this by replacing the SurfaceViews with TextureViews and clipping the canvas of the TextureView's parent.

He_Z_Intel
Employee
128 Views

Yolanda C. wrote:

I fixed this by replacing the SurfaceViews with TextureViews and clipping the canvas of the TextureView's parent.

 

Awesome! Glad to hear it. Thanks Yolanda for sharing this to us all !

Reply