Dispaly data from getOutputBuffers to ANativeWindow

180 Views Asked by At

Im trying to display the decoded data manually to a native window. But I cant seem to display it. I dont have any idea. Our project will be ndk and more native codes.

Your thoughts are very much appreciated.

uint8_t* decoded = AMediaCodec_getOutputBuffer(d->codec, status, out);
err = ANativeWindow_lock(mWindow, &buffer, NULL);
if(err == 0) {
   memcpy(buffer->bits, decoded, sizeof(decoded));
   ANativeWindow_unlockAndPost(mWindow);
}
0

There are 0 best solutions below