Using RAW DATA implies capturing the camera myself and sending it to frame by frame.
Correct me if I’m wrong, but this implies that I am now responsible for managing the user camera through the Android Camera SDK and working on external OTG camera support. And this is something that the Video SDK already does.
Now my question is, is there any method in the SDK that allows me to manipulate each FRAME captured by the Video SDK before being sent?
There is a method called onPreProcessRawData(ZoomVideoSDKPreProcessRawData rawData), but I don’t understand how to manipulate raw data to change that video frame. Is this where I can manipulate the frame?
If so, the idea would be to apply ZOOM-in/out by software when cropping that frame. Similarly, I could emulate the PAN and TILT by scrolling on a fragment of that FRAME.
But, since the said method does not have a return variable, I do not understand how to manipulate this raw data to be sent later.
LET ME EXPLAIN IN ANOTHER WAY
I want to do Zonn-IN/OUT by software. For this, I use what you have sent me regarding RAW DATA.
My intention is not to reinvent the wheel and have to manipulate by my own everything related to the camera since your SDK does it, such as controlling the internal camera of the phone as the external camera or OTG.
What occurs to me is that there is a way to intercept the camera frames (handled by the SDK) before they are sent, such as in the case of the onPreProcessRawData() method.
The drawback I see is my ignorance on how to handle the ZoomVideoSDKPreProcessRawData. I don’t know if I can edit it before it travels to other users.
Also, I see that onRawDataFrameReceived receives ZoomVideoSDKVideoRawData as a parameter. A completely different object than onPreProcessRawData().
So I ask: do I have a way to pre-process the FRAMES before sending them?
If the answer is negative, is there an example or SNIPPET that can help me understand how to manipulate the android camera (for example CameraX) and send the frame in the RAW DATA of the SDK?
Information on how to send raw video data can be found in our documentation. The Video SDK does not provide the ability to add any effects to video frames, so you would need to implement this yourself before passing the frames into the SDK.