Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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...
 

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)
 
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

#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.

Referenced by video_usb_logger_start().

Function Documentation

static struct image_t* log_image ( struct image_t img)
static

Definition at line 109 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:

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

Definition at line 158 of file video_usb_logger.c.

void video_usb_logger_start ( void  )

Start the file logger and open a new file.

Definition at line 122 of file video_usb_logger.c.

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

+ Here is the call graph for this function:

void video_usb_logger_stop ( void  )

Stop the logger an nicely close the file.

Definition at line 150 of file video_usb_logger.c.

References video_usb_logger.

Variable Documentation

bool created_jpeg = FALSE

Definition at line 49 of file video_usb_logger.c.

Referenced by log_image().

char foldername[512]

Definition at line 50 of file video_usb_logger.c.

Referenced by save_shot_on_disk(), and video_usb_logger_start().

struct image_t img_jpeg_global

Definition at line 48 of file video_usb_logger.c.

Referenced by log_image().

int shotNumber = 0

Definition at line 51 of file video_usb_logger.c.

Referenced by save_shot_on_disk().

FILE* video_usb_logger = NULL
static

The file pointer.

Definition at line 47 of file video_usb_logger.c.

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