chromium/media/base/video_codecs.h

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

#ifndef MEDIA_BASE_VIDEO_CODECS_H_
#define MEDIA_BASE_VIDEO_CODECS_H_

#include <stdint.h>

#include <string>

#include "media/base/media_export.h"

namespace media {

// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.media
enum class VideoCodec {};

// Video codec profiles. Keep in sync with mojo::VideoCodecProfile (see
// media/mojo/mojom/media_types.mojom), gpu::VideoCodecProfile (see
// gpu/config/gpu_info.h), and PP_VideoDecoder_Profile (translation is performed
// in content/renderer/pepper/ppb_video_decoder_impl.cc).
// NOTE: These values are histogrammed over time in UMA so the values must never
// ever change (add new values to tools/metrics/histograms/histograms.xml)
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.media
enum VideoCodecProfile {};

VideoCodecLevel;
constexpr VideoCodecLevel kNoVideoCodecLevel =;

struct CodecProfileLevel {};

// Returns a name for `codec` for logging and display purposes.
MEDIA_EXPORT std::string GetCodecName(VideoCodec codec);

// Returns a name for `codec` to be used for UMA reporting.
MEDIA_EXPORT std::string GetCodecNameForUMA(VideoCodec codec);

MEDIA_EXPORT std::string GetProfileName(VideoCodecProfile profile);

MEDIA_EXPORT std::string BuildH264MimeSuffix(VideoCodecProfile profile,
                                             uint8_t level);

MEDIA_EXPORT VideoCodec
VideoCodecProfileToVideoCodec(VideoCodecProfile profile);

MEDIA_EXPORT std::ostream& operator<<(std::ostream& os,
                                      const VideoCodec& codec);

}  // namespace media

#endif  // MEDIA_BASE_VIDEO_CODECS_H_