summaryrefslogtreecommitdiff
path: root/cras/src/server/cras_a2dp_info.h
diff options
context:
space:
mode:
authorAndrew Walbran <qwandor@google.com>2021-08-03 14:20:19 +0000
committerAndrew Walbran <qwandor@google.com>2021-08-03 14:20:19 +0000
commit8dce65084f73d40bb081312769a24b4bd533f667 (patch)
treee2118ad5dbee0370c6ab114bb3974cd9f09a2251 /cras/src/server/cras_a2dp_info.h
parentbcf1f249f11b6865cff3f0d3f0ae5801e67e0e7e (diff)
downloadadhd-android-s-v2-preview-1.tar.gz
This repository will be removed from the manifest change, but Treehugger seems unable to test the manifest change, so this change first removes all files so we can test that instead. Bug: 190503456 Test: m crosvm Change-Id: I133ef3bd8b39035a68113c4da8fe4c637a40daac
Diffstat (limited to 'cras/src/server/cras_a2dp_info.h')
-rw-r--r--cras/src/server/cras_a2dp_info.h89
1 files changed, 0 insertions, 89 deletions
diff --git a/cras/src/server/cras_a2dp_info.h b/cras/src/server/cras_a2dp_info.h
deleted file mode 100644
index b33911e8..00000000
--- a/cras/src/server/cras_a2dp_info.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef CRAS_A2DP_INFO_H_
-#define CRAS_A2DP_INFO_H_
-
-#include "a2dp-codecs.h"
-
-#define A2DP_BUF_SIZE_BYTES 2048
-
-/* Represents the codec and encoded state of a2dp iodev.
- * Members:
- * codec - The codec used to encode PCM buffer to a2dp buffer.
- * a2dp_buf - The buffer to hold encoded frames.
- * codesize - Size of a SBC frame in bytes.
- * frame_length - Size of an encoded SBC frame in bytes.
- * frame_count - Queued SBC frame count currently in a2dp buffer.
- * seq_num - Sequence number in rtp header.
- * samples - Queued PCM frame count currently in a2dp buffer.
- * nsamples - Cumulative number of encoded PCM frames.
- * a2dp_buf_used - Used a2dp buffer counter in bytes.
- */
-struct a2dp_info {
- struct cras_audio_codec *codec;
- uint8_t a2dp_buf[A2DP_BUF_SIZE_BYTES];
- int codesize;
- int frame_length;
- int frame_count;
- uint16_t seq_num;
- int samples;
- int nsamples;
- size_t a2dp_buf_used;
-};
-
-/*
- * Set up codec for given sbc capability.
- */
-int init_a2dp(struct a2dp_info *a2dp, a2dp_sbc_t *sbc);
-
-/*
- * Destroys an a2dp_info.
- */
-void destroy_a2dp(struct a2dp_info *a2dp);
-
-/*
- * Gets the codesize of the SBC codec.
- */
-int a2dp_codesize(struct a2dp_info *a2dp);
-
-/*
- * Gets original size of a2dp encoded bytes.
- */
-int a2dp_block_size(struct a2dp_info *a2dp, int encoded_bytes);
-
-/*
- * Gets the number of queued frames in a2dp_info.
- */
-int a2dp_queued_frames(const struct a2dp_info *a2dp);
-
-/*
- * Empty all queued samples in a2dp_info.
- */
-void a2dp_reset(struct a2dp_info *a2dp);
-
-/*
- * Encodes samples using the codec for this a2dp instance, returns the number of
- * pcm bytes processed.
- * Args:
- * a2dp: The a2dp info object.
- * pcm_buf: The buffer of pcm samples.
- * pcm_buf_size: Size of the pcm buffer.
- * format_bytes: Number of bytes per sample.
- * link_mtu: The maximum transmit unit.
- */
-int a2dp_encode(struct a2dp_info *a2dp, const void *pcm_buf, int pcm_buf_size,
- int format_bytes, size_t link_mtu);
-
-/*
- * Writes samples using a2dp, returns number of frames written.
- * Args:
- * a2dp: The a2dp info object.
- * stream_fd: The file descriptor to send stream to.
- * link_mtu: The maximum transmit unit.
- */
-int a2dp_write(struct a2dp_info *a2dp, int stream_fd, size_t link_mtu);
-
-#endif /* CRAS_A2DP_INFO_H_ */