|
Paparazzi UAS
v5.12_stable-4-g9b43e9b
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 <sys/time.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 | 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! More... | |
| 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. More... | |
| bool | add_video_device (struct video_config_t *device) |
| void | video_thread_init (void) |
| Initialize the view video. More... | |
| void | video_thread_start () |
| Starts the streaming of a all cameras. More... | |
| void | video_thread_stop () |
| Stops the streaming of all cameras This could take some time, because the thread is stopped asynchronous. More... | |
Variables | |
| static struct video_config_t * | cameras [VIDEO_THREAD_MAX_CAMERAS] = {NULL} |
| #define IMG_FLT_SIZE 272 |
Referenced by video_thread_function().
| #define VIDEO_THREAD_MAX_CAMERAS 4 |
Definition at line 65 of file video_thread.c.
Referenced by add_video_device(), video_thread_start(), and video_thread_stop().
| #define VIDEO_THREAD_NICE_LEVEL 5 |
Definition at line 59 of file video_thread.c.
Referenced by video_thread_function().
| bool add_video_device | ( | struct video_config_t * | device | ) |
Definition at line 195 of file video_thread.c.
References cameras, video_config_t::dev_name, initialize_camera(), and VIDEO_THREAD_MAX_CAMERAS.
Here is the call graph for this function:
|
static |
Definition at line 170 of file video_thread.c.
References video_config_t::buf_cnt, video_config_t::crop, video_thread_t::dev, video_config_t::dev_name, 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 231 of file video_thread.c.
References video_config_t::dev_name, 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 246 of file video_thread.c.
References video_thread_t::dev, 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:
|
static |
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 87 of file video_thread.c.
References BayerToYUV(), configure_isp(), cv_run_device(), video_thread_t::dev, video_config_t::dev_name, video_config_t::filters, video_config_t::fps, image_create(), image_free(), IMAGE_YUV422, IMG_FLT_SIZE, video_thread_t::is_running, set_nice_level(), sys_time_elapsed_us(), video_config_t::thread, 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:| void video_thread_init | ( | void | ) |
Initialize the view video.
Definition at line 264 of file video_thread.c.
| void video_thread_periodic | ( | void | ) |
A dummy for now.
Definition at line 77 of file video_thread.c.
| void video_thread_start | ( | void | ) |
Starts the streaming of a all cameras.
Definition at line 271 of file video_thread.c.
| void video_thread_stop | ( | void | ) |
Stops the streaming of all cameras This could take some time, because the thread is stopped asynchronous.
Definition at line 286 of file video_thread.c.
|
static |
Definition at line 69 of file video_thread.c.
Referenced by add_video_device(), video_thread_start(), and video_thread_stop().