Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89f6c846 authored by Yuyang Huang's avatar Yuyang Huang Committed by Gerrit Code Review
Browse files

Merge "add implementation for StopRequest and GetPresentationPosition" into main

parents 4f572bd6 b35c8d2f
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -121,12 +121,6 @@ BluetoothAudioCtrlAck HfpTransport::SuspendRequest() {

void HfpTransport::SetLatencyMode(LatencyMode latency_mode) {}

bool GetPresentationPosition(uint64_t* remote_delay_report_ns,
                             uint64_t* total_bytes_read,
                             timespec* data_position) {
  return false;
}

void HfpTransport::SourceMetadataChanged(
    const source_metadata_v7_t& source_metadata) {}

@@ -134,6 +128,12 @@ void HfpTransport::SinkMetadataChanged(const sink_metadata_v7_t&) {}

void HfpTransport::ResetPresentationPosition() {}

bool HfpTransport::GetPresentationPosition(uint64_t* remote_delay_report_ns,
                                           uint64_t* total_bytes_read,
                                           timespec* data_position) {
  return false;
}

// Source / sink functions
HfpDecodingTransport::HfpDecodingTransport(SessionType session_type)
    : IBluetoothSinkTransportInstance(session_type, (AudioConfiguration){}) {
@@ -185,6 +185,8 @@ uint8_t HfpDecodingTransport::GetPendingCmd() const {

void HfpDecodingTransport::ResetPendingCmd() { transport_->ResetPendingCmd(); }

void HfpDecodingTransport::StopRequest() { transport_->StopRequest(); }

HfpEncodingTransport::HfpEncodingTransport(SessionType session_type)
    : IBluetoothSourceTransportInstance(session_type, (AudioConfiguration){}) {
  transport_ = new HfpTransport();
@@ -200,6 +202,8 @@ BluetoothAudioCtrlAck HfpEncodingTransport::SuspendRequest() {
  return transport_->SuspendRequest();
}

void HfpEncodingTransport::StopRequest() { transport_->StopRequest(); }

void HfpEncodingTransport::SetLatencyMode(LatencyMode latency_mode) {
  transport_->SetLatencyMode(latency_mode);
}