AiCPlayer
Interface of aic vm - for rendering aspect, sensors, video records
Macros | Functions | Variables
grabber.c File Reference

Screen recording/snapshots. More...

#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <errno.h>
#include <libavcodec/avcodec.h>
#include <libswresample/swresample.h>
#include <libavformat/avformat.h>
#include <libavformat/avio.h>
#include <libavutil/avutil.h>
#include <libavutil/dict.h>
#include <libavutil/error.h>
#include <libavutil/frame.h>
#include <libavutil/pixfmt.h>
#include <libavutil/rational.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/select.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include "amqp_listen.h"
#include "buffer_sizes.h"
#include "logger.h"
#include "recording.pb-c.h"
#include "sensors.h"
#include "socket.h"
#include "grabber.h"
Include dependency graph for grabber.c:

Go to the source code of this file.

Macros

#define LOG_TAG   "grabber"
 
#define READ_BUFFER_SIZE   1024
 

Functions

void grabber_set_display (Display *display)
 Set the static X display pointer. More...
 
void grabber_set_path_results (char *results)
 Set the static path to the screenshots/movies dir. More...
 
int needQuit (pthread_mutex_t *mtx)
 
int ffmpeg_grabber (void *arg)
 Function passed to a thread in order to detect format encoding - encode frame- and write in a file. More...
 
unsigned char * xgrabber ()
 
void grab_snapshot (char *snap_filename)
 
int precv (void *arg)
 
void * pgrab (void *arg)
 
void * grab_handler_sock (void *args)
 
void * grab_handler_amqp (void *args)
 

Variables

int g_width
 Global variable for the window width. More...
 
int g_height
 Global variable for the window height. More...
 
void * g_window_id
 Global variable for the X window id. More...
 

Detailed Description

Screen recording/snapshots.

Definition in file grabber.c.

Macro Definition Documentation

#define LOG_TAG   "grabber"

Definition at line 39 of file grabber.c.

#define READ_BUFFER_SIZE   1024

Definition at line 41 of file grabber.c.

Function Documentation

int ffmpeg_grabber ( void *  arg)

Function passed to a thread in order to detect format encoding - encode frame- and write in a file.

Parameters
argsparameter for file's name of the video record

Definition at line 420 of file grabber.c.

Here is the caller graph for this function:

void* grab_handler_amqp ( void *  args)

Definition at line 804 of file grabber.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void* grab_handler_sock ( void *  args)

Definition at line 761 of file grabber.c.

Here is the call graph for this function:

void grab_snapshot ( char *  snap_filename)

Definition at line 584 of file grabber.c.

Here is the caller graph for this function:

void grabber_set_display ( Display *  display)

Set the static X display pointer.

Parameters
displaythe X display pointer

Definition at line 68 of file grabber.c.

void grabber_set_path_results ( char *  results)

Set the static path to the screenshots/movies dir.

Parameters
resultsa pointer to the string

Definition at line 73 of file grabber.c.

Here is the caller graph for this function:

int needQuit ( pthread_mutex_t *  mtx)

Definition at line 82 of file grabber.c.

void* pgrab ( void *  arg)

Definition at line 696 of file grabber.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int precv ( void *  arg)

Definition at line 659 of file grabber.c.

Here is the caller graph for this function:

unsigned char* xgrabber ( )

Definition at line 510 of file grabber.c.

Variable Documentation

int g_height

Global variable for the window height.

Height of the window (can be resized at runtime)

Shared with the grabber.

Definition at line 87 of file main.c.

int g_width

Global variable for the window width.

Width of the window (can be resized at runtime)

Shared with the grabber.

Definition at line 93 of file main.c.

void * g_window_id

Global variable for the X window id.

X Window ID

Definition at line 103 of file main.c.