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

Commit bffc6464 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "link media.metrics native strings to api-controlled java strings"

parents 9413a208 de15b8c1
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -91,11 +91,14 @@ void AudioRecord::MediaMetrics::gather(const AudioRecord *record)
{
    // key for media statistics is defined in the header
    // attrs for media statistics
    static constexpr char kAudioRecordChannelCount[] = "android.media.audiorecord.channels";
    // NB: these are matched with public Java API constants defined
    // in frameworks/base/media/java/android/media/AudioRecord.java
    // These must be kept synchronized with the constants there.
    static constexpr char kAudioRecordEncoding[] = "android.media.audiorecord.encoding";
    static constexpr char kAudioRecordSource[] = "android.media.audiorecord.source";
    static constexpr char kAudioRecordLatency[] = "android.media.audiorecord.latency";
    static constexpr char kAudioRecordSampleRate[] = "android.media.audiorecord.samplerate";
    static constexpr char kAudioRecordSource[] = "android.media.audiotrack.source";
    static constexpr char kAudioRecordChannelCount[] = "android.media.audiorecord.channels";

    // constructor guarantees mAnalyticsItem is valid

+5 −0
Original line number Diff line number Diff line
@@ -185,11 +185,16 @@ void AudioTrack::MediaMetrics::gather(const AudioTrack *track)

    // key for media statistics is defined in the header
    // attrs for media statistics
    // NB: these are matched with public Java API constants defined
    // in frameworks/base/media/java/android/media/AudioTrack.java
    // These must be kept synchronized with the constants there.
    static constexpr char kAudioTrackStreamType[] = "android.media.audiotrack.streamtype";
    static constexpr char kAudioTrackContentType[] = "android.media.audiotrack.type";
    static constexpr char kAudioTrackUsage[] = "android.media.audiotrack.usage";
    static constexpr char kAudioTrackSampleRate[] = "android.media.audiotrack.samplerate";
    static constexpr char kAudioTrackChannelMask[] = "android.media.audiotrack.channelmask";

    // NB: These are not yet exposed as public Java API constants.
    static constexpr char kAudioTrackUnderrunFrames[] = "android.media.audiotrack.underrunframes";
    static constexpr char kAudioTrackStartupGlitch[] = "android.media.audiotrack.glitch.startup";

+5 −0
Original line number Diff line number Diff line
@@ -79,6 +79,9 @@ private:
// key for media statistics
static const char *kKeyPlayer = "nuplayer";
// attrs for media statistics
    // NB: these are matched with public Java API constants defined
    // in frameworks/base/media/java/android/media/MediaPlayer2.java
    // These must be kept synchronized with the constants there.
static const char *kPlayerVMime = "android.media.mediaplayer.video.mime";
static const char *kPlayerVCodec = "android.media.mediaplayer.video.codec";
static const char *kPlayerWidth = "android.media.mediaplayer.width";
@@ -91,6 +94,8 @@ static const char *kPlayerDuration = "android.media.mediaplayer.durationMs";
static const char *kPlayerPlaying = "android.media.mediaplayer.playingMs";
static const char *kPlayerError = "android.media.mediaplayer.err";
static const char *kPlayerErrorCode = "android.media.mediaplayer.errcode";

// NB: These are not yet exposed as public Java API constants.
static const char *kPlayerErrorState = "android.media.mediaplayer.errstate";
static const char *kPlayerDataSourceType = "android.media.mediaplayer.dataSource";
//
+16 −12
Original line number Diff line number Diff line
@@ -69,22 +69,26 @@ static const int kMaxNumVideoTemporalLayers = 8;
// key for media statistics
static const char *kKeyRecorder = "recorder";
// attrs for media statistics
static const char *kRecorderHeight = "android.media.mediarecorder.height";
static const char *kRecorderWidth = "android.media.mediarecorder.width";
static const char *kRecorderFrameRate = "android.media.mediarecorder.frame-rate";
static const char *kRecorderVideoBitrate = "android.media.mediarecorder.video-bitrate";
static const char *kRecorderAudioSampleRate = "android.media.mediarecorder.audio-samplerate";
static const char *kRecorderAudioChannels = "android.media.mediarecorder.audio-channels";
// NB: these are matched with public Java API constants defined
// in frameworks/base/media/java/android/media/MediaRecorder.java
// These must be kept synchronized with the constants there.
static const char *kRecorderAudioBitrate = "android.media.mediarecorder.audio-bitrate";
static const char *kRecorderVideoIframeInterval = "android.media.mediarecorder.video-iframe-interval";
static const char *kRecorderMovieTimescale = "android.media.mediarecorder.movie-timescale";
static const char *kRecorderAudioChannels = "android.media.mediarecorder.audio-channels";
static const char *kRecorderAudioSampleRate = "android.media.mediarecorder.audio-samplerate";
static const char *kRecorderAudioTimescale = "android.media.mediarecorder.audio-timescale";
static const char *kRecorderVideoTimescale = "android.media.mediarecorder.video-timescale";
static const char *kRecorderVideoProfile = "android.media.mediarecorder.video-encoder-profile";
static const char *kRecorderVideoLevel = "android.media.mediarecorder.video-encoder-level";
static const char *kRecorderCaptureFpsEnable = "android.media.mediarecorder.capture-fpsenable";
static const char *kRecorderCaptureFps = "android.media.mediarecorder.capture-fps";
static const char *kRecorderCaptureFpsEnable = "android.media.mediarecorder.capture-fpsenable";
static const char *kRecorderFrameRate = "android.media.mediarecorder.frame-rate";
static const char *kRecorderHeight = "android.media.mediarecorder.height";
static const char *kRecorderMovieTimescale = "android.media.mediarecorder.movie-timescale";
static const char *kRecorderRotation = "android.media.mediarecorder.rotation";
static const char *kRecorderVideoBitrate = "android.media.mediarecorder.video-bitrate";
static const char *kRecorderVideoIframeInterval = "android.media.mediarecorder.video-iframe-interval";
static const char *kRecorderVideoLevel = "android.media.mediarecorder.video-encoder-level";
static const char *kRecorderVideoProfile = "android.media.mediarecorder.video-encoder-profile";
static const char *kRecorderVideoTimescale = "android.media.mediarecorder.video-timescale";
static const char *kRecorderWidth = "android.media.mediarecorder.width";


// To collect the encoder usage for the battery app
static void addBatteryData(uint32_t params) {
+5 −0
Original line number Diff line number Diff line
@@ -43,6 +43,9 @@ namespace android {
// key for media statistics
static const char *kKeyPlayer = "nuplayer";
// attrs for media statistics
    // NB: these are matched with public Java API constants defined
    // in frameworks/base/media/java/android/media/MediaPlayer.java
    // These must be kept synchronized with the constants there.
static const char *kPlayerVMime = "android.media.mediaplayer.video.mime";
static const char *kPlayerVCodec = "android.media.mediaplayer.video.codec";
static const char *kPlayerWidth = "android.media.mediaplayer.width";
@@ -55,6 +58,8 @@ static const char *kPlayerDuration = "android.media.mediaplayer.durationMs";
static const char *kPlayerPlaying = "android.media.mediaplayer.playingMs";
static const char *kPlayerError = "android.media.mediaplayer.err";
static const char *kPlayerErrorCode = "android.media.mediaplayer.errcode";

    // NB: These are not yet exposed as public Java API constants.
static const char *kPlayerErrorState = "android.media.mediaplayer.errstate";
static const char *kPlayerDataSourceType = "android.media.mediaplayer.dataSource";
//
Loading