summaryrefslogtreecommitdiff
path: root/src/audio.h
blob: 90dc13d63586c9d84b27b279d118ea258943be2d (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
31
32
33
34
35
36
37
38
39
40
#ifndef _AUDIO_H_
#define _AUDIO_H_

#include <glib.h>

#include <gst/gst.h>
#include <gst/app/gstappsrc.h>
#include <gst/app/gstappsink.h>
#include <gst/app/gstappbuffer.h>

#include <celt/celt.h>
#include <celt/celt_header.h>

struct cmumble_audio {
	GstElement *record_pipeline;
	GstAppSink *sink;

	guint8 celt_header_packet[sizeof(CELTHeader)];
	CELTHeader celt_header;
	CELTMode *celt_mode;
};

struct cmumble;
struct cmumble_user;

int
cmumble_audio_init(struct cmumble *cm);

int
cmumble_audio_fini(struct cmumble *cm);

int
cmumble_audio_create_playback_pipeline(struct cmumble *cm,
				       struct cmumble_user *user);

void
cmumble_audio_push(struct cmumble *cm, struct cmumble_user *user,
		   const guint8 *data, gsize size);

#endif /* _AUDIO_H_ */