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

Side by Side Diff: media/mojo/interfaces/video_frame_struct_traits.h

Issue 2933573003: media: Followup changes to VideoFrame StructTraits. (Closed)
Patch Set: const& Created 3 years, 6 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_INTERFACES_VIDEO_FRAME_STRUCT_TRAITS_H_ 5 #ifndef MEDIA_MOJO_INTERFACES_VIDEO_FRAME_STRUCT_TRAITS_H_
6 #define MEDIA_MOJO_INTERFACES_VIDEO_FRAME_STRUCT_TRAITS_H_ 6 #define MEDIA_MOJO_INTERFACES_VIDEO_FRAME_STRUCT_TRAITS_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "gpu/ipc/common/mailbox_holder_struct_traits.h" 9 #include "gpu/ipc/common/mailbox_holder_struct_traits.h"
10 #include "media/base/ipc/media_param_traits_macros.h" 10 #include "media/base/ipc/media_param_traits_macros.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 static const gfx::Rect& visible_rect( 45 static const gfx::Rect& visible_rect(
46 const scoped_refptr<media::VideoFrame>& input) { 46 const scoped_refptr<media::VideoFrame>& input) {
47 return input->visible_rect(); 47 return input->visible_rect();
48 } 48 }
49 49
50 static const gfx::Size& natural_size( 50 static const gfx::Size& natural_size(
51 const scoped_refptr<media::VideoFrame>& input) { 51 const scoped_refptr<media::VideoFrame>& input) {
52 return input->natural_size(); 52 return input->natural_size();
53 } 53 }
54 54
55 static bool end_of_stream(const scoped_refptr<media::VideoFrame>& input) {
56 return input->metadata()->IsTrue(media::VideoFrameMetadata::END_OF_STREAM);
57 }
58
59 static base::TimeDelta timestamp( 55 static base::TimeDelta timestamp(
60 const scoped_refptr<media::VideoFrame>& input) { 56 const scoped_refptr<media::VideoFrame>& input) {
61 return input->timestamp(); 57 return input->timestamp();
62 } 58 }
63 59
64 static media::mojom::VideoFrameDataPtr& data( 60 static media::mojom::VideoFrameDataPtr& data(
65 const scoped_refptr<media::VideoFrame>& input, 61 const scoped_refptr<media::VideoFrame>& input,
66 void* context); 62 void* context);
67 63
68 static bool Read(media::mojom::VideoFrameDataView input, 64 static bool Read(media::mojom::VideoFrameDataView input,
69 scoped_refptr<media::VideoFrame>* output); 65 scoped_refptr<media::VideoFrame>* output);
70 }; 66 };
71 67
72 } // namespace mojo 68 } // namespace mojo
73 69
74 #endif // MEDIA_MOJO_INTERFACES_VIDEO_FRAME_STRUCT_TRAITS_H_ 70 #endif // MEDIA_MOJO_INTERFACES_VIDEO_FRAME_STRUCT_TRAITS_H_
OLDNEW
« no previous file with comments | « media/mojo/interfaces/media_types.mojom ('k') | media/mojo/interfaces/video_frame_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698