Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
Get live images from a RTP/UDP stream and save pictures on internal memory. More...
#include "modules/computer_vision/viewvideo.h"
#include "modules/computer_vision/cv.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/time.h>
#include <math.h>
#include "lib/vision/image.h"
#include "lib/encoding/jpeg.h"
#include "lib/encoding/rtp.h"
#include "udp_socket.h"
Go to the source code of this file.
Macros | |
#define | VIEWVIDEO_DOWNSIZE_FACTOR 4 |
#define | VIEWVIDEO_QUALITY_FACTOR 50 |
#define | VIEWVIDEO_RTP_TIME_INC 0 |
#define | VIEWVIDEO_SHOT_PATH /data/video/images |
#define | VIEWVIDEO_USE_NETCAT FALSE |
#define | VIEWVIDEO_USE_RTP TRUE |
Functions | |
bool_t | viewvideo_function (struct image_t *img) |
Handles all the video streaming and saving of the image shots This is a sepereate thread, so it needs to be thread safe! More... | |
void | viewvideo_init (void) |
Initialize the view video. More... | |
Variables | |
struct UdpSocket | video_sock |
struct viewvideo_t | viewvideo |
Get live images from a RTP/UDP stream and save pictures on internal memory.
Works on Linux platforms
Definition in file viewvideo.c.
#define VIEWVIDEO_DOWNSIZE_FACTOR 4 |
Definition at line 51 of file viewvideo.c.
#define VIEWVIDEO_QUALITY_FACTOR 50 |
Definition at line 57 of file viewvideo.c.
Referenced by viewvideo_function().
#define VIEWVIDEO_RTP_TIME_INC 0 |
Definition at line 63 of file viewvideo.c.
Referenced by viewvideo_function().
#define VIEWVIDEO_SHOT_PATH /data/video/images |
Definition at line 72 of file viewvideo.c.
Referenced by viewvideo_init().
#define VIEWVIDEO_USE_NETCAT FALSE |
Definition at line 79 of file viewvideo.c.
Referenced by viewvideo_function().
#define VIEWVIDEO_USE_RTP TRUE |
Definition at line 83 of file viewvideo.c.
bool_t viewvideo_function | ( | struct image_t * | img | ) |
Handles all the video streaming and saving of the image shots This is a sepereate thread, so it needs to be thread safe!
Definition at line 114 of file viewvideo.c.
References image_t::buf, image_t::buf_size, viewvideo_t::downsize_factor, image_t::h, image_create(), image_free(), IMAGE_JPEG, IMAGE_YUV422, image_yuv422_downsample(), viewvideo_t::is_streaming, jpeg_encode_image(), rtp_frame_send(), TRUE, viewvideo_t::use_rtp, video_sock, viewvideo, VIEWVIDEO_QUALITY_FACTOR, VIEWVIDEO_RTP_TIME_INC, VIEWVIDEO_USE_NETCAT, and image_t::w.
Referenced by viewvideo_init().
void viewvideo_init | ( | void | ) |
Initialize the view video.
Definition at line 198 of file viewvideo.c.
struct UdpSocket video_sock |
Definition at line 90 of file viewvideo.c.
Referenced by viewvideo_function(), and viewvideo_init().
struct viewvideo_t viewvideo |
Definition at line 100 of file viewvideo.c.
Referenced by video_usb_logger_periodic(), viewvideo_function(), and viewvideo_init().