Lines Matching refs:buf
255 int BufferHubQueue::AddBuffer(const std::shared_ptr<BufferHubBuffer>& buf,
274 const int ret = epoll_fd_.Control(EPOLL_CTL_ADD, buf->event_fd(), &event);
281 buffers_[slot] = buf;
287 auto& buf = buffers_[slot];
288 if (buf == nullptr) {
293 const int ret = epoll_fd_.Control(EPOLL_CTL_DEL, buf->event_fd(), nullptr);
307 void BufferHubQueue::Enqueue(const std::shared_ptr<BufferHubBuffer>& buf,
319 buffer_info.buffer = buf;
333 std::shared_ptr<BufferHubBuffer> buf;
341 std::swap(buffer_info.buffer, buf);
347 if (!buf) {
357 return {std::move(buf)};
432 int ProducerQueue::AddBuffer(const std::shared_ptr<BufferProducer>& buf,
435 id(), buf->id(), slot);
438 const int ret = BufferHubQueue::AddBuffer(buf, slot);
442 Enqueue(buf, slot);
474 int ProducerQueue::OnBufferReady(const std::shared_ptr<BufferHubBuffer>& buf,
477 id(), buf->id());
478 auto buffer = std::static_pointer_cast<BufferProducer>(buf);
554 int ConsumerQueue::AddBuffer(const std::shared_ptr<BufferConsumer>& buf,
557 id(), buf->id(), slot);
558 const int ret = BufferHubQueue::AddBuffer(buf, slot);
567 pollfd pfd{buf->event_fd(), POLLIN, 0};
609 int ConsumerQueue::OnBufferReady(const std::shared_ptr<BufferHubBuffer>& buf,
612 id(), buf->id());
613 auto buffer = std::static_pointer_cast<BufferConsumer>(buf);