twilio/video-quickstart-android

How to get webRtcVideoFrame value from VideoFrame class?

Closed this issue · 2 comments

Hello Twilio Team

How to get webRtcVideoFrame raw data from the VideoFrame class? Or Is there another way to do that?
This question was already discussed and solved using reflection API's but I don't think it is possible to access the data using reflection API's because,

In VideFrame image data is stored in a variable type : private final VideoFrame.Buffer buffer;
Here VideoFrame.Buffer is an interface(with no memeber variables),
In this, I don't think it is possible to access the data using Reflection API's,

Do you still think we can get the data from VideoFrame? If so please comment here about the process to do so.....

@vanamala The raw webrtc frame data can be acquired by calling getbuffer() on the VideoFrame object. Then calling toI4209() on that buffer to get a raw yuv-4:2:0 buffer. Just remember to release the buffer when you are done with release().

Closing due to lack of customer response