|
AiCPlayer
Interface of aic vm - for rendering aspect, sensors, video records
|
grabber records videos or snapshots from ampq messages More...
#include <libavformat/avformat.h>#include <libavutil/frame.h>#include <libswscale/swscale.h>#include <pthread.h>#include <stdint.h>#include <X11/Xlib.h>#include "buffer_sizes.h"#include "socket.h"

Go to the source code of this file.
Data Structures | |
| struct | read_args |
| Shared structure between recv thread and grabber thread. More... | |
| struct | thread_args |
| Struct holding the state of a recording (filename/lock) More... | |
| struct | OutputStream |
| A wrapper around a single output AVStream. More... | |
Macros | |
| #define | PORT_GRAB 32500 |
| Port open on the VM. More... | |
| #define | STREAM_DURATION 60.0 |
| Frames to record per second. More... | |
| #define | STREAM_FRAME_RATE 60 |
| FPS of the stream. More... | |
| #define | STREAM_PIX_FMT AV_PIX_FMT_YUV420P |
| Pixel format of the stream (yuv420p) More... | |
| #define | SCALE_FLAGS SWS_BICUBIC |
| #define | CLIP(X) ((X) > 255 ? 255 : (X) < 0 ? 0 : X) |
| #define | RGB2Y(R, G, B) CLIP(((66 * (R) + 129 * (G) + 25 * (B) + 128) >> 8) + 16) |
| #define | RGB2U(R, G, B) CLIP(((-38 * (R) -74 * (G) + 112 * (B) + 128) >> 8) + 128) |
| #define | RGB2V(R, G, B) CLIP(((112 * (R) -94 * (G) -18 * (B) + 128) >> 8) + 128) |
Typedefs | |
| typedef struct read_args | s_read_args |
| Shared structure between recv thread and grabber thread. More... | |
| typedef struct thread_args | s_thread_args |
| Struct holding the state of a recording (filename/lock) More... | |
| typedef struct OutputStream | OutputStream |
| A wrapper around a single output AVStream. More... | |
Functions | |
| void | grab_snapshot (char *snap_filename) |
| 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_handler_sock () |
| Start/Stop from socket connection via protobuf message. More... | |
| void * | grab_handler_amqp (void *args) |
| void | grabber_set_path_results (char *results) |
| Set the static path to the screenshots/movies dir. More... | |
| void | grabber_set_display (Display *display) |
| Set the static X display pointer. More... | |
grabber records videos or snapshots from ampq messages
The ffmpeg part the code is inspired by the libavformat API example.
Definition in file grabber.h.
| #define RGB2U | ( | R, | |
| G, | |||
| B | |||
| ) | CLIP(((-38 * (R) -74 * (G) + 112 * (B) + 128) >> 8) + 128) |
| #define RGB2V | ( | R, | |
| G, | |||
| B | |||
| ) | CLIP(((112 * (R) -94 * (G) -18 * (B) + 128) >> 8) + 128) |
| #define RGB2Y | ( | R, | |
| G, | |||
| B | |||
| ) | CLIP(((66 * (R) + 129 * (G) + 25 * (B) + 128) >> 8) + 16) |
| #define STREAM_PIX_FMT AV_PIX_FMT_YUV420P |
| typedef struct OutputStream OutputStream |
A wrapper around a single output AVStream.
| typedef struct read_args s_read_args |
Shared structure between recv thread and grabber thread.
| typedef struct thread_args s_thread_args |
Struct holding the state of a recording (filename/lock)
| int ffmpeg_grabber | ( | void * | arg | ) |
| void* grab_handler_amqp | ( | void * | args | ) |
| void* grab_handler_sock | ( | ) |
Start/Stop from socket connection via protobuf message.
| data->flagRecording | to protect of recording from amqp messages |

| void grab_snapshot | ( | char * | snap_filename | ) |
| void grabber_set_display | ( | Display * | display | ) |
| void grabber_set_path_results | ( | char * | results | ) |
1.8.6