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

Commit 559c20d4 authored by bodamnam's avatar bodamnam
Browse files

Modify the api definition in the ImsMedia HAL for AV sync

For more accurate calculation of incoming packet latency and improved inter-media synchronization, modify the AVSync API's request to use the RTCP-SR report's NTP timestamp. This absolute timestamp facilitates cross-media comparisons.

Bug: 321878340
Test: mm
Change-Id: I9980ac832095d1caf82c42e17307c83522de4b3e
parent cadbe176
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -35,8 +35,8 @@ package android.hardware.radio.ims.media;
@VintfStability
parcelable RtpReceptionStats {
  int rtpTimestamp;
  int rtpSequenceNumber;
  int timeDurationMs;
  int rtcpSrTimestamp;
  long rtcpSrNtpTimestamp;
  int jitterBufferMs;
  int roundTripTimeMs;
}
+1 −2
Original line number Diff line number Diff line
@@ -110,8 +110,7 @@ oneway interface IImsMediaSession {
     * Adjust the delay in the jitter buffer to synchronize the audio with the time of video
     * frames
     *
     * @param delayMs The delay to apply to the jitter buffer. If it is positive, the jitter
     * buffer increases the delay, if it is negative, the jitter buffer decreases the delay.
     * @param delayMs The additional delay to the jitter buffer in milliseconds.
     *
     * This is available when android.hardware.telephony.ims is defined.
     */
+12 −5
Original line number Diff line number Diff line
@@ -20,12 +20,19 @@ package android.hardware.radio.ims.media;
parcelable RtpReceptionStats {
    /** The timestamp of the latest RTP packet received */
    int rtpTimestamp;
    /** The sequence number of latest RTP packet received */
    int rtpSequenceNumber;
    /** The system clock time in millisecond of latest RTP packet received */
    int timeDurationMs;
    /** The jitter buffer size in millisecond when latest RTP packet received */

    /** The timestamp of the latest RTCP-SR packet received */
    int rtcpSrTimestamp;

    /** The NTP timestamp of latest RTCP-SR packet received */
    long rtcpSrNtpTimestamp;

    /**
     * The mean jitter buffer delay of a media stream from received to playback, measured in
     *  milliseconds, within the reporting interval
     */
    int jitterBufferMs;

    /** The round trip time delay in millisecond when latest RTP packet received */
    int roundTripTimeMs;
}