Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
video_usb_logger.c File Reference
#include "video_usb_logger.h"
#include <stdio.h>
#include "state.h"
#include "viewvideo.h"
#include "cv.h"
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "computer_vision/lib/encoding/jpeg.h"
#include "pose_history/pose_history.h"
+ Include dependency graph for video_usb_logger.c:

Go to the source code of this file.

Macros

#define VIDEO_USB_LOGGER_PATH   /data/video/usb
 Set the default File logger path to the USB drive. More...
 
#define VIDEO_USB_LOGGER_FPS   0
 Default FPS (zero means run at camera fps) More...
 

Functions

static void save_shot_on_disk (struct image_t *img, struct image_t *img_jpeg)
 
static struct image_tlog_image (struct image_t *img, uint8_t camera_id)
 
void video_usb_logger_start (void)
 Start the file logger and open a new file. More...
 
void video_usb_logger_stop (void)
 Stop the logger an nicely close the file. More...
 
void video_usb_logger_periodic (void)
 

Variables

static FILE * video_usb_logger = NULL
 The file pointer. More...
 
struct image_t img_jpeg_global
 
bool created_jpeg = FALSE
 
char foldername [512]
 
int shotNumber = 0
 

Macro Definition Documentation

◆ VIDEO_USB_LOGGER_FPS

#define VIDEO_USB_LOGGER_FPS   0

Default FPS (zero means run at camera fps)

Definition at line 47 of file video_usb_logger.c.

◆ VIDEO_USB_LOGGER_PATH

#define VIDEO_USB_LOGGER_PATH   /data/video/usb

Set the default File logger path to the USB drive.

Definition at line 43 of file video_usb_logger.c.

Function Documentation

◆ log_image()

static struct image_t* log_image ( struct image_t img,
uint8_t  camera_id 
)
static

Definition at line 114 of file video_usb_logger.c.

References created_jpeg, image_t::h, image_create(), IMAGE_JPEG, img_jpeg_global, save_shot_on_disk(), TRUE, and image_t::w.

Referenced by video_usb_logger_start().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save_shot_on_disk()

static void save_shot_on_disk ( struct image_t img,
struct image_t img_jpeg 
)
static

◆ video_usb_logger_periodic()

void video_usb_logger_periodic ( void  )

Definition at line 163 of file video_usb_logger.c.

◆ video_usb_logger_start()

void video_usb_logger_start ( void  )

Start the file logger and open a new file.

Definition at line 127 of file video_usb_logger.c.

References counter, cv_add_to_device(), foldername, log_image(), video_usb_logger, VIDEO_USB_LOGGER_FPS, and VIDEO_USB_LOGGER_PATH.

+ Here is the call graph for this function:

◆ video_usb_logger_stop()

void video_usb_logger_stop ( void  )

Stop the logger an nicely close the file.

Definition at line 155 of file video_usb_logger.c.

References video_usb_logger.

Variable Documentation

◆ created_jpeg

bool created_jpeg = FALSE

Definition at line 54 of file video_usb_logger.c.

Referenced by log_image().

◆ foldername

char foldername[512]

Definition at line 55 of file video_usb_logger.c.

Referenced by save_shot_on_disk(), and video_usb_logger_start().

◆ img_jpeg_global

struct image_t img_jpeg_global

Definition at line 52 of file video_usb_logger.c.

Referenced by log_image().

◆ shotNumber

int shotNumber = 0

Definition at line 56 of file video_usb_logger.c.

Referenced by save_shot_on_disk().

◆ video_usb_logger

FILE* video_usb_logger = NULL
static

The file pointer.

Definition at line 52 of file video_usb_logger.c.

Referenced by save_shot_on_disk(), video_usb_logger_start(), and video_usb_logger_stop().