Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
video_thread_nps.c File Reference
#include "video_thread_nps.h"
#include "video_thread.h"
#include "cv.h"
#include "lib/vision/image.h"
#include "modules/computer_vision/lib/v4l/v4l2.h"
#include "peripherals/video_device.h"
#include <stdio.h>
+ Include dependency graph for video_thread_nps.c:

Go to the source code of this file.

Functions

void video_thread_init (void)
 Initialize the view video. More...
 
void video_thread_periodic (void)
 A dummy for now. More...
 
void video_thread_start (void)
 Starts the streaming of a all cameras. More...
 
void video_thread_stop (void)
 Stops the streaming of all cameras This could take some time, because the thread is stopped asynchronous. More...
 
bool add_video_device (struct video_config_t *device)
 Keep track of video devices added by modules. More...
 

Variables

struct video_config_t front_camera
 Video thread dummy for simulation. More...
 
struct video_config_t bottom_camera
 
struct video_config_tcameras [VIDEO_THREAD_MAX_CAMERAS] = { NULL }
 

Function Documentation

bool add_video_device ( struct video_config_t device)

Keep track of video devices added by modules.

Definition at line 91 of file video_thread_nps.c.

References video_config_t::dev_name, and VIDEO_THREAD_MAX_CAMERAS.

Referenced by cv_add_to_device().

+ Here is the caller graph for this function:

void video_thread_init ( void  )

Initialize the view video.

Definition at line 73 of file video_thread_nps.c.

void video_thread_periodic ( void  )

A dummy for now.

Definition at line 76 of file video_thread_nps.c.

void video_thread_start ( void  )

Starts the streaming of a all cameras.

Definition at line 81 of file video_thread_nps.c.

References cameras, start_video_thread(), and VIDEO_THREAD_MAX_CAMERAS.

+ Here is the call graph for this function:

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 84 of file video_thread_nps.c.

References cameras, stop_video_thread(), and VIDEO_THREAD_MAX_CAMERAS.

+ Here is the call graph for this function:

Variable Documentation

struct video_config_t bottom_camera
Initial value:
= {
.output_size = { .w = 320, .h = 240 },
.sensor_size = { .w = 320, .h = 240 },
.crop = { .x = 0, .y = 0, .w = 320, .h = 240 },
.dev_name = "bottom_camera",
.subdev_name = NULL,
.format = V4L2_PIX_FMT_UYVY,
.buf_cnt = 10,
.filters = 0,
.cv_listener = NULL,
.fps = 0
}

Definition at line 56 of file video_thread_nps.c.

struct video_config_t* cameras[VIDEO_THREAD_MAX_CAMERAS] = { NULL }

Definition at line 70 of file video_thread_nps.c.

struct video_config_t front_camera
Initial value:
= {
.output_size = { .w = 1280, .h = 720 },
.sensor_size = { .w = 1280, .h = 720 },
.crop = { .x = 0, .y = 0, .w = 1280, .h = 720 },
.dev_name = "front_camera",
.subdev_name = NULL,
.format = V4L2_PIX_FMT_UYVY,
.buf_cnt = 10,
.filters = 0,
.cv_listener = NULL,
.fps = 0
}

Video thread dummy for simulation.

  • Keeps track of added devices, which can be referenced by simulation code such as in simulator/nps/fdm_gazebo.c.

Definition at line 43 of file video_thread_nps.c.