Debug
Signed-off-by: Vasiliy Doylov <nekocwd@mainlining.org>
This commit is contained in:
parent
8fbd5b04e5
commit
f9e9e62cc7
4 changed files with 12 additions and 3 deletions
|
@ -39,9 +39,8 @@ gst_libcamera_pool_pop_buffer(GstLibcameraPool *self)
|
||||||
GLibLocker lock(GST_OBJECT(self));
|
GLibLocker lock(GST_OBJECT(self));
|
||||||
GstBuffer *buf;
|
GstBuffer *buf;
|
||||||
|
|
||||||
if (self->queue->empty())
|
if (self->queue->empty() || self->queue->size() == 0)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
buf = self->queue->front();
|
buf = self->queue->front();
|
||||||
self->queue->pop_front();
|
self->queue->pop_front();
|
||||||
|
|
||||||
|
|
|
@ -342,7 +342,7 @@ int GstLibcameraSrcState::processRequest()
|
||||||
{
|
{
|
||||||
GLibLocker locker(&lock_);
|
GLibLocker locker(&lock_);
|
||||||
|
|
||||||
if (!completedRequests_.empty()) {
|
if (!completedRequests_.empty() && completedRequests_.size() != 0) {
|
||||||
wrap = std::move(completedRequests_.front());
|
wrap = std::move(completedRequests_.front());
|
||||||
completedRequests_.pop();
|
completedRequests_.pop();
|
||||||
}
|
}
|
||||||
|
|
|
@ -284,6 +284,8 @@ public:
|
||||||
|
|
||||||
unsigned int streamIndex(const Stream *stream) const
|
unsigned int streamIndex(const Stream *stream) const
|
||||||
{
|
{
|
||||||
|
if(streams_.empty())
|
||||||
|
return 0;
|
||||||
return stream - &streams_.front();
|
return stream - &streams_.front();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -407,6 +407,10 @@ void SoftwareIsp::statsReady(uint32_t frame, uint32_t bufferId)
|
||||||
|
|
||||||
void SoftwareIsp::inputReady(FrameBuffer *input)
|
void SoftwareIsp::inputReady(FrameBuffer *input)
|
||||||
{
|
{
|
||||||
|
if(queuedInputBuffers_.empty()){
|
||||||
|
LOG(SoftwareIsp, Error) << "Lol, it's empty (input)";
|
||||||
|
return;
|
||||||
|
}
|
||||||
ASSERT(queuedInputBuffers_.front() == input);
|
ASSERT(queuedInputBuffers_.front() == input);
|
||||||
queuedInputBuffers_.pop_front();
|
queuedInputBuffers_.pop_front();
|
||||||
inputBufferReady.emit(input);
|
inputBufferReady.emit(input);
|
||||||
|
@ -414,6 +418,10 @@ void SoftwareIsp::inputReady(FrameBuffer *input)
|
||||||
|
|
||||||
void SoftwareIsp::outputReady(FrameBuffer *output)
|
void SoftwareIsp::outputReady(FrameBuffer *output)
|
||||||
{
|
{
|
||||||
|
if(queuedOutputBuffers_.empty()){
|
||||||
|
LOG(SoftwareIsp, Error) << "Lol, it's empty (output)";
|
||||||
|
return;
|
||||||
|
}
|
||||||
ASSERT(queuedOutputBuffers_.front() == output);
|
ASSERT(queuedOutputBuffers_.front() == output);
|
||||||
queuedOutputBuffers_.pop_front();
|
queuedOutputBuffers_.pop_front();
|
||||||
outputBufferReady.emit(output);
|
outputBufferReady.emit(output);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue