summaryrefslogtreecommitdiffstats
path: root/audio/gsta2dpsink.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-10-26 18:48:42 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-10-26 18:48:42 +0000
commit973d90d520edc392c458c556d9f1a3e242a1f080 (patch)
treef2e637216952646aa2bf1f40a6dfd289c174f7ab /audio/gsta2dpsink.c
parent79a2c17e0257c2d8bbed190d46021fe492d63af0 (diff)
Remove dependency of sbc library from a2dpsink element.
Diffstat (limited to 'audio/gsta2dpsink.c')
-rw-r--r--audio/gsta2dpsink.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/audio/gsta2dpsink.c b/audio/gsta2dpsink.c
index a80fd790..0ed39a66 100644
--- a/audio/gsta2dpsink.c
+++ b/audio/gsta2dpsink.c
@@ -36,7 +36,6 @@
#include <bluetooth/bluetooth.h>
#include "ipc.h"
-#include "sbc.h"
#include "rtp.h"
#include "gsta2dpsink.h"
@@ -80,8 +79,6 @@ GST_DEBUG_CATEGORY_STATIC(a2dp_sink_debug);
struct bluetooth_data {
struct ipc_data_cfg cfg; /* Bluetooth device config */
- sbc_t sbc; /* Codec data */
- int codesize; /* SBC codesize */
int samples; /* Number of encoded samples */
gchar buffer[BUFFER_SIZE]; /* Codec transfer buffer */
gsize count; /* Codec transfer buffer counter */
@@ -152,8 +149,6 @@ static gboolean gst_a2dp_sink_stop(GstBaseSink *basesink)
}
if (self->data) {
- if (self->data->cfg.codec == CFG_CODEC_SBC)
- sbc_finish(&self->data->sbc);
g_free(self->data);
self->data = NULL;
}
@@ -268,25 +263,13 @@ static int gst_a2dp_sink_bluetooth_a2dp_init(GstA2dpSink *self,
if (cfg->codec != CFG_CODEC_SBC)
return -1;
- /* FIXME: init using flags? */
- sbc_init(&data->sbc, 0);
- data->sbc.rate = cfg->rate;
- data->sbc.channels = cfg->mode == CFG_MODE_MONO ? 1 : 2;
- if (cfg->mode == CFG_MODE_MONO || cfg->mode == CFG_MODE_JOINT_STEREO)
- data->sbc.joint = 1;
- data->sbc.allocation = sbc->allocation;
- data->sbc.subbands = sbc->subbands;
- data->sbc.blocks = sbc->blocks;
- data->sbc.bitpool = sbc->bitpool;
- data->codesize = data->sbc.subbands * data->sbc.blocks *
- data->sbc.channels * 2;
data->count = sizeof(struct rtp_header) + sizeof(struct rtp_payload);
GST_DEBUG_OBJECT(self, "Codec parameters: "
"\tallocation=%u\n\tsubbands=%u\n "
"\tblocks=%u\n\tbitpool=%u\n",
- data->sbc.allocation, data->sbc.subbands,
- data->sbc.blocks, data->sbc.bitpool);
+ sbc->allocation, sbc->subbands,
+ sbc->blocks, sbc->bitpool);
return 0;
}