summaryrefslogtreecommitdiff
path: root/stream.h
blob: f3662d8d04cbead40415a7141b77c3f32aef43c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
 * UVC gadget test application
 *
 * Copyright (C) 2010 Ideas on board SPRL <laurent.pinchart@ideasonboard.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 */

#ifndef __STREAM_H__
#define __STREAM_H__

struct events;
struct uvc_device;
struct uvc_function_config;
struct v4l2_device;

struct uvc_stream
{
	struct v4l2_device *cap;
	struct uvc_device *uvc;

	struct events *events;
};

struct uvc_stream *uvc_stream_new(const char *uvc_device,
				  const char *cap_device);
void uvc_stream_init_uvc(struct uvc_stream *stream,
			 struct uvc_function_config *fc);
void uvc_stream_set_event_handler(struct uvc_stream *stream,
				  struct events *events);
void uvc_stream_delete(struct uvc_stream *stream);
int uvc_stream_set_format(struct uvc_stream *stream);
void uvc_stream_enable(struct uvc_stream *stream, int enable);

#endif /* __STREAM_H__ */