version 1.27, 2011/08/13 02:49:06 |
version 1.27.2.2, 2013/01/23 00:06:04 |
Line 1604 videoopen(dev_t dev, int flags, int ifmt |
|
Line 1604 videoopen(dev_t dev, int flags, int ifmt |
|
|
|
sc = device_private(device_lookup(&video_cd, VIDEOUNIT(dev))); |
sc = device_private(device_lookup(&video_cd, VIDEOUNIT(dev))); |
if (sc == NULL) { |
if (sc == NULL) { |
DPRINTF(("videoopen: failed to get softc\n")); |
DPRINTF(("videoopen: failed to get softc for unit %d\n", |
|
VIDEOUNIT(dev))); |
return ENXIO; |
return ENXIO; |
} |
} |
|
|
Line 2506 video_stream_dequeue(struct video_stream |
|
Line 2507 video_stream_dequeue(struct video_stream |
|
} |
} |
} |
} |
|
|
|
static void |
|
v4l2buf_set_timestamp(struct v4l2_buffer *buf) |
|
{ |
|
|
|
getmicrotime(&buf->timestamp); |
|
} |
|
|
/* |
/* |
* write payload data to the appropriate video sample, possibly moving |
* write payload data to the appropriate video sample, possibly moving |
Line 2534 video_stream_write(struct video_stream * |
|
Line 2541 video_stream_write(struct video_stream * |
|
} else if (payload->size > 0) { |
} else if (payload->size > 0) { |
vb = SIMPLEQ_FIRST(&vs->vs_ingress); |
vb = SIMPLEQ_FIRST(&vs->vs_ingress); |
buf = vb->vb_buf; |
buf = vb->vb_buf; |
|
if (!buf->bytesused) |
|
v4l2buf_set_timestamp(buf); |
if (payload->size > buf->length - buf->bytesused) { |
if (payload->size > buf->length - buf->bytesused) { |
DPRINTF(("video_stream_write: " |
DPRINTF(("video_stream_write: " |
"payload would overflow\n")); |
"payload would overflow\n")); |