#define DISCONNECT_TIMEOUT 1
#define START_TIMEOUT 1
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+struct avdtp *configured_session;
+struct avdtp_stream *configured_stream;
+#endif
+
#if __BYTE_ORDER == __LITTLE_ENDIAN
struct avdtp_common_header {
switch (state) {
case AVDTP_STATE_CONFIGURED:
- if (sep->info.type == AVDTP_SEP_TYPE_SINK)
+ if (sep->info.type == AVDTP_SEP_TYPE_SINK) {
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ configured_session = session;
+ configured_stream = stream;
+#endif
avdtp_delay_report(session, stream, stream->delay);
+ }
break;
case AVDTP_STATE_OPEN:
stream->starting = FALSE;
&req, sizeof(req));
}
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+int delay_report_req(uint16_t delay)
+{
+ if (!configured_session)
+ return -EINVAL;
+
+ if (!configured_stream)
+ return -EINVAL;
+
+ return avdtp_delay_report(configured_session, configured_stream, delay);
+}
+#endif
+
struct avdtp_local_sep *avdtp_register_sep(struct queue *lseps, uint8_t type,
uint8_t media_type,
uint8_t codec_type,
int avdtp_abort(struct avdtp *session, struct avdtp_stream *stream);
int avdtp_delay_report(struct avdtp *session, struct avdtp_stream *stream,
uint16_t delay);
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+int delay_report_req(uint16_t delay);
+#endif
struct avdtp_local_sep *avdtp_register_sep(struct queue *lseps, uint8_t type,
uint8_t media_type,
return TRUE;
}
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+static void delay_report(const GDBusPropertyTable *property,
+ DBusMessageIter *iter, GDBusPendingPropertySet id,
+ void *data)
+{
+ struct media_transport *transport = data;
+ struct a2dp_transport *a2dp = transport->data;
+ uint16_t delay;
+ bool notify;
+
+ if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_UINT16) {
+ g_dbus_pending_property_error(id,
+ ERROR_INTERFACE ".InvalidArguments",
+ "Invalid arguments in method call");
+ return;
+ }
+
+ dbus_message_iter_get_basic(iter, &delay);
+ DBG("Delay : %d", delay);
+
+ g_dbus_pending_property_success(id);
+
+ a2dp->delay = delay;
+
+ notify = transport->source_watch ? true : false;
+ if (notify)
+ g_dbus_emit_property_changed(btd_get_dbus_connection(),
+ transport->path,
+ MEDIA_TRANSPORT_INTERFACE,
+ "Delay");
+
+ delay_report_req(delay);
+}
+#endif
+
static gboolean volume_exists(const GDBusPropertyTable *property, void *data)
{
struct media_transport *transport = data;
{ "Codec", "y", get_codec },
{ "Configuration", "ay", get_configuration },
{ "State", "s", get_state },
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ { "Delay", "q", get_delay, delay_report, delay_exists },
+#else
{ "Delay", "q", get_delay, NULL, delay_exists },
+#endif
{ "Volume", "q", get_volume, set_volume, volume_exists },
{ }
};