Struct tBTA_AV_SCB

Synopsis

#include <bta/av/bta_av_int.h>

struct tBTA_AV_SCB final

Description

No description yet.

Methods

AvdtpVersionGet the AVDTP version of the peer device.
IsAssignedCheck whether the entry is assigned and currenty used.
OnConnectedCalled to setup the state when connected to a peer.
OnDisconnectedCalled to clear the state when disconnected from a peer.
PeerAddressGet the peer address.
SetAvdtpVersionSet the AVDTP version of the peer device.

Source

Lines 459-558 in bta/av/bta_av_int.h.

struct tBTA_AV_SCB final {
 public:
  const tBTA_AV_ACT* p_act_tbl; /* the action table for stream state machine */
  const tBTA_AV_CO_FUNCTS* p_cos; /* the associated callout functions */
  bool sdp_discovery_started; /* variable to determine whether SDP is started */
  tBTA_AV_SEP seps[BTAV_A2DP_CODEC_INDEX_MAX];
  AvdtpSepConfig peer_cap; /* buffer used for get capabilities */
  list_t* a2dp_list; /* used for audio channels only */
  tBTA_AV_Q_INFO q_info;
  tAVDT_SEP_INFO sep_info[BTA_AV_NUM_SEPS]; /* stream discovery results */
  AvdtpSepConfig cfg;                       /* local SEP configuration */
  alarm_t* avrc_ct_timer;                   /* delay timer for AVRC CT */
  uint16_t l2c_cid;                         /* L2CAP channel ID */
  uint16_t stream_mtu;                      /* MTU of stream */
  tBTA_SEC sec_mask;          /* security mask */
  uint8_t media_type;         /* Media type: AVDT_MEDIA_TYPE_* */
  bool cong;                  /* true if AVDTP congested */
  tBTA_AV_STATUS open_status; /* open failure status */
  tBTA_AV_CHNL chnl;          /* the channel: audio/video */
  tBTA_AV_HNDL hndl;          /* the handle: ((hdi + 1)|chnl) */
  uint16_t cur_psc_mask;      /* Protocol service capabilities mask for current
                                 connection */
  uint8_t avdt_handle;        /* AVDTP handle */
  uint8_t hdi;                /* the index to SCB[] */
  uint8_t num_seps;           /* number of seps returned by stream discovery */
  uint8_t num_disc_snks;      /* number of discovered snks */
  uint8_t num_disc_srcs;      /* number of discovered srcs */
  uint8_t sep_info_idx;       /* current index into sep_info */
  uint8_t sep_idx;            /* current index into local seps[] */
  uint8_t rcfg_idx;           /* reconfig requested index into sep_info */
  uint8_t state;              /* state machine state */
  uint8_t avdt_label;         /* AVDTP label */
  uint8_t app_id;             /* application id */
  uint8_t num_recfg;          /* number of reconfigure sent */
  uint8_t role;
  uint8_t l2c_bufs;  /* the number of buffers queued to L2CAP */
  uint8_t rc_handle; /* connected AVRCP handle */
  bool use_rc;       /* true if AVRCP is allowed */
  bool started;      /* true if stream started */
  bool use_rtp_header_marker_bit; /* true if the encoded data packets have RTP
                                   * headers, and the Marker bit in the header
                                   * is set according to RFC 6416 */
  uint8_t
      co_started;    /* non-zero, if stream started from call-out perspective */
  bool recfg_sup;    /* true if the first attempt to reconfigure the stream was
                        successfull, else False if command fails */
  bool suspend_sup;  /* true if Suspend stream is supported, else false if
                        suspend command fails */
  bool deregistering; /* true if deregistering */
  bool sco_suspend;  /* true if SUSPEND is issued automatically for SCO */
  uint8_t coll_mask; /* Mask to check incoming and outgoing collision */
  tBTA_AV_API_OPEN open_api; /* Saved OPEN api message */
  uint8_t wait;  /* set 0x1, when getting Caps as ACP, set 0x2, when started */
  uint8_t q_tag; /* identify the associated q_info union member */
  bool no_rtp_header; /* true if add no RTP header */
  uint16_t uuid_int; /*intended UUID of Initiator to connect to */
  bool offload_start_pending;
  bool offload_started;

  /**
   * Called to setup the state when connected to a peer.
   *
   * @param peer_address the peer address
   */
  void OnConnected(const RawAddress& peer_address);

  /**
   * Called to clear the state when disconnected from a peer.
   *
   */
  void OnDisconnected();

  /**
   * Get the peer address.
   */
  const RawAddress& PeerAddress() const { return peer_address_; }

  /**
   * Get the AVDTP version of the peer device.
   */
  uint16_t AvdtpVersion() const { return avdtp_version_; }

  /**
   * Set the AVDTP version of the peer device.
   *
   * @param avdtp_version the AVDTP version to use
   */
  void SetAvdtpVersion(uint16_t avdtp_version);

  /**
   * Check whether the entry is assigned and currenty used.
   *
   * @return true if the entry is assigned and currently used
   */
  bool IsAssigned() const { return !peer_address_.IsEmpty(); }

 private:
  RawAddress peer_address_;  // Peer address
  uint16_t avdtp_version_;   // The AVDTP version of the peer device
};





Add Discussion as Guest

Log in to DocsForge