Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
video_thread.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015
3  *
4  * This file is part of Paparazzi.
5  *
6  * Paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * Paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, see
18  * <http://www.gnu.org/licenses/>.
19  *
20  */
21 
30 #ifndef VIDEO_THREAD_H
31 #define VIDEO_THREAD_H
32 
33 #include "std.h"
34 
35 // Main video_thread structure
37  volatile bool_t is_running;
38  struct v4l2_device *dev;
40 
41  volatile bool_t take_shot;
43 };
44 extern struct video_thread_t video_thread;
45 
46 // Module functions
47 extern void video_thread_init(void);
48 extern void video_thread_periodic(void);
49 extern void video_thread_start(void);
50 extern void video_thread_stop(void);
51 extern void video_thread_take_shot(bool_t take);
52 
53 #endif /* VIDEO_THREAD_H */
54 
unsigned short uint16_t
Definition: types.h:16
void video_thread_take_shot(bool_t take)
Take a shot and save it This will only work when the streaming is enabled.
Definition: video_thread.c:308
void video_thread_periodic(void)
A dummy for now.
Definition: video_thread.c:98
volatile bool_t is_running
When the device is running.
Definition: video_thread.h:37
unsigned char uint8_t
Definition: types.h:14
uint16_t shot_number
The last shot number.
Definition: video_thread.h:42
struct video_thread_t video_thread
Dummy C implementation for simulation The V4L2 could also work in simulation, but must be adapted a b...
Definition: video_thread.c:101
void video_thread_init(void)
Initialize the view video.
Definition: video_thread.c:234
volatile bool_t take_shot
Wether to take an image.
Definition: video_thread.h:41
uint8_t fps
The amount of frames per second.
Definition: video_thread.h:39
struct v4l2_device * dev
The V4L2 device that is used for the video stream.
Definition: video_thread.h:38
void video_thread_stop(void)
Stops the streaming This could take some time, because the thread is stopped asynchronous.
Definition: video_thread.c:285
void video_thread_start(void)
Start with streaming.
Definition: video_thread.c:266