Click here to Skip to main content
14,269,316 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi All,

I have a SurfaceView in android app that displays a video from a camera connected to a phone via bluetooth.
I would like to be able to horizontally mirror/flip the video after decoding it. By mirroring I mean for instance, If there's a chair showing on the left i would like to show it on the right of the screen, this is mirroring.
I know for a fact SurfaceView inherits View so I tried setScaleX(-1) with no luck

Any help will be much appreciated
Thanks in advance

What I have tried:

in iOS I have achieved this by the following sample code:
AVSampleBufferDisplayLayer.transform = CATransform3DMakeScale(-1.0, 1.0, 1.0);

I was hoping that android has something similar but SurfaceView doesn't have transform property. I have tried:
Updated 31-May-19 9:21am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100