chromium/media/base/media_serializers_base.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_BASE_MEDIA_SERIALIZERS_BASE_H_
#define MEDIA_BASE_MEDIA_SERIALIZERS_BASE_H_

#include <vector>

#include "base/strings/string_util.h"
#include "base/values.h"
#include "media/base/media_export.h"

namespace media {

namespace internal {

// Serializer specializer struct.
// All the types that base::Value's constructor can take should be passed
// by non-const values. (int, bool, std::string, char*, etc).
template <typename T>
struct MediaSerializer {};

// a special serializer for strings, because base::Value checks
// IsStringUTF8AllowingNoncharacters.
template <>
struct MediaSerializer<std::string> {};

}  // namespace internal

template <typename T>
base::Value MediaSerialize(const T& t) {}

}  // namespace media

#endif  // MEDIA_BASE_MEDIA_SERIALIZERS_BASE_H_