簡而言之,我需要做的就是在Android中顯示實時視頻幀流(每幀爲YUV420格式)。我有一個回調函數,我接收單個幀作爲字節數組。看起來像這樣的東西: public void onFrameReceived(byte[] frame, int height, int width, int format) {
// display this frame to surfaceview/tex
我正在嘗試獲取相機的全屏預覽。我讀了camera2的文檔,其中說Each Surface has to be pre-configured with an appropriate size and format (if applicable) to match the sizes and formats available from the camera device.到目前爲止,這是我所瞭解的。