forked from libav/libav
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathavconv_ctx.h
More file actions
76 lines (58 loc) · 1.08 KB
/
avconv_ctx.h
File metadata and controls
76 lines (58 loc) · 1.08 KB
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
#pragma once
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include "queue.h"
typedef struct {
int type;
int idx;
float duration;
float position;
} avconvProbeInfo;
typedef struct {
unsigned frame:1;
unsigned probe:1;
unsigned free:1;
} avconvRequest;
typedef struct {
int size;
void *buf;
} avconvFrame;
typedef union {
avconvRequest req;
avconvFrame frame;
avconvProbeInfo pi;
} avconvCmdUnion;
typedef struct {
int argc;
char *argv[128];
union {
int fd[2];
struct {
int r, w;
} p;
} cmd_w, cmd_r;
unsigned quit:1;
struct {
unsigned on:1;
pthread_mutex_t mu;
queue_t q;
} myfree;
} avconvCtx;
typedef struct {
int type;
char buf[sizeof(avconvCmdUnion)];
} avconvCmd;
enum {
AVCONV_NONE,
AVCONV_PROBE_INFO,
AVCONV_PROBE_END,
AVCONV_REQUEST,
AVCONV_FRAME,
};
avconvCmd avconvMakeCmd(int type, void *buf, int size);
void avconvWriteCmd(int type, void *buf, int size);
void avconvNewFromArgv(int *fd_r, int *fd_w, int argc, char **argv);
void avconvCtxDestroy(avconvCtx *c);
extern __thread avconvCtx *gavctx;