-
Notifications
You must be signed in to change notification settings - Fork 7
/
fuse-ts.h
86 lines (73 loc) · 2.01 KB
/
fuse-ts.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#ifndef _FUSE_MAIN_H
#define _FUSE_MAIN_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <math.h>
#include <dirent.h>
#include <inttypes.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <signal.h>
#include "fuse-ts-filebuffer.h"
// non-volatile parameters
static const int read_block_size = 65536;
// "instance" variables:
extern FILE* logging;
extern filebuffer_t* log_filebuffer;
extern char * shotcut_tmp_path;
extern char * kdenlive_tmp_path;
extern char * base_dir ;
extern char * start_time;
extern char * prefix;
extern int inframe;
extern int outframe;
extern int blanklen;
extern char * intime;
extern char * outtime;
extern int slidemode;
extern char * intro_file;
extern char * outro_file;
extern off_t outbyte;
extern int numfiles;
extern int totalframes;
extern int frames_per_second;
extern int width;
extern int height;
extern char * mountpoint;
// constants
extern const char *rawName;
extern const char *durationName;
typedef struct _sourcefile {
char * filename;
off_t globalpos; // excluding the bytes of this piece!
int repeat; // # of repetitions in slidemode
FILE* fhandle;
struct _sourcefile* prev; // NULL in the list head
struct _sourcefile* next; // NULL in the list tail
// these ones are meant for list heads:
struct _sourcefile* tailhelper;
int refcnt;
off_t filesize; // size of this piece in bytes
off_t totalsize; // cumulation of bytes including this piece
pthread_mutex_t filelock;
} sourcefile_t;
typedef struct _fileposhint {
off_t lastpos;
sourcefile_t * lastpiece;
} fileposhint_t;
extern sourcefile_t * sourcefiles;
extern int sourcefiles_c;
extern sourcefile_t ** filechains;
extern int filechains_size;
extern fileposhint_t **filehints;
extern int filehints_size;
extern void check_signal(void);
extern sourcefile_t * init_sourcefiles();
extern void update_cutmarks_from_strings();
extern void update_cutmarks_from_numbers();
extern void prepare_file_attributes(sourcefile_t * list);
#endif