houxiao
2017-08-17 51147a836955ed6ff7c111bbce89e244f0c3f27f
aaaaa

git-svn-id: http://192.168.1.226/svn/proxy@1021 454eff88-639b-444f-9e54-f578c98de674
3个文件已修改
31 ■■■■■ 已修改文件
RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/PL_RTSPClient.cpp 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/PL_RTSPServer2.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp
@@ -38,12 +38,15 @@
    AMediaCodec* codec;
    bool auxIsSet;
    PL_AMCD_Internal() : 
        buffSize(0), buffSizeMax(sizeof(buffer)), 
        inputFrameCount(0), lastOutputBuffIdx(-1), 
        lastMbfBuffIdx(), lastMbfBuffer(),
        config(), 
        codec(nullptr)
        codec(nullptr),
        auxIsSet(false)
    {
    }
    
@@ -193,7 +196,21 @@
    
    if (pm.buffer == nullptr)
        return false;
    if (!in->auxIsSet)
    {
        //#todo
        // find PLGP_DEC_SPS_B64 PLGP_DEC_PPS_B64 in this->manager else nothing
        // base64 decode
        //AMediaFormat* format = AMediaCodec_getOutputFormat(in->codec);
        //AMediaFormat_setBuffer(format, "csd-1", pps, sizeof(pps)); // pps
        //AMediaCodec_setParameters
        // #todo delete format
        in->auxIsSet = true;
    }
    MB_Frame* frame = (MB_Frame*)pm.buffer;
    if (frame->type != MB_Frame::MBFT_H264_NALU)
    {
RtspFace/PL_RTSPClient.cpp
@@ -249,6 +249,13 @@
    sprintf(tmp, "%u", param.height); client->manager->set_param(PLGP_RTSP_HEIGHT, std::string(tmp));
    sprintf(tmp, "%u", param.fps); client->manager->set_param(PLGP_RTSP_FPS, std::string(tmp));
    if (param.fmtp.find_first_of(',') != std::string::npos)
    {
        //#todo
        // split fmpt to base64 of sps,pps
        // set to PLGP_DEC_SPS_B64 PLGP_DEC_PPS_B64
    }
    /*
    std::string fmtp(client->manager->get_param(PLGP_RTSP_FMTP));
    if (fmtp.empty())
RtspFace/PL_RTSPServer2.cpp
@@ -326,7 +326,8 @@
    //static size_t f = 0;
    //static FILE *pFile = fopen("/data/aa.264", "wb");
    //fwrite(qbuff->buffer, sizeof(char), frame->buffSize, pFile);
    //fwrite(qbuff->buffer, sizeof(char), qbuff->buffSize, pFile);
    //fflush(pFile);
    //if (++f > 400){
    //    fclose(pFile);
    //    exit(0);