chromium/media/gpu/chromeos/fourcc.h

// 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.

#ifndef MEDIA_GPU_CHROMEOS_FOURCC_H_
#define MEDIA_GPU_CHROMEOS_FOURCC_H_

#include <stdint.h>

#include <optional>
#include <string>

#include "media/base/video_types.h"
#include "media/gpu/buildflags.h"
#include "media/gpu/media_gpu_export.h"

namespace media {

// Composes a Fourcc value.
constexpr uint32_t ComposeFourcc(char a, char b, char c, char d) {}

// Fourcc enum holder and converters.
// Usage:
// Fourcc f1(Fourcc::NV12);
// EXPECT_EQ("NV12", f1.ToString());
// Fourcc f2 = Fourcc::FromVideoPixelFormat(PIXEL_FORMAT_NV12);
// EXPECT_EQ(f2, f1);
class MEDIA_GPU_EXPORT Fourcc {};

MEDIA_GPU_EXPORT bool operator!=(const Fourcc& lhs, const Fourcc& rhs);

}  // namespace media

#endif  // MEDIA_GPU_CHROMEOS_FOURCC_H_