libwebsockets
Lightweight C library for HTML5 websockets
Toggle main menu visibility
class="ui-resizable-handle">
Loading...
Searching...
No Matches
lws-v4l2.h
Go to the documentation of this file.
1
/*
2
* libwebsockets - small server side websockets and web server implementation
3
*
4
* Copyright (C) 2010 - 2026 Andy Green <andy@warmcat.com>
5
*
6
* Permission is hereby granted, free of charge, to any person obtaining a copy
7
* of this software and associated documentation files (the "Software"), to
8
* deal in the Software without restriction, including without limitation the
9
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10
* sell copies of the Software, and to permit persons to whom the Software is
11
* furnished to do so, subject to the following conditions:
12
*
13
* The above copyright notice and this permission notice shall be included in
14
* all copies or substantial portions of the Software.
15
*
16
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22
* IN THE SOFTWARE.
23
*/
24
25
#ifndef __LWS_V4L2_H__
26
#define __LWS_V4L2_H__
27
28
struct
lws_v4l2_ctx;
29
30
struct
lws_v4l2_info
{
31
const
char
*
device_path
;
32
uint32_t
width
;
33
uint32_t
height
;
34
uint32_t
pixelformat
;
/* V4L2_PIX_FMT_... */
35
};
36
37
struct
lws_v4l2_control
{
38
uint32_t
id
;
39
uint32_t
type
;
40
char
name
[32];
41
int32_t
min
;
42
int32_t
max
;
43
int32_t
step
;
44
int32_t
def
;
45
int32_t
val
;
46
};
47
48
typedef
int (*
lws_v4l2_control_cb
)(
void
*user,
const
struct
lws_v4l2_control
*c);
49
50
LWS_VISIBLE
LWS_EXTERN
struct
lws_v4l2_ctx *
51
lws_v4l2_create
(
const
struct
lws_v4l2_info
*info);
52
53
LWS_VISIBLE
LWS_EXTERN
void
54
lws_v4l2_destroy
(
struct
lws_v4l2_ctx **ctx);
55
56
LWS_VISIBLE
LWS_EXTERN
int
57
lws_v4l2_get_buffer
(
struct
lws_v4l2_ctx *ctx,
int
index,
void
**start,
size_t
*len);
58
59
LWS_VISIBLE
LWS_EXTERN
int
60
lws_v4l2_get_fd
(
struct
lws_v4l2_ctx *ctx);
61
62
LWS_VISIBLE
LWS_EXTERN
int
63
lws_v4l2_get_info
(
struct
lws_v4l2_ctx *ctx,
struct
lws_v4l2_info
*info);
64
65
LWS_VISIBLE
LWS_EXTERN
int
66
lws_v4l2_enum_controls
(
struct
lws_v4l2_ctx *ctx,
lws_v4l2_control_cb
cb,
void
*user);
67
68
LWS_VISIBLE
LWS_EXTERN
int
69
lws_v4l2_native_ioctl
(
struct
lws_v4l2_ctx *ctx,
unsigned
long
request,
void
*arg);
70
71
LWS_VISIBLE
LWS_EXTERN
int
72
lws_v4l2_set_control
(
struct
lws_v4l2_ctx *ctx,
uint32_t
id
, int32_t val);
73
74
#endif
uint32_t
unsigned int uint32_t
Definition
libwebsockets.h:695
LWS_EXTERN
#define LWS_EXTERN
Definition
libwebsockets.h:296
LWS_VISIBLE
#define LWS_VISIBLE
Definition
libwebsockets.h:291
lws_v4l2_get_buffer
LWS_VISIBLE LWS_EXTERN int lws_v4l2_get_buffer(struct lws_v4l2_ctx *ctx, int index, void **start, size_t *len)
lws_v4l2_control::val
int32_t val
Definition
lws-v4l2.h:45
lws_v4l2_info::width
uint32_t width
Definition
lws-v4l2.h:32
lws_v4l2_control_cb
int(* lws_v4l2_control_cb)(void *user, const struct lws_v4l2_control *c)
Definition
lws-v4l2.h:48
lws_v4l2_info::device_path
const char * device_path
Definition
lws-v4l2.h:31
lws_v4l2_control::type
uint32_t type
Definition
lws-v4l2.h:39
lws_v4l2_control::name
char name[32]
Definition
lws-v4l2.h:40
lws_v4l2_control::max
int32_t max
Definition
lws-v4l2.h:42
lws_v4l2_get_info
LWS_VISIBLE LWS_EXTERN int lws_v4l2_get_info(struct lws_v4l2_ctx *ctx, struct lws_v4l2_info *info)
lws_v4l2_control::def
int32_t def
Definition
lws-v4l2.h:44
lws_v4l2_control::id
uint32_t id
Definition
lws-v4l2.h:38
lws_v4l2_set_control
LWS_VISIBLE LWS_EXTERN int lws_v4l2_set_control(struct lws_v4l2_ctx *ctx, uint32_t id, int32_t val)
lws_v4l2_get_fd
LWS_VISIBLE LWS_EXTERN int lws_v4l2_get_fd(struct lws_v4l2_ctx *ctx)
lws_v4l2_native_ioctl
LWS_VISIBLE LWS_EXTERN int lws_v4l2_native_ioctl(struct lws_v4l2_ctx *ctx, unsigned long request, void *arg)
lws_v4l2_control::step
int32_t step
Definition
lws-v4l2.h:43
lws_v4l2_create
LWS_VISIBLE LWS_EXTERN struct lws_v4l2_ctx * lws_v4l2_create(const struct lws_v4l2_info *info)
lws_v4l2_info::pixelformat
uint32_t pixelformat
Definition
lws-v4l2.h:34
lws_v4l2_control::min
int32_t min
Definition
lws-v4l2.h:41
lws_v4l2_destroy
LWS_VISIBLE LWS_EXTERN void lws_v4l2_destroy(struct lws_v4l2_ctx **ctx)
lws_v4l2_info::height
uint32_t height
Definition
lws-v4l2.h:33
lws_v4l2_enum_controls
LWS_VISIBLE LWS_EXTERN int lws_v4l2_enum_controls(struct lws_v4l2_ctx *ctx, lws_v4l2_control_cb cb, void *user)
lws_v4l2_control
Definition
lws-v4l2.h:37
lws_v4l2_info
Definition
lws-v4l2.h:30
include
libwebsockets
lws-v4l2.h
Generated on
for libwebsockets by
1.18.0