aaaaa
git-svn-id: http://192.168.1.226/svn/proxy@1021 454eff88-639b-444f-9e54-f578c98de674
| | |
| | |
|
| | | 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)
|
| | | {
|
| | | }
|
| | |
|
| | |
| | |
|
| | | 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)
|
| | | {
|
| | |
| | | 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())
|
| | |
| | |
|
| | | //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);
|