houxiao
2017-08-17 6faf88ba05f174a80c68f01c0412cae9789dbc8c
aaaaa

git-svn-id: http://192.168.1.226/svn/proxy@1023 454eff88-639b-444f-9e54-f578c98de674
4个文件已修改
22 ■■■■ 已修改文件
RtspFace/MediaHelper.cpp 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/PL_AndroidMediaCodecEncoder.cpp 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/PL_RTSPServer2.cpp 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/MediaHelper.cpp
@@ -3,6 +3,7 @@
#include <liveMedia/liveMedia.hh>
#include <liveMedia/Base64.hh>
// the caller is responsible for delete[]ing.
uint8_t* base64_decode(char const* in, size_t inSize, size_t& resultSize, bool trimTrailingZeros)
{
    unsigned _resultSize = resultSize;
@@ -12,6 +13,7 @@
    return ret;
}
// the caller is responsible for delete[]ing.
char* base64_encode(char const* orig, size_t origLength)
{
    unsigned _origLength = origLength;
RtspFace/PL_AndroidMediaCodecDecoder_ndk.cpp
@@ -200,6 +200,7 @@
    if (pm.buffer == nullptr)
        return false;
#ifdef 0
    if (!in->auxIsSet)
    {
        //#todo
@@ -225,8 +226,8 @@
            in->auxIsSet = true;
        }
    }
#endif
    MB_Frame* frame = (MB_Frame*)pm.buffer;
    if (frame->type != MB_Frame::MBFT_H264_NALU)
RtspFace/PL_AndroidMediaCodecEncoder.cpp
@@ -271,8 +271,12 @@
        if (spsSize != 0)
        {
            std::string spsStr = base64_encode(((const char*)sps) + 4, spsSize - 4);//#todo aux
            std::string ppsStr = base64_encode(((const char*)pps) + 4, ppsSize - 4);
            char* tmp = nullptr;
            std::string spsStr = tmp = base64_encode(((const char*)sps) + 4, spsSize - 4);//#todo aux
            delete[] tmp;
            std::string ppsStr = tmp = base64_encode(((const char*)pps) + 4, ppsSize - 4);
            delete[] tmp;
            tmp = nullptr;
            this->manager->set_param(PLGP_ENC_SPS_B64, spsStr);
            this->manager->set_param(PLGP_ENC_PPS_B64, ppsStr);
RtspFace/PL_RTSPServer2.cpp
@@ -160,6 +160,11 @@
            _this->lastBuffer = nullptr;
        }
        //#todo
        //find frameQueue->Seek is pps/sps
        // if not: send bufferred pps , return;
        _this->lastBuffer = _this->in->frameQueue->Dequeue();
        if (_this->lastBuffer == nullptr)
            return false;
@@ -281,6 +286,10 @@
        }
    }
//#todo
    // find if is pps/sps
    // buffer the frame into RTSPServer2_Internal
    while (in->config.payBlockFullQueue && in->frameQueue->Full())
    {
        int ret = pthread_mutex_lock(in->queue_full_mutex);