[go: nahoru, domu]

blob: 09e3c04510f87402bf097eb2bc373dc5cdc5577c [file] [log] [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/mojo/mojom/supported_video_decoder_config_mojom_traits.h"
namespace mojo {
// static
bool StructTraits<media::mojom::SupportedVideoDecoderConfigDataView,
media::SupportedVideoDecoderConfig>::
Read(media::mojom::SupportedVideoDecoderConfigDataView input,
media::SupportedVideoDecoderConfig* output) {
if (!input.ReadProfileMin(&output->profile_min))
return false;
if (!input.ReadProfileMax(&output->profile_max))
return false;
if (!input.ReadCodedSizeMin(&output->coded_size_min))
return false;
if (!input.ReadCodedSizeMax(&output->coded_size_max))
return false;
output->allow_encrypted = input.allow_encrypted();
output->require_encrypted = input.require_encrypted();
return true;
}
} // namespace mojo