Paparazzi UAS
v7.0_unstable
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"
#include <BOARD_CONFIG>
Go to the source code of this file.
Macros | |
#define | VIEWVIDEO_DOWNSIZE_FACTOR 4 |
#define | VIEWVIDEO_QUALITY_FACTOR 50 |
#define | VIEWVIDEO_FPS 5 |
#define | VIEWVIDEO_NICE_LEVEL 5 |
#define | VIEWVIDEO_USE_NETCAT FALSE |
#define | VIEWVIDEO_USE_RTP TRUE |
Functions | |
static struct image_t * | viewvideo_function (struct UdpSocket *viewvideo_socket, struct image_t *img, uint16_t *rtp_packet_nr, uint32_t *rtp_frame_time, struct image_t *img_small, struct image_t *img_jpeg) |
Handles all the video streaming and saving of the image shots This is a separate thread, so it needs to be thread safe! More... | |
void | viewvideo_init (void) |
Initialize the view video. More... | |
Variables | |
struct UdpSocket | video_sock1 |
struct UdpSocket | video_sock2 |
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 53 of file viewvideo.c.
#define VIEWVIDEO_FPS 5 |
Definition at line 65 of file viewvideo.c.
#define VIEWVIDEO_NICE_LEVEL 5 |
Definition at line 71 of file viewvideo.c.
#define VIEWVIDEO_QUALITY_FACTOR 50 |
Definition at line 59 of file viewvideo.c.
#define VIEWVIDEO_USE_NETCAT FALSE |
Definition at line 77 of file viewvideo.c.
#define VIEWVIDEO_USE_RTP TRUE |
Definition at line 81 of file viewvideo.c.
|
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 113 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(), viewvideo_t::use_rtp, viewvideo, VIEWVIDEO_FPS, VIEWVIDEO_QUALITY_FACTOR, VIEWVIDEO_USE_NETCAT, and image_t::w.
void viewvideo_init | ( | void | ) |
Initialize the view video.
Definition at line 218 of file viewvideo.c.
References cv_add_to_device_async(), viewvideo_t::downsize_factor, viewvideo_t::is_streaming, viewvideo_t::quality_factor, udp_socket_create(), video_sock1, video_sock2, viewvideo, VIEWVIDEO_FPS, and VIEWVIDEO_NICE_LEVEL.
struct UdpSocket video_sock1 |
Definition at line 1 of file viewvideo.c.
Referenced by viewvideo_init().
struct UdpSocket video_sock2 |
Definition at line 1 of file viewvideo.c.
Referenced by viewvideo_init().
struct viewvideo_t viewvideo |
Definition at line 1 of file viewvideo.c.
Referenced by viewvideo_function(), and viewvideo_init().