2012-10-10 14:19:32 +00:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* BlueZ - Bluetooth protocol stack for Linux
|
|
|
|
*
|
|
|
|
* Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
|
|
|
|
* Copyright (C) 2012 Collabora Ltd.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GST_AVDTP_UTIL_H
|
|
|
|
#define __GST_AVDTP_UTIL_H
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
2014-12-30 15:21:44 +00:00
|
|
|
#include "bluez.h"
|
2012-10-10 14:19:32 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
2014-12-30 15:21:44 +00:00
|
|
|
|
2012-10-10 14:19:32 +00:00
|
|
|
#define DEFAULT_CODEC_BUFFER_SIZE 2048
|
2012-10-11 03:08:16 +00:00
|
|
|
#define TEMPLATE_MAX_BITPOOL_STR "64"
|
2014-12-30 15:21:44 +00:00
|
|
|
|
|
|
|
struct bluetooth_data
|
2012-10-10 14:19:32 +00:00
|
|
|
{
|
|
|
|
guint link_mtu;
|
|
|
|
|
2014-12-30 15:21:44 +00:00
|
|
|
BluezMediaTransport1 *conn;
|
2012-10-10 14:19:32 +00:00
|
|
|
guint8 codec; /* Bluetooth transport configuration */
|
|
|
|
gchar *uuid;
|
|
|
|
guint8 *config;
|
|
|
|
gint config_size;
|
2014-12-30 15:21:44 +00:00
|
|
|
gboolean is_acquired;
|
2012-10-10 14:19:32 +00:00
|
|
|
|
|
|
|
gchar buffer[DEFAULT_CODEC_BUFFER_SIZE]; /* Codec transfer buffer */
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _GstAvdtpConnection GstAvdtpConnection;
|
|
|
|
|
|
|
|
struct _GstAvdtpConnection
|
|
|
|
{
|
|
|
|
gchar *device;
|
|
|
|
gchar *transport;
|
|
|
|
GIOChannel *stream;
|
|
|
|
|
|
|
|
struct bluetooth_data data;
|
|
|
|
};
|
|
|
|
|
2014-12-30 15:21:44 +00:00
|
|
|
gboolean gst_avdtp_connection_acquire (GstAvdtpConnection * conn,
|
|
|
|
gboolean use_try);
|
2012-10-10 14:19:32 +00:00
|
|
|
void gst_avdtp_connection_release (GstAvdtpConnection * conn);
|
2012-10-29 10:19:02 +00:00
|
|
|
void gst_avdtp_connection_reset (GstAvdtpConnection * conn);
|
2012-10-10 14:19:32 +00:00
|
|
|
gboolean gst_avdtp_connection_get_properties (GstAvdtpConnection * conn);
|
|
|
|
GstCaps *gst_avdtp_connection_get_caps (GstAvdtpConnection * conn);
|
|
|
|
void gst_avdtp_connection_set_device (GstAvdtpConnection * conn,
|
|
|
|
const char *device);
|
|
|
|
void gst_avdtp_connection_set_transport (GstAvdtpConnection * conn,
|
|
|
|
const char *transport);
|
|
|
|
gboolean gst_avdtp_connection_conf_recv_stream_fd (GstAvdtpConnection * conn);
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
#endif
|