/* Advice that buffer was filled */
dprintk(dev, V4L2_DEBUG_ISOC, "[%p/%d] wakeup\n",buf,buf->vb.i);
- buf->vb.state = STATE_DONE;
+ buf->vb.state = VIDEOBUF_DONE;
buf->vb.field_count++;
do_gettimeofday(&buf->vb.ts);
buf = list_entry(item, struct tm6000_buffer, vb.queue);
list_del(&buf->vb.queue);
- buf->vb.state = STATE_ERROR;
+ buf->vb.state = VIDEOBUF_ERROR;
wake_up(&buf->vb.done);
}
mod_timer(&dma_q->timeout, jiffies+BUFFER_TIMEOUT);
tm6000_stop_thread(dma_q);
tm6000_start_thread(dma_q, buf);
- buf->vb.state = STATE_ACTIVE;
+ buf->vb.state = VIDEOBUF_ACTIVE;
mod_timer(&dma_q->timeout, jiffies+BUFFER_TIMEOUT);
dprintk(dev, V4L2_DEBUG_QUEUE, "[%p/%d] restart_queue -"
" first active\n", buf, buf->vb.i);
prev->fmt == buf->fmt) {
list_del(&buf->vb.queue);
list_add_tail(&buf->vb.queue,&dma_q->active);
- buf->vb.state = STATE_ACTIVE;
+ buf->vb.state = VIDEOBUF_ACTIVE;
dprintk(dev, V4L2_DEBUG_QUEUE, "[%p/%d] restart_queue -"
" move to active\n",buf,buf->vb.i);
} else {
buf = list_entry(vidq->active.next, struct tm6000_buffer,
vb.queue);
list_del(&buf->vb.queue);
- buf->vb.state = STATE_ERROR;
+ buf->vb.state = VIDEOBUF_ERROR;
wake_up(&buf->vb.done);
dprintk(dev, V4L2_DEBUG_QUEUE, "tm6000/0: [%p/%d] timeout\n",
buf, buf->vb.i);
videobuf_waiton(&buf->vb,0,0);
videobuf_vmalloc_free(&buf->vb);
- buf->vb.state = STATE_NEEDS_INIT;
+ buf->vb.state = VIDEOBUF_NEEDS_INIT;
}
static int
buf->vb.width = fh->width;
buf->vb.height = fh->height;
buf->vb.field = field;
- buf->vb.state = STATE_NEEDS_INIT;
+ buf->vb.state = VIDEOBUF_NEEDS_INIT;
}
- if (STATE_NEEDS_INIT == buf->vb.state) {
+ if (VIDEOBUF_NEEDS_INIT == buf->vb.state) {
if (0 != (rc = videobuf_iolock(vq,&buf->vb,NULL)))
goto fail;
urb_init=1;
goto fail;
}
- buf->vb.state = STATE_PREPARED;
+ buf->vb.state = VIDEOBUF_PREPARED;
return 0;
fail:
if (!list_empty(&vidq->queued)) {
list_add_tail(&buf->vb.queue,&vidq->queued);
- buf->vb.state = STATE_QUEUED;
+ buf->vb.state = VIDEOBUF_QUEUED;
dprintk(dev, V4L2_DEBUG_QUEUE, "[%p/%d] buffer_queue - "
"append to queued\n", buf, buf->vb.i);
} else if (list_empty(&vidq->active)) {
list_add_tail(&buf->vb.queue,&vidq->active);
- buf->vb.state = STATE_ACTIVE;
+ buf->vb.state = VIDEOBUF_ACTIVE;
mod_timer(&vidq->timeout, jiffies+BUFFER_TIMEOUT);
dprintk(dev, V4L2_DEBUG_QUEUE, "[%p/%d] buffer_queue - "
"first active\n", buf, buf->vb.i);
prev->vb.height == buf->vb.height &&
prev->fmt == buf->fmt) {
list_add_tail(&buf->vb.queue,&vidq->active);
- buf->vb.state = STATE_ACTIVE;
+ buf->vb.state = VIDEOBUF_ACTIVE;
dprintk(dev, V4L2_DEBUG_QUEUE, "[%p/%d] buffer_queue -"
" append to active\n", buf, buf->vb.i);
} else {
list_add_tail(&buf->vb.queue,&vidq->queued);
- buf->vb.state = STATE_QUEUED;
+ buf->vb.state = VIDEOBUF_QUEUED;
dprintk(dev, V4L2_DEBUG_QUEUE, "[%p/%d] buffer_queue -"
" first queued\n", buf, buf->vb.i);
}
wait);
}
poll_wait(file, &buf->vb.done, wait);
- if (buf->vb.state == STATE_DONE ||
- buf->vb.state == STATE_ERROR)
+ if (buf->vb.state == VIDEOBUF_DONE ||
+ buf->vb.state == VIDEOBUF_ERROR)
return POLLIN|POLLRDNORM;
return 0;
}