| | |
| | | }
|
| | | }
|
| | |
|
| | | int ret = pthread_mutex_lock(_this->in->queue_empty_mutex);
|
| | | if (ret != 0)
|
| | | {
|
| | | LOG_WARN << "pthread_mutex_lock queue_empty_mutex, ret=" << ret << std::endl;
|
| | | }
|
| | |
|
| | | ScopeLocker<pthread_mutex_t>(_this->in->queue_mutex);
|
| | |
|
| | | if (_this->lastBuffer != nullptr)
|
| | |
| | | buffer = _this->lastBuffer->buffer;
|
| | | buffSize = _this->lastBuffer->buffSize;
|
| | |
|
| | | LOG_INFO << "DeliverFrameCallback buffSize=" << buffSize << LOG_ENDL;
|
| | | //LOG_INFO << "DeliverFrameCallback buffSize=" << buffSize << LOG_ENDL;
|
| | | //static size_t f = 0;
|
| | | //static FILE *pFile = fopen("/data/bb.264", "wb");
|
| | | //fwrite(buffer, sizeof(char), buffSize, pFile);
|
| | |
| | | bool PL_RTSPServer2::init(void* args)
|
| | | {
|
| | | RTSPServer2_Internal* in = (RTSPServer2_Internal*)internal;
|
| | | in->reset();
|
| | |
|
| | | if (args)
|
| | | {
|
| | |
| | | int ret = pthread_mutex_unlock(in->queue_empty_mutex);
|
| | | if (ret != 0)
|
| | | {
|
| | | //LOG_WARN << "pthread_mutex_unlock queue_empty_mutex, ret=" << ret << std::endl;
|
| | | LOG_WARN << "pthread_mutex_unlock queue_empty_mutex, ret=" << ret << std::endl;
|
| | | }
|
| | | return true;
|
| | | }
|