From: Mayank Batra <mayankbatra@yahoo.co.in>
To: BLUEZ DEVELOPERS LIST <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] Re: a2play code that is working
Date: Tue, 26 Apr 2005 13:21:27 +0100 (BST) [thread overview]
Message-ID: <20050426122127.57962.qmail@web8302.mail.in.yahoo.com> (raw)
In-Reply-To: <426C05D9.6090100@xmission.com>
Brad,
> There is sometimes a delay before cvs gets updated
> by sourceforge. I had
> made those changes to sbc.h
Are you sure it will be ok if we change the sbc.h and
sbc.c files ?
Because then the other applications making use of the
sbc encoder will also have to change accordingly...??
I mean it is ok for a2dp applications, but what about
others...??
Mayank
> Mayank Batra wrote:
> > Brad,
> >
> > I tried the code from the CVS.
> >
> > It was not compiling.
> >
> > Reason is that you have changed the no. of
> parameters
> > being passed through sbc_encode(). But in sbc.h
> the
> > declaration is different.
> >
> > So I have made a new file called sbc_a2dp.h which
> now
> > contains the new declaration.
> >
> > Also we will have to include the file sbc_a2dp.c
> > because the sbc.c file contains the old definition
> of
> > sbc_encode(). Now since the definintion has
> changed I
> > have made a new file called sbc_a2dp.c which we
> will
> > have to include in the a2play.c file. I know that
> it
> > is not good to include .c files in the code... but
> > can't help it.
> >
> > If you have a better way out, please tell me.
> >
> > Put the sbc_a2play.h and sbc_a2play.c files in the
> > sbc/ folder.
> >
> > After making the above files and including
> sbc_a2dp.h
> > and sbc_a2dp.c files in the a2play.c file, then
> the
> > compilation is taking place fine.
> >
> > Please note that after including the sbc_a2dp.h
> and
> > sbc_a2dp.c files in the a2play.c file you should
> not
> > give -lsbc during compilation.
> >
> > I am not sending the patch once again. Please bear
> > with me.
> >
> > Thanks.
> >
> > Mayank
> >
> >
>
________________________________________________________________________
> > Yahoo! India Matrimony: Find your life partner
> online
> > Go to: http://yahoo.shaadi.com/india-matrimony
> >
> >
> >
>
------------------------------------------------------------------------
> >
> > /*
> > * a2play.c
> > * experimenting with sending a2dp audio to a
> headset
> > * Brad Midgley
> > *
>
*************************************************************************************
> > * Mayank Batra <mayankbatra@yahoo.co.in> (Added
> real time SBC encoding while streaming)
> > * Abhinav Mathur <abhinavpmathur@yahoo.com>
> > *
> > * This program is free software; you can
> redistribute it and/or modify
> > * it under the terms of the GNU General Public
> License as published by
> > * the Free Software Foundation; either version
> 2 of the License, or
> > * (at your option) any later version.
> > *
> > * This program 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 General Public License for more details.
> > *
> > * You should have received a copy of the GNU
> General Public License
> > * along with this program; if not, write to the
> Free Software
> > * Foundation, Inc., 59 Temple Place, Suite 330,
> Boston, MA 02111-1307 USA
> > *
> > */
> >
> > #ifdef HAVE_CONFIG_H
> > #include <config.h>
> > #endif
> >
> > #include <stdio.h>
> > #include <errno.h>
> > #include <fcntl.h>
> > #include <unistd.h>
> > #include <stdlib.h>
> > #include <getopt.h>
> > #include <signal.h>
> > #include <string.h>
> > #include <sys/socket.h>
> >
> > #include <bluetooth/bluetooth.h>
> > #include <bluetooth/hci.h>
> > #include <bluetooth/hci_lib.h>
> > #include <bluetooth/l2cap.h>
> > #include <bluetooth/sdp.h>
> > #include <bluetooth/sdp_lib.h>
> >
> > #include <netinet/in.h>
> >
> > /* This is because we have changed the declaration
> of sbc_encode */
> > #include "sbc/sbc_a2dp.h"
> > /* This is because we have changed the definition
> of sbc_encode */
> > #include "sbc/sbc_a2dp.c" //Even though it is not
> good to do so
> > /* So, we do not want to use the sbc.h and sbc.c
> files as they contain the old definition and
> declaration */
> >
> > /* AVDTP structures */
> >
> > /* packet components */
> >
> > struct avdtp_header {
> > uint8_t packet_type:2;
> > uint8_t message_type:2;
> > uint8_t transaction_label:4;
> > uint8_t signal_id:6;
> > uint8_t rfa0:2;
> > } __attribute__ ((packed));
> >
> > struct acp_seid_info {
> > uint8_t rfa0:1;
> > uint8_t inuse0:1;
> > uint8_t acp_seid:6;
> > uint8_t rfa2:3;
> > uint8_t tsep:1;
> > uint8_t media_type:4;
> > } __attribute__ ((packed));
> >
> > struct sbc_codec_specific_elements {
> > // a2dp p. 20
> > uint8_t channel_mode:4;
> > uint8_t frequency:4;
> > uint8_t allocation_method:2;
> > uint8_t subbands:2;
> > uint8_t block_length:4;
> > uint8_t min_bitpool;
> > uint8_t max_bitpool;
> > } __attribute__ ((packed));
> >
> > #define MAX_ADDITIONAL_CODEC 4
> > #define MAX_ADDITIONAL_CODEC_OCTETS
> (MAX_ADDITIONAL_CODEC*sizeof(struct acp_seid_info))
> >
> > /* packets */
> >
> > struct sepd_req {
> > struct avdtp_header header;
> > } __attribute__ ((packed));
> >
> > struct sepd_resp {
> > struct avdtp_header header;
> > struct acp_seid_info infos[1 +
> MAX_ADDITIONAL_CODEC];
> > } __attribute__ ((packed));
> >
> > struct getcap_req {
> > struct avdtp_header header;
>
=== message truncated ===
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next parent reply other threads:[~2005-04-26 12:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <426C05D9.6090100@xmission.com>
2005-04-26 12:21 ` Mayank Batra [this message]
2005-04-26 14:56 ` [Bluez-devel] Re: a2play code that is working Marcel Holtmann
2005-04-26 16:12 ` Brad Midgley
2005-04-26 16:48 ` Brad Midgley
2005-04-26 16:57 ` Marcel Holtmann
2005-04-26 17:02 ` Brad Midgley
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=20050426122127.57962.qmail@web8302.mail.in.yahoo.com \
--to=mayankbatra@yahoo.co.in \
--cc=bluez-devel@lists.sourceforge.net \
/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