forked from dogeel/recbond
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdecoder.h
More file actions
56 lines (43 loc) · 1.02 KB
/
decoder.h
File metadata and controls
56 lines (43 loc) · 1.02 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
/* -*- tab-width: 4; indent-tabs-mode: nil -*- */
#ifndef _DECODER_H_
#define _DECODER_H_
#include <stdint.h>
#include <string.h>
#include "config.h"
#ifdef HAVE_LIBARIBB25
#include <aribb25/arib_std_b25.h>
#include <aribb25/arib_std_b25_error_code.h>
#include <aribb25/b_cas_card.h>
typedef struct _decoder {
ARIB_STD_B25 *b25;
B_CAS_CARD *bcas;
} DECODER;
typedef struct _decoder_options {
int round;
int strip;
int emm;
} decoder_options;
#else
typedef struct {
uint8_t *data;
int32_t size;
} ARIB_STD_B25_BUFFER;
typedef struct _decoder {
void *dummy;
} DECODER;
typedef struct _decoder_options {
int round;
int strip;
int emm;
} decoder_options;
#endif
/* prototypes */
DECODER *b25_startup(decoder_options *opt);
int b25_shutdown(DECODER *dec);
int b25_decode(DECODER *dec,
ARIB_STD_B25_BUFFER *sbuf,
ARIB_STD_B25_BUFFER *dbuf);
int b25_finish(DECODER *dec,
ARIB_STD_B25_BUFFER *sbuf,
ARIB_STD_B25_BUFFER *dbuf);
#endif