aboutsummaryrefslogtreecommitdiff
path: root/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'common.h')
-rw-r--r--common.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/common.h b/common.h
index 870058c..b6dabba 100644
--- a/common.h
+++ b/common.h
@@ -25,6 +25,7 @@
#define INCLUDE_COMMON_H
#include <stdio.h>
+#include <stdint.h>
#include <semaphore.h>
/* When ADD_DETAILS is defined every debug and error message contains
@@ -94,6 +95,15 @@ struct input {
int offs;
};
+/* Output file related parameters */
+struct output {
+ char *name;
+ int fd;
+ char *p;
+ unsigned int size;
+ off_t offs;
+};
+
/* video decoder related parameters */
struct video {
char *name;
@@ -102,8 +112,8 @@ struct video {
/* Output queue related */
int out_buf_cnt;
int out_buf_size;
- int out_buf_off[MAX_OUT_BUF];
- char *out_buf_addr[MAX_OUT_BUF];
+ uint32_t out_buf_off[MAX_OUT_BUF];
+ uint8_t *out_buf_addr[MAX_OUT_BUF];
int out_buf_flag[MAX_OUT_BUF];
/* Capture queue related */
@@ -116,25 +126,28 @@ struct video {
int cap_buf_cnt;
int cap_buf_cnt_min;
int cap_buf_size[CAP_PLANES];
- int cap_buf_off[MAX_CAP_BUF][CAP_PLANES];
- char *cap_buf_addr[MAX_CAP_BUF][CAP_PLANES];
+ uint32_t cap_buf_off[MAX_CAP_BUF][CAP_PLANES];
+ uint8_t *cap_buf_addr[MAX_CAP_BUF][CAP_PLANES];
int cap_buf_flag[MAX_CAP_BUF];
int cap_buf_queued;
- unsigned long total_captured;
+ unsigned long total_encoded;
};
struct instance {
int width;
int height;
- int save_frames;
+ int save_encoded;
char *save_path;
+ unsigned long num_frames_to_save;
int use_dmabuf;
/* Input file related parameters */
struct input in;
+ struct output out;
+
/* video decoder related parameters */
struct video video;