Lines Matching refs:vb

1546 	struct video_buffer *vb;  in video_queue_buf()  local
1570 vb = vs->vs_buf[userbuf->index]; in video_queue_buf()
1571 driverbuf = vb->vb_buf; in video_queue_buf()
1578 video_stream_enqueue(vs, vb); in video_queue_buf()
1596 struct video_buffer *vb; in video_dequeue_buf() local
1618 vb = video_stream_dequeue(vs); in video_dequeue_buf()
1619 if (vb == NULL) { in video_dequeue_buf()
1625 while ((vb = video_stream_dequeue(vs)) == NULL) { in video_dequeue_buf()
1639 memcpy(buf, vb->vb_buf, sizeof(*buf)); in video_dequeue_buf()
1796 struct video_buffer *vb; in videoread() local
1845 vb = SIMPLEQ_FIRST(&vs->vs_egress); in videoread()
1847 vb = SIMPLEQ_FIRST(&vs->vs_egress); in videoread()
1851 if (vb->vb_buf->bytesused == 0) { in videoread()
1852 vb = video_stream_dequeue(vs); in videoread()
1853 video_stream_enqueue(vs, vb); in videoread()
1860 len = uimin(uio->uio_resid, vb->vb_buf->bytesused - vs->vs_bytesread); in videoread()
1861 offset = vb->vb_buf->m.offset + vs->vs_bytesread; in videoread()
1874 if (vs->vs_bytesread >= vb->vb_buf->bytesused) { in videoread()
1876 vb = video_stream_dequeue(vs); in videoread()
1877 video_stream_enqueue(vs, vb); in videoread()
2499 struct video_buffer *vb; in video_buffer_alloc() local
2501 vb = kmem_alloc(sizeof(*vb), KM_SLEEP); in video_buffer_alloc()
2502 vb->vb_buf = kmem_alloc(sizeof(*vb->vb_buf), KM_SLEEP); in video_buffer_alloc()
2503 return vb; in video_buffer_alloc()
2507 video_buffer_free(struct video_buffer *vb) in video_buffer_free() argument
2509 kmem_free(vb->vb_buf, sizeof(*vb->vb_buf)); in video_buffer_free()
2510 vb->vb_buf = NULL; in video_buffer_free()
2511 kmem_free(vb, sizeof(*vb)); in video_buffer_free()
2594 video_stream_enqueue(struct video_stream *vs, struct video_buffer *vb) in video_stream_enqueue() argument
2596 if (vb->vb_buf->flags & V4L2_BUF_FLAG_QUEUED) { in video_stream_enqueue()
2601 vb->vb_buf->flags |= V4L2_BUF_FLAG_QUEUED; in video_stream_enqueue()
2602 vb->vb_buf->flags &= ~V4L2_BUF_FLAG_DONE; in video_stream_enqueue()
2604 vb->vb_buf->bytesused = 0; in video_stream_enqueue()
2606 SIMPLEQ_INSERT_TAIL(&vs->vs_ingress, vb, entries); in video_stream_enqueue()
2615 struct video_buffer *vb; in video_stream_dequeue() local
2618 vb = SIMPLEQ_FIRST(&vs->vs_egress); in video_stream_dequeue()
2620 vb->vb_buf->flags &= ~V4L2_BUF_FLAG_QUEUED; in video_stream_dequeue()
2621 vb->vb_buf->flags |= V4L2_BUF_FLAG_DONE; in video_stream_dequeue()
2622 return vb; in video_stream_dequeue()
2643 struct video_buffer *vb; in video_stream_write() local
2660 vb = SIMPLEQ_FIRST(&vs->vs_ingress); in video_stream_write()
2661 buf = vb->vb_buf; in video_stream_write()
2679 vb, buf, in video_stream_write()
2698 struct video_buffer *vb; in video_stream_sample_done() local
2703 vb = SIMPLEQ_FIRST(&vs->vs_ingress); in video_stream_sample_done()
2704 vb->vb_buf->sequence = vs->vs_sequence; in video_stream_sample_done()
2707 SIMPLEQ_INSERT_TAIL(&vs->vs_egress, vb, entries); in video_stream_sample_done()