Add session ID

Add new session-id key to Media Format and MediaMetrics.

Bug: b/180037783
Test: set session ID in app and print log in native code.

Change-Id: I405dd64545d1e605eed9ab8626cd81cda4b94d64
This commit is contained in:
Dichen Zhang
2021-02-23 15:39:40 -08:00
committed by shubang
parent 0aa964394e
commit 7dce143de3
2 changed files with 9 additions and 1 deletions

View File

@@ -1684,7 +1684,6 @@ final public class MediaCodec {
private MediaCodecInfo mCodecInfo;
private final Object mCodecInfoLock = new Object();
private MediaCrypto mCrypto;
private String mPlaybackId;
private static final int EVENT_CALLBACK = 1;
private static final int EVENT_SET_CALLBACK = 2;

View File

@@ -218,6 +218,15 @@ public final class MediaFormat {
@UnsupportedAppUsage
private Map<String, Object> mMap;
/**
* A key describing the log session ID for MediaCodec. The log session ID is a random 32-byte
* hexadecimal string that is used to associate metrics from multiple media codec instances
* to the same playback or recording session.
* The associated value is a string.
* @hide
*/
public static final String LOG_SESSION_ID = "log-session-id";
/**
* A key describing the mime type of the MediaFormat.
* The associated value is a string.