Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).

WoogeenSurfaceRenderer Circular Shape

Germán_C_
Beginner
567 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
567 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 :)

0 Kudos
Germán_C_
Beginner
567 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.

0 Kudos
Yolanda_C_
Beginner
567 Views

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

0 Kudos
He_Z_Intel
Employee
567 Views

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

 

0 Kudos
Yolanda_C_
Beginner
567 Views

He, I'm using version 3.2.1.

0 Kudos
Germán_C_
Beginner
567 Views

Hey, v3.3 here.

0 Kudos
Yolanda_C_
Beginner
567 Views

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

0 Kudos
He_Z_Intel
Employee
567 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 !

0 Kudos
Reply