aaaaa
git-svn-id: http://192.168.1.226/svn/proxy@1023 454eff88-639b-444f-9e54-f578c98de674
| | |
| | | #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; |
| | |
| | | return ret; |
| | | } |
| | | |
| | | // the caller is responsible for delete[]ing. |
| | | char* base64_encode(char const* orig, size_t origLength) |
| | | { |
| | | unsigned _origLength = origLength; |
| | |
| | | if (pm.buffer == nullptr)
|
| | | return false;
|
| | |
|
| | | #ifdef 0
|
| | | if (!in->auxIsSet)
|
| | | {
|
| | | //#todo
|
| | |
| | |
|
| | | in->auxIsSet = true;
|
| | | }
|
| | |
|
| | | }
|
| | | #endif
|
| | |
|
| | | MB_Frame* frame = (MB_Frame*)pm.buffer;
|
| | | if (frame->type != MB_Frame::MBFT_H264_NALU)
|
| | |
| | |
|
| | | 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);
|
| | |
| | | _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;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | //#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);
|