From ea6265546c3a91ad9d41abd5814df803599124ad Mon Sep 17 00:00:00 2001 From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674> Date: 星期三, 16 八月 2017 17:55:37 +0800 Subject: [PATCH] aaaaa --- RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp b/RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp index 099ff6b..226e45a 100644 --- a/RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp +++ b/RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp @@ -134,13 +134,15 @@ AMediaFormat_setBuffer(format, "csd-0", sps.sPropBytes, sps.sPropLength); // sps AMediaFormat_setBuffer(format, "csd-1", pps.sPropBytes, pps.sPropLength); // pps - - //uint8_t sps[] = {0x0,0x0,0x0,0x1, 0x67, 0x42, 0x00, 0x2A, 0x95, 0xA8, 0x1E, 0x00, 0x89, 0xF9, 0x61, 0x00, 0x00, 0x07, 0x08, 0x00, 0x01, 0x5F, 0x90, 0x04}; - //uint8_t pps[] = {0x0,0x0,0x0,0x1, 0x68, 0xCE, 0x3C, 0x80}; - //AMediaFormat_setBuffer(format, "csd-0", sps, sizeof(sps)); // sps - //AMediaFormat_setBuffer(format, "csd-1", pps, sizeof(pps)); // pps */ + // J0LgKI1oCgPaEAAAAwAQAAADAoDxB6gA,KM4ySA== + uint8_t sps[] = {0x27,0x42,0xe0,0x28,0x8d,0x68,0x0a,0x03,0xda,0x10,0x00,0x00,0x03,0x00,0x10,0x00,0x00,0x03,0x02,0x80,0xf1,0x07,0xa8,0x00}; + uint8_t pps[] = {0x28,0xce,0x32,0x48}; + AMediaFormat_setBuffer(format, "csd-0", sps, sizeof(sps)); // sps + AMediaFormat_setBuffer(format, "csd-1", pps, sizeof(pps)); // pps + + // should like: // mime: string(video/avc), durationUs: int64(10000000), width: int32(480), height: int32(360), max-input-size: int32(55067), csd-0: data, csd-1: data} const char* fmt = AMediaFormat_toString(format); -- Gitblit v1.8.0