-
Notifications
You must be signed in to change notification settings - Fork 0
/
AVServer.h
95 lines (80 loc) · 2.21 KB
/
AVServer.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
85
86
87
88
89
90
91
92
93
94
95
#ifndef __AVServer_h
#define __AVServer_h
#include <config.h>
#include <fuse.h>
#include <poll.h>
#include <stdlib.h>
#include <string_ext.h>
#include <dlfcn.h>
#include <errno.h>
#include <sys/types.h>
#include <dirent.h>
#include <linux/ioctl.h>
#include <linux/dvb/audio.h>
#include <linux/dvb/video.h>
#include <pthread.h>
enum {
DEV_AUDIO,
DEV_VIDEO,
DEV_DVR,
DEV_PAINEL,
};
/* Encoder Operations */
#define IOCTL_BROADCOM_SET_VPID 11
#define IOCTL_BROADCOM_SET_APID 12
#define IOCTL_BROADCOM_SET_PMTPID 13
#define IOCTL_BROADCOM_START_TRANSCODING 100
#define IOCTL_BROADCOM_STOP_TRANSCODING 200
struct encoder_ops {
bool (*create)(struct encoder_ops *, int);
void (*destroy)(struct encoder_ops *);
/** Call's for Player **/
bool (*set_pid)(struct encoder_ops *, int, int);
bool (*set_type)(struct encoder_ops *, int, int);
bool (*play)(struct encoder_ops *);
bool (*stop)(struct encoder_ops *);
/** Other's operations **/
int (*poll)(struct encoder_ops *, struct fuse_pollhandle *, unsigned *, bool);
int (*read)(struct encoder_ops *, char *, size_t);
int (*write)(struct encoder_ops *, const char *, size_t);
/** Private data **/
void *priv;
};
struct encoder_ops *get_encoder(void);
/* Class Operations */
struct class_ops {
bool (*create)(void);
void (*destroy)(void);
/** Call's for Player **/
bool (*clear)(int);
void (*set_dvr)(bool);
bool (*set_type)(int, int);
bool (*set_pid)(int, int);
bool (*set_mode)(int);
bool (*set_blank)(bool);
bool (*set_format)(int);
bool (*set_framerate)(int);
bool (*set_disp_format)(int);
bool (*set_fastfoward)(int);
bool (*set_slowmotion)(int);
bool (*play)(int);
bool (*pause)(int);
bool (*resume)(int);
bool (*stop)(int);
bool (*mute)(bool);
bool (*mixer)(audio_mixer_t *);
bool (*sync)(bool);
bool (*channel)(int);
bool (*status)(int, void *);
bool (*get_event)(struct video_event *);
bool (*get_vsize)(video_size_t *);
bool (*get_framerate)(unsigned int *);
bool (*get_pts)(int, long long *);
/** Other's operations **/
int (*poll)(int, struct fuse_pollhandle *, unsigned *, bool);
int (*write)(int, const char *, size_t);
/** Private data **/
void *priv;
};
struct class_ops *player_get_ops(void);
#endif /* __AVServer_h */