linux-4.4.1/uvc_register_video()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#s9674da0]
#backlinks
*説明 [#p4ea68e4]
-パス: [[linux-4.4.1/drivers/media/usb/uvc/uvc_driver.c]]
-FIXME: これは何?
--説明
**引数 [#i0692913]
-struct uvc_device *dev
--
--[[linux-4.4.1/uvc_device]]
-struct uvc_streaming *stream
--
--[[linux-4.4.1/uvc_streaming]]
**返り値 [#l861db66]
-int
--
**参考 [#i2d099e5]
*実装 [#g5434178]
static int uvc_register_video(struct uvc_device *dev,
struct uvc_streaming *stream)
{
struct video_device *vdev = &stream->vdev;
int ret;
-
--[[linux-4.4.1/video_device]]
/* Initialize the video buffers queue. */
ret = uvc_queue_init(&stream->queue, stream->typ...
if (ret)
return ret;
-
--[[linux-4.4.1/uvc_queue_init()]]
/* Initialize the streaming interface with defau...
* parameters.
*/
ret = uvc_video_init(stream);
if (ret < 0) {
uvc_printk(KERN_ERR, "Failed to initiali...
"(%d).\n", ret);
return ret;
}
-
--[[linux-4.4.1/uvc_video_init()]]
uvc_debugfs_init_stream(stream);
-
--[[linux-4.4.1/uvc_debugfs_init_stream()]]
/* Register the device with V4L. */
/* We already hold a reference to dev->udev. The...
* unregistered before the reference is released...
* get another one.
*/
vdev->v4l2_dev = &dev->vdev;
vdev->fops = &uvc_fops;
vdev->ioctl_ops = &uvc_ioctl_ops;
vdev->release = uvc_release;
vdev->prio = &stream->chain->prio;
if (stream->type == V4L2_BUF_TYPE_VIDEO_OUTPUT)
vdev->vfl_dir = VFL_DIR_TX;
strlcpy(vdev->name, dev->name, sizeof vdev->name);
-
--[[linux-4.4.1/uvc_fops(global)]]
--[[linux-4.4.1/uvc_ioctl_ops(global)]]
--[[linux-4.4.1/uvc_release()]]
--[[linux-4.4.1/strlcpy()]]
/* Set the driver data before calling video_regi...
* uvc_v4l2_open might race us.
*/
video_set_drvdata(vdev, stream);
-
--[[linux-4.4.1/video_set_drvdata()]]
ret = video_register_device(vdev, VFL_TYPE_GRABB...
if (ret < 0) {
uvc_printk(KERN_ERR, "Failed to register...
ret);
return ret;
}
-
--[[linux-4.4.1/video_register_device()]]
--[[linux-4.4.1/uvc_printk()]]
if (stream->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
stream->chain->caps |= V4L2_CAP_VIDEO_CA...
else
stream->chain->caps |= V4L2_CAP_VIDEO_OU...
atomic_inc(&dev->nstreams);
-
--[[linux-4.4.1/atomic_inc()]]
return 0;
}
*コメント [#l3dfc099]
終了行:
*参照元 [#s9674da0]
#backlinks
*説明 [#p4ea68e4]
-パス: [[linux-4.4.1/drivers/media/usb/uvc/uvc_driver.c]]
-FIXME: これは何?
--説明
**引数 [#i0692913]
-struct uvc_device *dev
--
--[[linux-4.4.1/uvc_device]]
-struct uvc_streaming *stream
--
--[[linux-4.4.1/uvc_streaming]]
**返り値 [#l861db66]
-int
--
**参考 [#i2d099e5]
*実装 [#g5434178]
static int uvc_register_video(struct uvc_device *dev,
struct uvc_streaming *stream)
{
struct video_device *vdev = &stream->vdev;
int ret;
-
--[[linux-4.4.1/video_device]]
/* Initialize the video buffers queue. */
ret = uvc_queue_init(&stream->queue, stream->typ...
if (ret)
return ret;
-
--[[linux-4.4.1/uvc_queue_init()]]
/* Initialize the streaming interface with defau...
* parameters.
*/
ret = uvc_video_init(stream);
if (ret < 0) {
uvc_printk(KERN_ERR, "Failed to initiali...
"(%d).\n", ret);
return ret;
}
-
--[[linux-4.4.1/uvc_video_init()]]
uvc_debugfs_init_stream(stream);
-
--[[linux-4.4.1/uvc_debugfs_init_stream()]]
/* Register the device with V4L. */
/* We already hold a reference to dev->udev. The...
* unregistered before the reference is released...
* get another one.
*/
vdev->v4l2_dev = &dev->vdev;
vdev->fops = &uvc_fops;
vdev->ioctl_ops = &uvc_ioctl_ops;
vdev->release = uvc_release;
vdev->prio = &stream->chain->prio;
if (stream->type == V4L2_BUF_TYPE_VIDEO_OUTPUT)
vdev->vfl_dir = VFL_DIR_TX;
strlcpy(vdev->name, dev->name, sizeof vdev->name);
-
--[[linux-4.4.1/uvc_fops(global)]]
--[[linux-4.4.1/uvc_ioctl_ops(global)]]
--[[linux-4.4.1/uvc_release()]]
--[[linux-4.4.1/strlcpy()]]
/* Set the driver data before calling video_regi...
* uvc_v4l2_open might race us.
*/
video_set_drvdata(vdev, stream);
-
--[[linux-4.4.1/video_set_drvdata()]]
ret = video_register_device(vdev, VFL_TYPE_GRABB...
if (ret < 0) {
uvc_printk(KERN_ERR, "Failed to register...
ret);
return ret;
}
-
--[[linux-4.4.1/video_register_device()]]
--[[linux-4.4.1/uvc_printk()]]
if (stream->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
stream->chain->caps |= V4L2_CAP_VIDEO_CA...
else
stream->chain->caps |= V4L2_CAP_VIDEO_OU...
atomic_inc(&dev->nstreams);
-
--[[linux-4.4.1/atomic_inc()]]
return 0;
}
*コメント [#l3dfc099]
ページ名: