libsc  2.8.7
The SC library provides support for parallel scientific applications.
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
sc_v4l2.h
Go to the documentation of this file.
1 /*
2  This file is part of the SC Library.
3  The SC Library provides support for parallel scientific applications.
4 
5  Copyright (C) 2010 The University of Texas System
6  Additional copyright (C) 2011 individual authors
7 
8  The SC Library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Lesser General Public
10  License as published by the Free Software Foundation; either
11  version 2.1 of the License, or (at your option) any later version.
12 
13  The SC Library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with the SC Library; if not, write to the Free Software
20  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  02110-1301, USA.
22 */
23 
29 #ifndef SC_V4L2_H
30 #define SC_V4L2_H
31 
32 #include <sc.h>
33 
34 SC_EXTERN_C_BEGIN;
35 
37 typedef struct sc_v4l2_device sc_v4l2_device_t;
38 
44 sc_v4l2_device_t *sc_v4l2_device_open (const char *devname);
45 
51 
56 const char *sc_v4l2_device_devstring (const sc_v4l2_device_t * vd);
57 
62 const char *sc_v4l2_device_capstring (const sc_v4l2_device_t * vd);
63 
70 const char *sc_v4l2_device_outstring (const sc_v4l2_device_t * vd);
71 
77 
83 
91  unsigned usec);
92 
99  const char *wbuf);
100 
112  unsigned int *width,
113  unsigned int *height,
114  unsigned int *bytesperline,
115  unsigned int *sizeimage);
116 
117 SC_EXTERN_C_END;
118 
119 #endif /* SC_V4L2_H */
Support for process management (memory allocation, logging, etc.)
int sc_v4l2_device_write(sc_v4l2_device_t *vd, const char *wbuf)
Call write (2) to copy an image buffer to device.
int sc_v4l2_device_select(sc_v4l2_device_t *vd, unsigned usec)
Call select (2) to wait for write availability of device.
const char * sc_v4l2_device_devstring(const sc_v4l2_device_t *vd)
Return string that details some driver and device properties.
int sc_v4l2_device_format(sc_v4l2_device_t *vd, unsigned int *width, unsigned int *height, unsigned int *bytesperline, unsigned int *sizeimage)
Set output configuration of device.
const char * sc_v4l2_device_capstring(const sc_v4l2_device_t *vd)
Return string that details some device capabilities.
const char * sc_v4l2_device_outstring(const sc_v4l2_device_t *vd)
Return string that details some output properties.
int sc_v4l2_device_is_readwrite(const sc_v4l2_device_t *vd)
Query whether a device supports read/write I/O.
struct sc_v4l2_device sc_v4l2_device_t
Opaque structure for a video device.
Definition: sc_v4l2.h:37
int sc_v4l2_device_close(sc_v4l2_device_t *vd)
Close a video device.
int sc_v4l2_device_is_streaming(const sc_v4l2_device_t *vd)
Query whether a device supports streaming I/O.
sc_v4l2_device_t * sc_v4l2_device_open(const char *devname)
Open a video device by special file name.