OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 PPAPI_CPP_PRIVATE_VIDEO_FRAME_PRIVATE_H_ | 5 #ifndef PPAPI_CPP_PRIVATE_VIDEO_FRAME_PRIVATE_H_ |
6 #define PPAPI_CPP_PRIVATE_VIDEO_FRAME_PRIVATE_H_ | 6 #define PPAPI_CPP_PRIVATE_VIDEO_FRAME_PRIVATE_H_ |
7 | 7 |
| 8 #include <string.h> |
| 9 |
8 #include "ppapi/c/pp_time.h" | 10 #include "ppapi/c/pp_time.h" |
9 #include "ppapi/c/private/pp_video_frame_private.h" | 11 #include "ppapi/c/private/pp_video_frame_private.h" |
10 #include "ppapi/cpp/completion_callback.h" | 12 #include "ppapi/cpp/completion_callback.h" |
11 #include "ppapi/cpp/image_data.h" | 13 #include "ppapi/cpp/image_data.h" |
12 #include "ppapi/cpp/pass_ref.h" | 14 #include "ppapi/cpp/pass_ref.h" |
13 | 15 |
14 /// @file | 16 /// @file |
15 /// This file defines the struct used to hold a video frame. | 17 /// This file defines the struct used to hold a video frame. |
16 | 18 |
17 namespace pp { | 19 namespace pp { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 typedef PP_VideoFrame_Private* APIArgType; | 82 typedef PP_VideoFrame_Private* APIArgType; |
81 typedef PP_VideoFrame_Private StorageType; | 83 typedef PP_VideoFrame_Private StorageType; |
82 | 84 |
83 static inline APIArgType StorageToAPIArg(StorageType& t) { | 85 static inline APIArgType StorageToAPIArg(StorageType& t) { |
84 return &t; | 86 return &t; |
85 } | 87 } |
86 | 88 |
87 static inline pp::VideoFrame_Private StorageToPluginArg(StorageType& t) { | 89 static inline pp::VideoFrame_Private StorageToPluginArg(StorageType& t) { |
88 return pp::VideoFrame_Private(PASS_REF, t); | 90 return pp::VideoFrame_Private(PASS_REF, t); |
89 } | 91 } |
| 92 |
| 93 static inline void Initialize(StorageType* t) { |
| 94 VideoFrame_Private dummy; |
| 95 *t = dummy.pp_video_frame(); |
| 96 } |
90 }; | 97 }; |
91 | 98 |
92 } // namespace internal | 99 } // namespace internal |
93 | 100 |
94 } // namespace pp | 101 } // namespace pp |
95 | 102 |
96 #endif // PPAPI_CPP_PRIVATE_VIDEO_FRAME_PRIVATE_H_ | 103 #endif // PPAPI_CPP_PRIVATE_VIDEO_FRAME_PRIVATE_H_ |
OLD | NEW |