Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Side by Side Diff: media/mojo/common/pipeline_statistics_struct_traits.h

Issue 2253293002: Mojo C++ bindings: change the first template parameter of StructTraits and UnionTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@91_extra
Patch Set: rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_MOJO_COMMON_PIPELINE_STATISTICS_STRUCT_TRAITS_H_ 5 #ifndef MEDIA_MOJO_COMMON_PIPELINE_STATISTICS_STRUCT_TRAITS_H_
6 #define MEDIA_MOJO_COMMON_PIPELINE_STATISTICS_STRUCT_TRAITS_H_ 6 #define MEDIA_MOJO_COMMON_PIPELINE_STATISTICS_STRUCT_TRAITS_H_
7 7
8 #include "media/base/pipeline_status.h" 8 #include "media/base/pipeline_status.h"
9 #include "media/mojo/interfaces/media_types.mojom.h" 9 #include "media/mojo/interfaces/media_types.mojom.h"
10 10
11 namespace mojo { 11 namespace mojo {
12 12
13 template <> 13 template <>
14 struct StructTraits<media::mojom::PipelineStatistics, 14 struct StructTraits<media::mojom::PipelineStatisticsDataView,
15 media::PipelineStatistics> { 15 media::PipelineStatistics> {
16 static uint64_t audio_bytes_decoded(const media::PipelineStatistics& input) { 16 static uint64_t audio_bytes_decoded(const media::PipelineStatistics& input) {
17 return input.audio_bytes_decoded; 17 return input.audio_bytes_decoded;
18 } 18 }
19 static uint64_t video_bytes_decoded(const media::PipelineStatistics& input) { 19 static uint64_t video_bytes_decoded(const media::PipelineStatistics& input) {
20 return input.video_bytes_decoded; 20 return input.video_bytes_decoded;
21 } 21 }
22 static uint32_t video_frames_decoded(const media::PipelineStatistics& input) { 22 static uint32_t video_frames_decoded(const media::PipelineStatistics& input) {
23 return input.video_frames_decoded; 23 return input.video_frames_decoded;
24 } 24 }
(...skipping 14 matching lines...) Expand all
39 output->video_frames_decoded = data.video_frames_decoded(); 39 output->video_frames_decoded = data.video_frames_decoded();
40 output->video_frames_dropped = data.video_frames_dropped(); 40 output->video_frames_dropped = data.video_frames_dropped();
41 output->audio_memory_usage = data.audio_memory_usage(); 41 output->audio_memory_usage = data.audio_memory_usage();
42 output->video_memory_usage = data.video_memory_usage(); 42 output->video_memory_usage = data.video_memory_usage();
43 return true; 43 return true;
44 } 44 }
45 }; 45 };
46 46
47 } // namespace mojo 47 } // namespace mojo
48 48
49 #endif // MEDIA_MOJO_COMMON_PIPELINE_STATISTICS_STRUCT_TRAITS_H_ 49 #endif // MEDIA_MOJO_COMMON_PIPELINE_STATISTICS_STRUCT_TRAITS_H_
OLDNEW
« no previous file with comments | « gpu/ipc/common/sync_token_struct_traits.h ('k') | mojo/common/common_custom_types_struct_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698