|
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/computer_vision/video_thread.h"#include <stdlib.h>#include <stdio.h>#include <errno.h>#include <string.h>#include <unistd.h>#include <math.h>#include "lib/v4l/v4l2.h"#include "lib/vision/image.h"#include "lib/vision/bayer.h"#include "mcu_periph/sys_time.h"#include <BOARD_CONFIG>#include <pthread.h>#include "rt_priority.h"
Include dependency graph for video_thread.c:Go to the source code of this file.
Macros | |
| #define | VIDEO_THREAD_NICE_LEVEL 5 |
| #define | VIDEO_THREAD_MAX_CAMERAS 4 |
| #define | VIDEO_THREAD_VERBOSE 0 |
| #define | printf_debug if(VIDEO_THREAD_VERBOSE > 0) printf |
| #define | IMG_FLT_SIZE 272 |
Functions | |
| static void * | video_thread_function (void *data) |
| Handles all the video streaming and saving of the image shots This is a separate thread, so it needs to be thread safe! | |
| static bool | initialize_camera (struct video_config_t *camera) |
| static void | start_video_thread (struct video_config_t *camera) |
| static void | stop_video_thread (struct video_config_t *device) |
| void | video_thread_periodic (void) |
| A dummy for now. | |
| bool | add_video_device (struct video_config_t *device) |
| void | video_thread_init (void) |
| Initialize the view video. | |
| void | video_thread_start () |
| Starts the streaming of a all cameras. | |
| void | video_thread_stop () |
| Stops the streaming of all cameras This could take some time, because the thread is stopped asynchronous. | |
Variables | |
| static struct video_config_t * | cameras [VIDEO_THREAD_MAX_CAMERAS] = {NULL} |
| #define IMG_FLT_SIZE 272 |
| #define printf_debug if(VIDEO_THREAD_VERBOSE > 0) printf |
Definition at line 71 of file video_thread.c.
| #define VIDEO_THREAD_MAX_CAMERAS 4 |
Definition at line 63 of file video_thread.c.
| #define VIDEO_THREAD_NICE_LEVEL 5 |
Definition at line 57 of file video_thread.c.
| #define VIDEO_THREAD_VERBOSE 0 |
Definition at line 68 of file video_thread.c.
| bool add_video_device | ( | struct video_config_t * | device | ) |
Definition at line 197 of file video_thread.c.
|
static |
Definition at line 172 of file video_thread.c.
References video_config_t::buf_cnt, video_config_t::crop, video_thread_t::dev, video_config_t::dev_name, foo, video_config_t::format, video_config_t::output_size, video_config_t::sensor_size, video_config_t::subdev_format, video_config_t::subdev_name, video_config_t::thread, v4l2_init(), and v4l2_init_subdev().
Referenced by add_video_device().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 233 of file video_thread.c.
References video_config_t::dev_name, foo, video_thread_t::is_running, video_config_t::thread, and video_thread_function().
Referenced by video_thread_start().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 251 of file video_thread.c.
References video_thread_t::dev, foo, video_thread_t::is_running, v4l2_device::name, video_config_t::thread, and v4l2_stop_capture().
Referenced by video_thread_stop().
Here is the call graph for this function:
Here is the caller graph for this function:Handles all the video streaming and saving of the image shots This is a separate thread, so it needs to be thread safe!
Definition at line 90 of file video_thread.c.
References BayerToYUV(), configure_isp(), cv_run_device(), foo, get_sys_time_usec(), image_create(), image_free(), IMAGE_YUV422, IMG_FLT_SIZE, set_nice_level(), sys_time_usleep(), v4l2_image_free(), v4l2_image_get(), v4l2_start_capture(), VIDEO_FILTER_DEBAYER, VIDEO_FILTER_ISP, and VIDEO_THREAD_NICE_LEVEL.
Referenced by start_video_thread().
Here is the call graph for this function:
Here is the caller graph for this function:Initialize the view video.
Definition at line 269 of file video_thread.c.
References cameras, foo, and VIDEO_THREAD_MAX_CAMERAS.
A dummy for now.
Definition at line 81 of file video_thread.c.
Starts the streaming of a all cameras.
Definition at line 280 of file video_thread.c.
References cameras, foo, start_video_thread(), and VIDEO_THREAD_MAX_CAMERAS.
Here is the call graph for this function:Stops the streaming of all cameras This could take some time, because the thread is stopped asynchronous.
Definition at line 294 of file video_thread.c.
References cameras, foo, stop_video_thread(), and VIDEO_THREAD_MAX_CAMERAS.
Here is the call graph for this function:
|
static |
Definition at line 73 of file video_thread.c.
Referenced by add_video_device(), video_thread_init(), video_thread_start(), and video_thread_stop().