12 #include <libavformat/avformat.h>
13 #include <libavutil/frame.h>
14 #include <libswscale/swscale.h>
22 #define PORT_GRAB 32500
25 #define STREAM_DURATION 60.0
27 #define STREAM_FRAME_RATE 60
29 #define STREAM_PIX_FMT AV_PIX_FMT_YUV420P
31 #define SCALE_FLAGS SWS_BICUBIC
34 #define CLIP(X) ((X) > 255 ? 255 : (X) < 0 ? 0 : X)
37 #define RGB2Y(R, G, B) CLIP(((66 * (R) + 129 * (G) + 25 * (B) + 128) >> 8) + 16)
38 #define RGB2U(R, G, B) CLIP(((-38 * (R) -74 * (G) + 112 * (B) + 128) >> 8) + 128)
39 #define RGB2V(R, G, B) CLIP(((112 * (R) -94 * (G) -18 * (B) + 128) >> 8) + 128)
A wrapper around a single output AVStream.
void grabber_set_path_results(char *results)
Set the static path to the screenshots/movies dir.
#define BUF_SIZE
Small, fixed-size buffers.
Struct holding the state of a recording (filename/lock)
int socket_t
Alias to differenciate between regular ints and socket fds.
void grab_snapshot(char *snap_filename)
Shared structure between recv thread and grabber thread.
void grabber_set_display(Display *display)
Set the static X display pointer.
struct read_args s_read_args
Shared structure between recv thread and grabber thread.
void * grab_handler_amqp(void *args)
struct OutputStream OutputStream
A wrapper around a single output AVStream.
struct SwrContext * swr_ctx
int ffmpeg_grabber(void *arg)
Function passed to a thread in order to detect format encoding - encode frame- and write in a file...
unsigned char * xgrabber()
char record_filename[BUF_SIZE]
struct thread_args s_thread_args
Struct holding the state of a recording (filename/lock)
void * grab_handler_sock()
Start/Stop from socket connection via protobuf message.
Define common buffer sizes.
Define socket utilities to simplify networking.
struct SwsContext * sws_ctx