![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
#include <dirent.h>#include <errno.h>#include <limits.h>#include <stdbool.h>#include <stdlib.h>#include <string.h>#include <sys/types.h>#include <time.h>#include "export.h"#include "audio/export.h"#include "compat/misc.h"#include "compat/time.h"#include "debug.h"#include "host.h"#include "messaging.h"#include "module.h"#include "utils/color_out.h"#include "utils/fs.h"#include "utils/misc.h"#include "video_export.h"
Go to the source code of this file.
Classes | |
| struct | exporter |
Macros | |
| #define | HANDLE_ERROR export_destroy(s); return NULL; |
| #define | MOD_NAME "[export] " |
| #define | WANT_MKDIR |
Functions | |
| static bool | create_dir (struct exporter *s) |
| static char * | create_implicit_dir (const char *prefix) |
| static bool | dir_is_empty (const char *dir) |
| static void | disable_export (struct exporter *s) |
| static bool | enable_export (struct exporter *s) |
| void | export_audio (struct exporter *s, struct audio_frame *frame) |
| void | export_destroy (struct exporter *s) |
| struct exporter * | export_init (struct module *parent, const char *cfg, bool should_export) |
| void | export_video (struct exporter *s, struct video_frame *frame) |
| static void | new_msg (struct module *mod) |
| static bool | parse_options (struct exporter *s, const char *ccfg, bool *should_export) |
| static void | process_messages (struct exporter *s) |
| static void | usage () |
Definition in file export.c.
| #define HANDLE_ERROR export_destroy(s); return NULL; |
Definition at line 147 of file export.c.
Referenced by export_init().
| #define MOD_NAME "[export] " |
Definition at line 62 of file export.c.
Referenced by create_dir(), create_implicit_dir(), export_video(), and parse_options().
|
static |
Definition at line 260 of file export.c.
References color_printf(), create_implicit_dir(), exporter::dir, dir_is_empty(), LOG_LEVEL_NOTICE, LOG_LEVEL_WARNING, log_msg(), MOD_NAME, MSG, exporter::override, TERM_BOLD, TERM_FG_YELLOW, and TERM_RESET.
Referenced by enable_export().

|
static |
Tries to create directories export.<date>[-????] inside directory prefix. If succesful, returns its name.
Definition at line 215 of file export.c.
References localtime_s, LOG_LEVEL_ERROR, log_msg(), MAX_PATH_SIZE, MOD_NAME, name, and ug_strerror().
Referenced by create_dir().

|
static |
Definition at line 247 of file export.c.
Referenced by create_dir().
|
static |
Definition at line 296 of file export.c.
References exporter::audio_export, audio_export_destroy(), exporter::dir, exporter::dir_auto, exporter::exporting, exporter::video_export, and video_export_destroy().
Referenced by export_destroy(), export_video(), and process_messages().

|
static |
Definition at line 177 of file export.c.
References exporter::audio_export, audio_export_init(), create_dir(), exporter::dir, exporter::exporting, MAX_PATH_SIZE, name, exporter::noaudio, exporter::novideo, exporter::video_export, video_export_destroy(), and video_export_init().
Referenced by export_init(), and process_messages().

| void export_audio | ( | struct exporter * | s, |
| struct audio_frame * | frame ) |
Definition at line 341 of file export.c.
References audio_export(), exporter::audio_export, exporter::exporting, frame, exporter::lock, and process_messages().
Referenced by audio_sender_thread().

| void export_destroy | ( | struct exporter * | s | ) |
Definition at line 308 of file export.c.
References exporter::dir, disable_export(), exporter::lock, exporter::mod, and module_done().
Referenced by display_dump_done(), and main().

Definition at line 149 of file export.c.
References module::cls, exporter::dir, exporter::dir_auto, enable_export(), HANDLE_ERROR, exporter::limit, exporter::lock, exporter::mod, MODULE_CLASS_EXPORTER, module_init_default(), module_register(), module::new_message, new_msg(), parent, parse_options(), and module::priv_data.
Referenced by display_dump_init(), and main().

| void export_video | ( | struct exporter * | s, |
| struct video_frame * | frame ) |
Definition at line 356 of file export.c.
References disable_export(), exporter::exit_on_limit, exit_uv(), exporter::exporting, frame, exporter::limit, exporter::lock, LOG_LEVEL_NOTICE, log_msg(), MOD_NAME, process_messages(), exporter::video_export, and video_export().
Referenced by display_dump_putf(), and video_rxtx::sender_loop().

|
static |
Definition at line 85 of file export.c.
References module::priv_data, and process_messages().
Referenced by export_init(), and process_msg().

|
static |
Definition at line 106 of file export.c.
References exporter::dir, exporter::exit_on_limit, exporter::limit, LOG_LEVEL_ERROR, log_msg(), MOD_NAME, exporter::noaudio, exporter::novideo, exporter::override, STR_LEN, and usage().
Referenced by export_init().

|
static |
Definition at line 317 of file export.c.
References check_message(), disable_export(), enable_export(), exporter::exporting, free_message(), exporter::lock, LOG_LEVEL_NOTICE, log_msg(), msg_universal::m, exporter::mod, new_response(), RESPONSE_NOT_FOUND, and RESPONSE_OK.
Referenced by export_audio(), export_video(), and new_msg().

|
static |
Definition at line 89 of file export.c.
References color_printf(), TBOLD, TERM_BOLD, TERM_RESET, and TRED.
Referenced by parse_options().
