camera2MediaCodecVideo-Buffer

I am trying to extract the buffer data of a video while its recording, and I want to store that into an array. This is a app that tries to achieve that using MediaCodec and Native C++