[M120 Migration][MM] Framerate calculation
[platform/framework/web/chromium-efl.git] / media / mojo / mojom / supported_video_decoder_config_mojom_traits.cc
1 // Copyright 2019 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "media/mojo/mojom/supported_video_decoder_config_mojom_traits.h"
6
7 namespace mojo {
8
9 // static
10 bool StructTraits<media::mojom::SupportedVideoDecoderConfigDataView,
11                   media::SupportedVideoDecoderConfig>::
12     Read(media::mojom::SupportedVideoDecoderConfigDataView input,
13          media::SupportedVideoDecoderConfig* output) {
14   if (!input.ReadProfileMin(&output->profile_min))
15     return false;
16
17   if (!input.ReadProfileMax(&output->profile_max))
18     return false;
19
20   if (!input.ReadCodedSizeMin(&output->coded_size_min))
21     return false;
22
23   if (!input.ReadCodedSizeMax(&output->coded_size_max))
24     return false;
25
26   output->allow_encrypted = input.allow_encrypted();
27   output->require_encrypted = input.require_encrypted();
28
29   return true;
30 }
31
32 }  // namespace mojo