summaryrefslogtreecommitdiff
path: root/modules/g7221/g7221.h
blob: 2c16d4cee856044c1456d653dceb4fb6e57cf52b (plain)
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
/**
 * @file g7221.h Private G.722.1 Interface
 *
 * Copyright (C) 2010 Creytiv.com
 */

struct g7221_aucodec {
	struct aucodec ac;
	uint32_t bitrate;
};

/* Encode */
int g7221_encode_update(struct auenc_state **aesp, const struct aucodec *ac,
			struct auenc_param *prm, const char *fmtp);
int g7221_encode(struct auenc_state *aes, uint8_t *buf, size_t *len,
		 int fmt, const void *sampv, size_t sampc);


/* Decode */
int g7221_decode_update(struct audec_state **adsp, const struct aucodec *ac,
			const char *fmtp);
int g7221_decode(struct audec_state *ads,
		 int fmt, void *sampv, size_t *sampc,
		 const uint8_t *buf, size_t len);


/* SDP */
int  g7221_fmtp_enc(struct mbuf *mb, const struct sdp_format *fmt,
		   bool offer, void *arg);
bool g7221_fmtp_cmp(const char *lfmtp, const char *rfmtp, void *arg);