1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47

media / base / media_log_properties.cc [blame]

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "media/base/media_log_properties.h"

#include <string>

namespace media {

std::string MediaLogPropertyKeyToString(MediaLogProperty property) {
#define STRINGIFY(value)        \
  case MediaLogProperty::value: \
    return #value
  switch (property) {
    STRINGIFY(kResolution);
    STRINGIFY(kTotalBytes);
    STRINGIFY(kBitrate);
    STRINGIFY(kMaxDuration);
    STRINGIFY(kStartTime);
    STRINGIFY(kSetCdm);
    STRINGIFY(kIsCdmAttached);
    STRINGIFY(kIsStreaming);
    STRINGIFY(kFrameUrl);
    STRINGIFY(kFrameTitle);
    STRINGIFY(kIsSingleOrigin);
    STRINGIFY(kRendererName);
    STRINGIFY(kVideoDecoderName);
    STRINGIFY(kIsPlatformVideoDecoder);
    STRINGIFY(kIsRangeHeaderSupported);
    STRINGIFY(kIsVideoDecryptingDemuxerStream);
    STRINGIFY(kIsAudioDecryptingDemuxerStream);
    STRINGIFY(kVideoEncoderName);
    STRINGIFY(kIsPlatformVideoEncoder);
    STRINGIFY(kAudioDecoderName);
    STRINGIFY(kIsPlatformAudioDecoder);
    STRINGIFY(kAudioTracks);
    STRINGIFY(kVideoTracks);
    STRINGIFY(kFramerate);
    STRINGIFY(kVideoPlaybackRoughness);
    STRINGIFY(kVideoPlaybackFreezing);
    STRINGIFY(kHlsBufferedRanges);
  }
#undef STRINGIFY
}

}  // namespace media