Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

xamarin - Video stream in SurfaceViewRenderer with transparency

I am working on an issue that uses WebRTC technology. The app is written in Xamarin Android. For video output I am using org.webrtc.SurfaceViewRenderer. The problem is that I need to display another video stream on top of one SurfaceViewRenderer video stream (capture comes from the phone's camera), in which, for example, something will be drawn or the picture will change in real time (drawing with a brush), so that the user on the device can see both video streams at once, the one that is the main one and the one that is superimposed on top.

It may not be the right solution, but I tried placing both SurfaceViewRenderer on top of each other, both stretched to full screen. Capturing video comes from a transparent window on which to draw. During playback, the upper SurfaceViewRenderer completely overlaps the lower one and is not visible, since in addition to the drawn one, a black background appears in the video. I believe that this black background in the video does not allow you to see what is located under the SurfaceViewRenderer. I tried setting transparency but it didn't help.

Maybe someone came across a similar problem, how can you make a transparent video stream in SurfaceViewRenderer?

question from:https://stackoverflow.com/questions/65904962/video-stream-in-surfaceviewrenderer-with-transparency

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...