From 5ce6085328a841e270c7ce1ddfdd36efabf0b095 Mon Sep 17 00:00:00 2001 From: xingzilong <xingzilong@454eff88-639b-444f-9e54-f578c98de674> Date: 星期四, 17 八月 2017 11:46:03 +0800 Subject: [PATCH] h264裸数据读取 --- RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp b/RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp index 226e45a..fa689f0 100644 --- a/RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp +++ b/RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp @@ -202,6 +202,10 @@ return false; } + static FILE *pFile = fopen("/data/bb.264", "wb"); + fwrite(frame->buffer, sizeof(char), frame->buffSize, pFile); + fflush(pFile); + ssize_t bufidx = AMediaCodec_dequeueInputBuffer(in->codec, 2000); LOGP(DEBUG, "input buffer bufidx=%zd, inputFrameCount=%d", bufidx, in->inputFrameCount++); -- Gitblit v1.8.0