mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:36:20 +00:00
bluez: Fix coding style issues.
This commit is contained in:
parent
795c605f7c
commit
2522d1ce0d
1 changed files with 8 additions and 23 deletions
|
@ -147,8 +147,8 @@ struct rtp_payload
|
||||||
#error "Unknown byte order"
|
#error "Unknown byte order"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define IS_SBC(n) (strcmp(n, "audio/x-sbc") == 0)
|
#define IS_SBC(n) (strcmp((n), "audio/x-sbc") == 0)
|
||||||
#define IS_MPEG(n) (strcmp(n, "audio/mpeg") == 0)
|
#define IS_MPEG(n) (strcmp((n), "audio/mpeg") == 0)
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -414,21 +414,6 @@ gst_a2dp_sink_init_pkt_conf (GstA2dpSink * sink,
|
||||||
|
|
||||||
value = gst_structure_get_value (structure, "blocks");
|
value = gst_structure_get_value (structure, "blocks");
|
||||||
sbc->blocks = g_value_get_int (value);
|
sbc->blocks = g_value_get_int (value);
|
||||||
/* FIXME how can I obtain the bitpool ?
|
|
||||||
if (strcmp(id, "bitpool") == 0) {
|
|
||||||
if (snd_config_get_string(n, &bitpool) < 0) {
|
|
||||||
SNDERR("Invalid type for %s", id);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
sbc->bitpool = atoi(bitpool);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
SNDERR("Unknown field %s", id);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
sbc->bitpool = 32;
|
sbc->bitpool = 32;
|
||||||
|
|
||||||
pkt->length = sizeof (*cfg) + sizeof (*sbc);
|
pkt->length = sizeof (*cfg) + sizeof (*sbc);
|
||||||
|
@ -504,8 +489,8 @@ gst_a2dp_sink_conf_recv_dev_conf (GstA2dpSink * sink)
|
||||||
GST_DEBUG_OBJECT (sink, "OK - %d bytes received", sink->total);
|
GST_DEBUG_OBJECT (sink, "OK - %d bytes received", sink->total);
|
||||||
|
|
||||||
if (pkt->length != (sink->total - sizeof (struct ipc_packet))) {
|
if (pkt->length != (sink->total - sizeof (struct ipc_packet))) {
|
||||||
GST_ERROR_OBJECT (sink, "Error while configuring device: \
|
GST_ERROR_OBJECT (sink, "Error while configuring device: "
|
||||||
packet size doesn't match");
|
"packet size doesn't match");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -535,14 +520,14 @@ gst_a2dp_sink_conf_recv_stream_fd (GstA2dpSink * sink)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (!sink->stream) {
|
if (!sink->stream) {
|
||||||
GST_ERROR_OBJECT (sink, "Error while configuring device: \
|
GST_ERROR_OBJECT (sink, "Error while configuring device: "
|
||||||
could not acquire audio socket");
|
"could not acquire audio socket");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* It is possible there is some outstanding
|
/* It is possible there is some outstanding
|
||||||
data in the pipe - we have to empty it */
|
data in the pipe - we have to empty it */
|
||||||
while (TRUE) {
|
while (1) {
|
||||||
err = g_io_channel_read (sink->stream,
|
err = g_io_channel_read (sink->stream,
|
||||||
(gchar *) sink->data->buffer, (gsize) sink->data->cfg.pkt_len, &read);
|
(gchar *) sink->data->buffer, (gsize) sink->data->cfg.pkt_len, &read);
|
||||||
if (err != G_IO_ERROR_NONE || read <= 0)
|
if (err != G_IO_ERROR_NONE || read <= 0)
|
||||||
|
@ -746,7 +731,7 @@ gst_a2dp_sink_avdtp_write (GstA2dpSink * sink)
|
||||||
header->timestamp = htonl (a2dp->nsamples);
|
header->timestamp = htonl (a2dp->nsamples);
|
||||||
header->ssrc = htonl (1);
|
header->ssrc = htonl (1);
|
||||||
|
|
||||||
while (TRUE) {
|
while (1) {
|
||||||
err = g_io_channel_write (sink->stream, (const char *) a2dp->buffer,
|
err = g_io_channel_write (sink->stream, (const char *) a2dp->buffer,
|
||||||
(gsize) a2dp->count, (gsize *) & ret);
|
(gsize) a2dp->count, (gsize *) & ret);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue