From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 2/4] Updade a2dpsink to use new Acquire API
Date: Tue, 18 Jan 2011 12:00:13 +0200 [thread overview]
Message-ID: <1295344815-1404-2-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1295344815-1404-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
---
audio/gstavdtpsink.c | 19 +++++++------------
1 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/audio/gstavdtpsink.c b/audio/gstavdtpsink.c
index 95c4811..f3b15b3 100644
--- a/audio/gstavdtpsink.c
+++ b/audio/gstavdtpsink.c
@@ -1281,16 +1281,7 @@ static gboolean gst_avdtp_sink_transport_parse_property(GstAvdtpSink *self,
break;
}
- case DBUS_TYPE_UINT16: {
- uint16_t value;
- dbus_message_iter_get_basic(&variant_i, &value);
-
- if (g_str_equal(key, "OMTU") == TRUE)
- self->data->link_mtu = value;
-
- break;
- }
- case DBUS_TYPE_STRING: {
+ case DBUS_TYPE_STRING: {
const char *value;
dbus_message_iter_get_basic(&variant_i, &value);
@@ -1329,6 +1320,7 @@ static gboolean gst_avdtp_sink_transport_acquire(GstAvdtpSink *self)
DBusError err;
const char *access_type = "w";
int fd;
+ uint16_t imtu, omtu;
dbus_error_init(&err);
@@ -1349,14 +1341,17 @@ static gboolean gst_avdtp_sink_transport_acquire(GstAvdtpSink *self)
goto fail;
if (dbus_message_get_args(reply, &err, DBUS_TYPE_UNIX_FD, &fd,
- DBUS_TYPE_INVALID) == FALSE)
+ DBUS_TYPE_UINT16, &imtu,
+ DBUS_TYPE_UINT16, &omtu,
+ DBUS_TYPE_INVALID) == FALSE)
goto fail;
dbus_message_unref(reply);
self->stream = g_io_channel_unix_new(fd);
g_io_channel_set_close_on_unref(self->stream, TRUE);
- GST_DEBUG_OBJECT(self, "stream_fd=%d", fd);
+ self->data->link_mtu = omtu;
+ GST_DEBUG_OBJECT(self, "stream_fd=%d mtu=%d", fd, omtu);
return TRUE;
--
1.7.1
next prev parent reply other threads:[~2011-01-18 10:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-18 10:00 [PATCH 1/4] Remove IMTU and OMTU properties and return its values on Acquire reply Luiz Augusto von Dentz
2011-01-18 10:00 ` Luiz Augusto von Dentz [this message]
2011-01-19 15:16 ` [PATCH 2/4] Updade a2dpsink to use new Acquire API Johan Hedberg
2011-01-18 10:00 ` [PATCH 3/4] Add Routing property to MediaTransport interface Luiz Augusto von Dentz
2011-01-19 15:20 ` Johan Hedberg
2011-01-18 10:00 ` [PATCH 4/4] Add proper tracking mechanism to NREC Luiz Augusto von Dentz
2011-01-19 15:22 ` Johan Hedberg
2011-01-19 15:14 ` [PATCH 1/4] Remove IMTU and OMTU properties and return its values on Acquire reply Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1295344815-1404-2-git-send-email-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox