diff options
-rw-r--r-- | native_client_sdk/src/libraries/ppapi/library.dsc | 2 | ||||
-rw-r--r-- | native_client_sdk/src/libraries/ppapi_cpp/library.dsc | 4 | ||||
-rw-r--r-- | ppapi/api/ppb_media_stream_video_track.idl | 124 | ||||
-rw-r--r-- | ppapi/api/ppb_video_frame.idl | 121 | ||||
-rw-r--r-- | ppapi/c/pp_macros.h | 4 | ||||
-rw-r--r-- | ppapi/c/ppb_media_stream_video_track.h | 138 | ||||
-rw-r--r-- | ppapi/c/ppb_video_frame.h | 139 | ||||
-rw-r--r-- | ppapi/cpp/media_stream_video_track.cc | 99 | ||||
-rw-r--r-- | ppapi/cpp/media_stream_video_track.h | 122 | ||||
-rw-r--r-- | ppapi/cpp/video_frame.cc | 77 | ||||
-rw-r--r-- | ppapi/cpp/video_frame.h | 75 | ||||
-rw-r--r-- | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c | 63 | ||||
-rw-r--r-- | ppapi/ppapi_sources.gypi | 4 | ||||
-rw-r--r-- | ppapi/tests/all_c_includes.h | 2 | ||||
-rw-r--r-- | ppapi/tests/all_cpp_includes.h | 2 |
15 files changed, 974 insertions, 2 deletions
diff --git a/native_client_sdk/src/libraries/ppapi/library.dsc b/native_client_sdk/src/libraries/ppapi/library.dsc index 0c929ab..a0edb20 100644 --- a/native_client_sdk/src/libraries/ppapi/library.dsc +++ b/native_client_sdk/src/libraries/ppapi/library.dsc @@ -35,6 +35,7 @@ 'ppb_image_data.h', 'ppb_input_event.h', 'ppb_instance.h', + 'ppb_media_stream_video_track.h', 'ppb_message_loop.h', 'ppb_messaging.h', 'ppb_mouse_cursor.h', @@ -55,6 +56,7 @@ 'ppb_var_array.h', 'ppb_var_dictionary.h', 'ppb_var.h', + 'ppb_video_frame.h', 'ppb_view.h', 'ppb_websocket.h', 'pp_completion_callback.h', diff --git a/native_client_sdk/src/libraries/ppapi_cpp/library.dsc b/native_client_sdk/src/libraries/ppapi_cpp/library.dsc index 26d4f0c..63d0c8c 100644 --- a/native_client_sdk/src/libraries/ppapi_cpp/library.dsc +++ b/native_client_sdk/src/libraries/ppapi_cpp/library.dsc @@ -33,6 +33,7 @@ 'input_event.cc', 'instance.cc', 'instance_handle.cc', + 'media_stream_video_track.cc', 'message_loop.cc', 'module.cc', 'mouse_cursor.cc', @@ -54,6 +55,7 @@ 'var_array.cc', 'var.cc', 'var_dictionary.cc', + 'video_frame.cc', 'view.cc', 'websocket.cc', @@ -125,6 +127,7 @@ 'instance.h', 'instance_handle.h', 'logging.h', + 'media_stream_video_track.h', 'message_loop.h', 'module_embedder.h', 'module.h', @@ -152,6 +155,7 @@ 'var_array.h', 'var_dictionary.h', 'var.h', + 'video_frame.h', 'view.h', 'websocket.h', ], diff --git a/ppapi/api/ppb_media_stream_video_track.idl b/ppapi/api/ppb_media_stream_video_track.idl new file mode 100644 index 0000000..f6e1238 --- /dev/null +++ b/ppapi/api/ppb_media_stream_video_track.idl @@ -0,0 +1,124 @@ +/* Copyright 2014 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/** + * Defines the <code>PPB_MediaStreamVideoTrack</code> interface. Used for + * receiving video frames from a MediaStream video track in the browser. + * This interface is still in development (Dev API status) and may change. + */ +label Chrome { + [channel=dev] M34 = 0.1 +}; + +/** + */ +interface PPB_MediaStreamVideoTrack { + /** + * Determines if a resource is a MediaStream video track resource. + * + * @param[in] resource The <code>PP_Resource</code> to test. + * + * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given + * resource is a Mediastream video track resource or <code>PP_FALSE</code> + * otherwise. + */ + PP_Bool IsMediaStreamVideoTrack([in] PP_Resource resource); + + /** + * Configures underlying frame buffers for incoming frames. + * If the application doesn't want to drop frames, then the + * <code>max_buffered_frames</code> should be chosen such that inter-frame + * processing time variability won't overrun the input buffer. If the buffer + * is overfilled, then frames will be dropped. The application can detect + * this by examining the timestamp on returned frames. + * If <code>Configure()</code> is not used, default settings will be used. + * + * @param[in] video_track A <code>PP_Resource</code> corresponding to a video + * resource. + * @param[in] max_buffered_frames The maximum number of video frames to + * hold in the input buffer. + * + * @return An int32_t containing a result code from <code>pp_errors.h</code>. + */ + int32_t Configure([in] PP_Resource video_track, + [in] uint32_t max_buffered_frames); + + /** + * Returns the track ID of the underlying MediaStream video track. + * + * @param[in] video_track The <code>PP_Resource</code> to check. + * + * @return A <code>PP_Var</code> containing the MediaStream track ID as + * a string. + */ + PP_Var GetId([in] PP_Resource video_track); + + /** + * Checks whether the underlying MediaStream track has ended. + * Calls to GetFrame while the track has ended are safe to make and will + * complete, but will fail. + * + * @param[in] video_track The <code>PP_Resource</code> to check. + * + * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given + * MediaStream track has ended or <code>PP_FALSE</code> otherwise. + */ + PP_Bool HasEnded([in] PP_Resource video_track); + + /** + * Gets the next video frame from the MediaStream track. + * If internal processing is slower than the incoming frame rate, new frames + * will be dropped from the incoming stream. Once the input buffer is full, + * frames will be dropped until <code>RecycleFrame()</code> is called to free + * a spot for another frame to be buffered. + * If there are no frames in the input buffer, + * <code>PP_OK_COMPLETIONPENDING</code> will be returned immediately and the + * <code>callback</code> will be called, when a new frame is received or an + * error happens. + * If the caller holds a frame returned by the previous call of + * <code>GetFrame()</code>, <code>PP_ERROR_INPROGRESS</code> will be returned. + * The caller should recycle the previous frame before getting the next frame. + * + * @param[in] video_track A <code>PP_Resource</code> corresponding to a video + * resource. + * @param[out] frame A <code>PP_Resource</code> corresponding to a VideoFrame + * resource. + * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon + * completion of GetFrame(). + * + * @return An int32_t containing a result code from <code>pp_errors.h</code>. + * Returns PP_ERROR_NOMEMORY if <code>max_buffered_frames</code> frames buffer + * was not allocated successfully. + */ + int32_t GetFrame([in] PP_Resource video_track, + [out] PP_Resource frame, + [in] PP_CompletionCallback callback); + + /** + * Recycles a frame returned by <code>GetFrame()</code>, so the track can + * reuse the underlying buffer of this frame. And the frame will become + * invalid. The caller should release all references it holds to + * <code>frame</code> and not use it anymore. + * + * @param[in] video_track A <code>PP_Resource</code> corresponding to a video + * resource. + * @param[in] frame A <code>PP_Resource</code> corresponding to a VideoFrame + * resource returned by <code>GetFrame()</code>. + * + * @return An int32_t containing a result code from <code>pp_errors.h</code>. + */ + int32_t RecycleFrame([in] PP_Resource video_track, + [in] PP_Resource frame); + + /** + * Closes the MediaStream video track and disconnects it from video source. + * After calling <code>Close()</code>, no new frames will be received. + * + * @param[in] video_track A <code>PP_Resource</code> corresponding to a + * MediaStream video track resource. + */ + void Close([in] PP_Resource video_track); +}; + diff --git a/ppapi/api/ppb_video_frame.idl b/ppapi/api/ppb_video_frame.idl new file mode 100644 index 0000000..1cb8336 --- /dev/null +++ b/ppapi/api/ppb_video_frame.idl @@ -0,0 +1,121 @@ +/* Copyright 2014 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/** + * Defines the <code>PPB_VideoFrame</code> interface. + */ +label Chrome { + [channel=dev] M34 = 0.1 +}; + +enum PP_VideoFrame_Format { + /** + * Unknown format value. + */ + PP_VIDEOFRAME_FORMAT_UNKNOWN = 0, + + /** + * 12bpp YVU planar 1x1 Y, 2x2 VU samples. + */ + PP_VIDEOFRAME_FORMAT_YV12 = 1, + + /** + * 16bpp YVU planar 1x1 Y, 2x1 VU samples. + */ + PP_VIDEOFRAME_FORMAT_YV16 = 2, + + /** + * 12bpp YVU planar 1x1 Y, 2x2 VU samples. + */ + PP_VIDEOFRAME_FORMAT_I420 = 3, + + /** + * 20bpp YVU planar 1x1 Y, 2x2 VU, 1x1 A samples. + */ + PP_VIDEOFRAME_FORMAT_YV12A = 4, + + /** + * JPEG color range version of YV12. + */ + PP_VIDEOFRAME_FORMAT_YV12J = 5 +}; + +interface PPB_VideoFrame { + /** + * Determines if a resource is a VideoFrame resource. + * + * @param[in] resource The <code>PP_Resource</code> to test. + * + * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given + * resource is a VideoFrame resource or <code>PP_FALSE</code> otherwise. + */ + PP_Bool IsVideoFrame([in] PP_Resource resource); + + /** + * Gets the timestamp of the video frame. + * + * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame + * resource. + * + * @return A <code>PP_TimeDelta</code> containing the timestamp of the video + * frame. Given in seconds since the start of the containing video stream. + */ + PP_TimeDelta GetTimestamp([in] PP_Resource frame); + + /** + * Sets the timestamp of the video frame. Given in seconds since the + * start of the containing video stream. + * + * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame + * resource. + * @param[in] timestamp A <code>PP_TimeDelta</code> containing the timestamp + * of the video frame. Given in seconds since the start of the containing + * video stream. + */ + void SetTimestamp([in] PP_Resource frame, [in] PP_TimeDelta timestamp); + + /** + * Gets the format of the video frame. + * + * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame + * resource. + * + * @return A <code>PP_VideoFrame_Format</code> containing the format of the + * video frame. + */ + PP_VideoFrame_Format GetFormat([in] PP_Resource frame); + + /** + * Gets the size of the video frame. + * + * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame + * resource. + * @param[out] size A <code>PP_Size</code>. + * + * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> on success or + * <code>PP_FALSE</code> on failure. + */ + PP_Bool GetSize([in] PP_Resource frame, [out] PP_Size size); + + /** + * Gets the data buffer for video frame pixels. + * + * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame + * resource. + * + * @return A pointer to the beginning of the data buffer. + */ + mem_t GetDataBuffer([in] PP_Resource frame); + + /** + * Gets the size of data buffer. + * + * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame + * resource. + * + * @return The size of the data buffer. + */ + uint32_t GetDataBufferSize([in] PP_Resource frame); +}; diff --git a/ppapi/c/pp_macros.h b/ppapi/c/pp_macros.h index e143b22..ebcdc78 100644 --- a/ppapi/c/pp_macros.h +++ b/ppapi/c/pp_macros.h @@ -3,13 +3,13 @@ * found in the LICENSE file. */ -/* From pp_macros.idl modified Wed Mar 6 13:04:56 2013. */ +/* From pp_macros.idl modified Mon Oct 21 10:49:59 2013. */ #ifndef PPAPI_C_PP_MACROS_H_ #define PPAPI_C_PP_MACROS_H_ -#define PPAPI_RELEASE 33 +#define PPAPI_RELEASE 34 /** * @file diff --git a/ppapi/c/ppb_media_stream_video_track.h b/ppapi/c/ppb_media_stream_video_track.h new file mode 100644 index 0000000..ff12c20 --- /dev/null +++ b/ppapi/c/ppb_media_stream_video_track.h @@ -0,0 +1,138 @@ +/* Copyright 2014 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* From ppb_media_stream_video_track.idl modified Fri Dec 27 17:28:11 2013. */ + +#ifndef PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_ +#define PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_ + +#include "ppapi/c/pp_bool.h" +#include "ppapi/c/pp_completion_callback.h" +#include "ppapi/c/pp_macros.h" +#include "ppapi/c/pp_resource.h" +#include "ppapi/c/pp_stdint.h" +#include "ppapi/c/pp_var.h" + +#define PPB_MEDIASTREAMVIDEOTRACK_INTERFACE_0_1 \ + "PPB_MediaStreamVideoTrack;0.1" /* dev */ +/** + * @file + * Defines the <code>PPB_MediaStreamVideoTrack</code> interface. Used for + * receiving video frames from a MediaStream video track in the browser. + * This interface is still in development (Dev API status) and may change. + */ + + +/** + * @addtogroup Interfaces + * @{ + */ +/** + */ +struct PPB_MediaStreamVideoTrack_0_1 { /* dev */ + /** + * Determines if a resource is a MediaStream video track resource. + * + * @param[in] resource The <code>PP_Resource</code> to test. + * + * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given + * resource is a Mediastream video track resource or <code>PP_FALSE</code> + * otherwise. + */ + PP_Bool (*IsMediaStreamVideoTrack)(PP_Resource resource); + /** + * Configures underlying frame buffers for incoming frames. + * If the application doesn't want to drop frames, then the + * <code>max_buffered_frames</code> should be chosen such that inter-frame + * processing time variability won't overrun the input buffer. If the buffer + * is overfilled, then frames will be dropped. The application can detect + * this by examining the timestamp on returned frames. + * If <code>Configure()</code> is not used, default settings will be used. + * + * @param[in] video_track A <code>PP_Resource</code> corresponding to a video + * resource. + * @param[in] max_buffered_frames The maximum number of video frames to + * hold in the input buffer. + * + * @return An int32_t containing a result code from <code>pp_errors.h</code>. + */ + int32_t (*Configure)(PP_Resource video_track, uint32_t max_buffered_frames); + /** + * Returns the track ID of the underlying MediaStream video track. + * + * @param[in] video_track The <code>PP_Resource</code> to check. + * + * @return A <code>PP_Var</code> containing the MediaStream track ID as + * a string. + */ + struct PP_Var (*GetId)(PP_Resource video_track); + /** + * Checks whether the underlying MediaStream track has ended. + * Calls to GetFrame while the track has ended are safe to make and will + * complete, but will fail. + * + * @param[in] video_track The <code>PP_Resource</code> to check. + * + * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given + * MediaStream track has ended or <code>PP_FALSE</code> otherwise. + */ + PP_Bool (*HasEnded)(PP_Resource video_track); + /** + * Gets the next video frame from the MediaStream track. + * If internal processing is slower than the incoming frame rate, new frames + * will be dropped from the incoming stream. Once the input buffer is full, + * frames will be dropped until <code>RecycleFrame()</code> is called to free + * a spot for another frame to be buffered. + * If there are no frames in the input buffer, + * <code>PP_OK_COMPLETIONPENDING</code> will be returned immediately and the + * <code>callback</code> will be called, when a new frame is received or an + * error happens. + * If the caller holds a frame returned by the previous call of + * <code>GetFrame()</code>, <code>PP_ERROR_INPROGRESS</code> will be returned. + * The caller should recycle the previous frame before getting the next frame. + * + * @param[in] video_track A <code>PP_Resource</code> corresponding to a video + * resource. + * @param[out] frame A <code>PP_Resource</code> corresponding to a VideoFrame + * resource. + * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon + * completion of GetFrame(). + * + * @return An int32_t containing a result code from <code>pp_errors.h</code>. + * Returns PP_ERROR_NOMEMORY if <code>max_buffered_frames</code> frames buffer + * was not allocated successfully. + */ + int32_t (*GetFrame)(PP_Resource video_track, + PP_Resource* frame, + struct PP_CompletionCallback callback); + /** + * Recycles a frame returned by <code>GetFrame()</code>, so the track can + * reuse the underlying buffer of this frame. And the frame will become + * invalid. The caller should release all references it holds to + * <code>frame</code> and not use it anymore. + * + * @param[in] video_track A <code>PP_Resource</code> corresponding to a video + * resource. + * @param[in] frame A <code>PP_Resource</code> corresponding to a VideoFrame + * resource returned by <code>GetFrame()</code>. + * + * @return An int32_t containing a result code from <code>pp_errors.h</code>. + */ + int32_t (*RecycleFrame)(PP_Resource video_track, PP_Resource frame); + /** + * Closes the MediaStream video track and disconnects it from video source. + * After calling <code>Close()</code>, no new frames will be received. + * + * @param[in] video_track A <code>PP_Resource</code> corresponding to a + * MediaStream video track resource. + */ + void (*Close)(PP_Resource video_track); +}; +/** + * @} + */ + +#endif /* PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_ */ + diff --git a/ppapi/c/ppb_video_frame.h b/ppapi/c/ppb_video_frame.h new file mode 100644 index 0000000..02fdc80 --- /dev/null +++ b/ppapi/c/ppb_video_frame.h @@ -0,0 +1,139 @@ +/* Copyright 2014 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* From ppb_video_frame.idl modified Fri Dec 27 17:21:52 2013. */ + +#ifndef PPAPI_C_PPB_VIDEO_FRAME_H_ +#define PPAPI_C_PPB_VIDEO_FRAME_H_ + +#include "ppapi/c/pp_bool.h" +#include "ppapi/c/pp_macros.h" +#include "ppapi/c/pp_resource.h" +#include "ppapi/c/pp_size.h" +#include "ppapi/c/pp_stdint.h" +#include "ppapi/c/pp_time.h" + +#define PPB_VIDEOFRAME_INTERFACE_0_1 "PPB_VideoFrame;0.1" /* dev */ +/** + * @file + * Defines the <code>PPB_VideoFrame</code> interface. + */ + + +/** + * @addtogroup Enums + * @{ + */ +typedef enum { + /** + * Unknown format value. + */ + PP_VIDEOFRAME_FORMAT_UNKNOWN = 0, + /** + * 12bpp YVU planar 1x1 Y, 2x2 VU samples. + */ + PP_VIDEOFRAME_FORMAT_YV12 = 1, + /** + * 16bpp YVU planar 1x1 Y, 2x1 VU samples. + */ + PP_VIDEOFRAME_FORMAT_YV16 = 2, + /** + * 12bpp YVU planar 1x1 Y, 2x2 VU samples. + */ + PP_VIDEOFRAME_FORMAT_I420 = 3, + /** + * 20bpp YVU planar 1x1 Y, 2x2 VU, 1x1 A samples. + */ + PP_VIDEOFRAME_FORMAT_YV12A = 4, + /** + * JPEG color range version of YV12. + */ + PP_VIDEOFRAME_FORMAT_YV12J = 5 +} PP_VideoFrame_Format; +/** + * @} + */ + +/** + * @addtogroup Interfaces + * @{ + */ +struct PPB_VideoFrame_0_1 { /* dev */ + /** + * Determines if a resource is a VideoFrame resource. + * + * @param[in] resource The <code>PP_Resource</code> to test. + * + * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given + * resource is a VideoFrame resource or <code>PP_FALSE</code> otherwise. + */ + PP_Bool (*IsVideoFrame)(PP_Resource resource); + /** + * Gets the timestamp of the video frame. + * + * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame + * resource. + * + * @return A <code>PP_TimeDelta</code> containing the timestamp of the video + * frame. Given in seconds since the start of the containing video stream. + */ + PP_TimeDelta (*GetTimestamp)(PP_Resource frame); + /** + * Sets the timestamp of the video frame. Given in seconds since the + * start of the containing video stream. + * + * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame + * resource. + * @param[in] timestamp A <code>PP_TimeDelta</code> containing the timestamp + * of the video frame. Given in seconds since the start of the containing + * video stream. + */ + void (*SetTimestamp)(PP_Resource frame, PP_TimeDelta timestamp); + /** + * Gets the format of the video frame. + * + * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame + * resource. + * + * @return A <code>PP_VideoFrame_Format</code> containing the format of the + * video frame. + */ + PP_VideoFrame_Format (*GetFormat)(PP_Resource frame); + /** + * Gets the size of the video frame. + * + * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame + * resource. + * @param[out] size A <code>PP_Size</code>. + * + * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> on success or + * <code>PP_FALSE</code> on failure. + */ + PP_Bool (*GetSize)(PP_Resource frame, struct PP_Size* size); + /** + * Gets the data buffer for video frame pixels. + * + * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame + * resource. + * + * @return A pointer to the beginning of the data buffer. + */ + void* (*GetDataBuffer)(PP_Resource frame); + /** + * Gets the size of data buffer. + * + * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame + * resource. + * + * @return The size of the data buffer. + */ + uint32_t (*GetDataBufferSize)(PP_Resource frame); +}; +/** + * @} + */ + +#endif /* PPAPI_C_PPB_VIDEO_FRAME_H_ */ + diff --git a/ppapi/cpp/media_stream_video_track.cc b/ppapi/cpp/media_stream_video_track.cc new file mode 100644 index 0000000..e33333e --- /dev/null +++ b/ppapi/cpp/media_stream_video_track.cc @@ -0,0 +1,99 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ppapi/cpp/media_stream_video_track.h" + +#include "ppapi/c/pp_errors.h" +#include "ppapi/c/ppb_media_stream_video_track.h" +#include "ppapi/cpp/completion_callback.h" +#include "ppapi/cpp/module_impl.h" +#include "ppapi/cpp/var.h" +#include "ppapi/cpp/video_frame.h" + +namespace pp { + +namespace { + +template <> const char* interface_name<PPB_MediaStreamVideoTrack_0_1>() { + return PPB_MEDIASTREAMVIDEOTRACK_INTERFACE_0_1; +} + +} // namespace + +MediaStreamVideoTrack::MediaStreamVideoTrack() { +} + +MediaStreamVideoTrack::MediaStreamVideoTrack( + const MediaStreamVideoTrack& other) : Resource(other) { +} + +MediaStreamVideoTrack::MediaStreamVideoTrack(const Resource& resource) + : Resource(resource) { + PP_DCHECK(IsMediaStreamVideoTrack(resource)); +} + +MediaStreamVideoTrack::MediaStreamVideoTrack(PassRef, PP_Resource resource) + : Resource(PASS_REF, resource) { +} + +MediaStreamVideoTrack::~MediaStreamVideoTrack() { +} + +int32_t MediaStreamVideoTrack::Configure(uint32_t frame_buffer_size) { + if (has_interface<PPB_MediaStreamVideoTrack_0_1>()) { + return get_interface<PPB_MediaStreamVideoTrack_0_1>()->Configure( + pp_resource(), frame_buffer_size); + } + return PP_ERROR_NOINTERFACE; +} + +std::string MediaStreamVideoTrack::GetId() const { + if (has_interface<PPB_MediaStreamVideoTrack_0_1>()) { + pp::Var id(PASS_REF, get_interface<PPB_MediaStreamVideoTrack_0_1>()->GetId( + pp_resource())); + if (id.is_string()) + return id.AsString(); + } + return std::string(); +} + +bool MediaStreamVideoTrack::HasEnded() const { + if (has_interface<PPB_MediaStreamVideoTrack_0_1>()) { + return PP_ToBool(get_interface<PPB_MediaStreamVideoTrack_0_1>()->HasEnded( + pp_resource())); + } + return true; +} + +int32_t MediaStreamVideoTrack::GetFrame( + const CompletionCallbackWithOutput<VideoFrame>& cc) { + if (has_interface<PPB_MediaStreamVideoTrack_0_1>()) { + return get_interface<PPB_MediaStreamVideoTrack_0_1>()->GetFrame( + pp_resource(), cc.output(), cc.pp_completion_callback()); + } + return cc.MayForce(PP_ERROR_NOINTERFACE); +} + +int32_t MediaStreamVideoTrack::RecycleFrame(const VideoFrame& frame) { + if (has_interface<PPB_MediaStreamVideoTrack_0_1>()) { + return get_interface<PPB_MediaStreamVideoTrack_0_1>()->RecycleFrame( + pp_resource(), frame.pp_resource()); + } + return PP_ERROR_NOINTERFACE; +} + +void MediaStreamVideoTrack::Close() { + if (has_interface<PPB_MediaStreamVideoTrack_0_1>()) + get_interface<PPB_MediaStreamVideoTrack_0_1>()->Close(pp_resource()); +} + +bool MediaStreamVideoTrack::IsMediaStreamVideoTrack(const Resource& resource) { + if (has_interface<PPB_MediaStreamVideoTrack_0_1>()) { + return PP_ToBool(get_interface<PPB_MediaStreamVideoTrack_0_1>()-> + IsMediaStreamVideoTrack(resource.pp_resource())); + } + return false; +} + +} // namespace pp diff --git a/ppapi/cpp/media_stream_video_track.h b/ppapi/cpp/media_stream_video_track.h new file mode 100644 index 0000000..4151077 --- /dev/null +++ b/ppapi/cpp/media_stream_video_track.h @@ -0,0 +1,122 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef PPAPI_CPP_MEDIA_STREAM_VIDEO_TRACK_H_ +#define PPAPI_CPP_MEDIA_STREAM_VIDEO_TRACK_H_ + +#include <string> + +#include "ppapi/c/pp_stdint.h" +#include "ppapi/cpp/resource.h" + +/// @file +/// This file defines the <code>MediaStreamVideoTrack</code> interface for a +/// video source resource, which receives video frames from a MediaStream video +/// track in the browser. + +namespace pp { + +class VideoFrame; +template <typename T> class CompletionCallbackWithOutput; + +/// The <code>MediaStreamVideoTrack</code> class contains methods for +/// receiving video frames from a MediaStream video track in the browser. +class MediaStreamVideoTrack : public Resource { + public: + /// Default constructor for creating an is_null() + /// <code>MediaStreamVideoTrack</code> object. + MediaStreamVideoTrack(); + + /// The copy constructor for <code>MediaStreamVideoTrack</code>. + /// + /// @param[in] other A reference to a <code>MediaStreamVideoTrack</code>. + MediaStreamVideoTrack(const MediaStreamVideoTrack& other); + + /// Constructs a <code>MediaStreamVideoTrack</code> from + /// a <code>Resource</code>. + /// + /// @param[in] resource A <code>Resource</code> containing a file system. + explicit MediaStreamVideoTrack(const Resource& resource); + + /// A constructor used when you have received a <code>PP_Resource</code> as a + /// return value that has had 1 ref added for you. + /// + /// @param[in] resource A <code>PPB_MediaStreamVideoTrack</code> resource. + MediaStreamVideoTrack(PassRef, PP_Resource resource); + + ~MediaStreamVideoTrack(); + + /// Configures underlying frame buffers for incoming frames. + /// If the application doesn't want to drop frames, then the + /// <code>max_buffered_frames</code> should be chosen such that inter-frame + /// processing time variability won't overrun the input buffer. If the buffer + /// is overfilled, then frames will be dropped. The application can detect + /// this by examining the timestamp on returned frames. + /// If <code>Configure()</code> is not used, default settings will be used. + /// + /// @param[in] max_buffered_frames The maximum number of video frames to + /// hold in the input buffer. + /// + /// @return An int32_t containing a result code from <code>pp_errors.h</code>. + int32_t Configure(uint32_t max_buffered_frames); + + /// Returns the track ID of the underlying MediaStream video track. + std::string GetId() const; + + /// Checks whether the underlying MediaStream track has ended. + /// Calls to GetFrame while the track has ended are safe to make and will + /// complete, but will fail. + bool HasEnded() const; + + /// Gets the next video frame from the MediaStream track. + /// If internal processing is slower than the incoming frame rate, new frames + /// will be dropped from the incoming stream. Once the input buffer is full, + /// frames will be dropped until <code>RecycleFrame()</code> is called to free + /// a spot for another frame to be buffered. + /// If there are no frames in the input buffer, + /// <code>PP_OK_COMPLETIONPENDING</code> will be returned immediately and the + /// <code>callback</code> will be called, when a new frame is received or some + /// error happens. + /// If the caller holds a frame returned by the previous call of + /// <code>GetFrame()</code>, <code>PP_ERROR_INPROGRESS</code> will be + /// returned. The caller should recycle the previous frame before getting + /// the next frame. + /// + /// @param[in] callback A <code>PP_CompletionCallback</code> to be called upon + /// completion of <code>GetFrame()</code>. If success, a VideoFrame will be + /// passed into the completion callback function. + /// + /// @return An int32_t containing a result code from <code>pp_errors.h</code>. + /// Returns PP_ERROR_NOMEMORY if <code>max_buffered_frames</code> frames + /// buffer was not allocated successfully. + int32_t GetFrame( + const CompletionCallbackWithOutput<VideoFrame>& callback); + + /// Recycles a frame returned by <code>GetFrame()</code>, so the track can + /// reuse the underlying buffer of this frame. And the frame will become + /// invalid. The caller should release all references it holds to + /// <code>frame</code> and not use it anymore. + /// + /// @param[in] frame A VideoFrame returned by <code>GetFrame()</code>. + /// + /// @return An int32_t containing a result code from <code>pp_errors.h</code>. + int32_t RecycleFrame(const VideoFrame& frame); + + /// Closes the MediaStream video track, and disconnects it from video source. + /// After calling <code>Close()</code>, no new frames will be received. + void Close(); + + /// Checks whether a <code>Resource</code> is a MediaStream video track, + /// to test whether it is appropriate for use with the + /// <code>MediaStreamVideoTrack</code> constructor. + /// + /// @param[in] resource A <code>Resource</code> to test. + /// + /// @return True if <code>resource</code> is a MediaStream video track. + static bool IsMediaStreamVideoTrack(const Resource& resource); +}; + +} // namespace pp + +#endif // PPAPI_CPP_MEDIA_STREAM_VIDEO_TRACK_H_ diff --git a/ppapi/cpp/video_frame.cc b/ppapi/cpp/video_frame.cc new file mode 100644 index 0000000..a3c9311 --- /dev/null +++ b/ppapi/cpp/video_frame.cc @@ -0,0 +1,77 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ppapi/cpp/video_frame.h" + +#include "ppapi/cpp/module.h" +#include "ppapi/cpp/module_impl.h" + +namespace pp { + +namespace { + +template <> const char* interface_name<PPB_VideoFrame_0_1>() { + return PPB_VIDEOFRAME_INTERFACE_0_1; +} + +} + +VideoFrame::VideoFrame() { +} + +VideoFrame::VideoFrame(const VideoFrame& other) : Resource(other) { +} + +VideoFrame::VideoFrame(const Resource& resource) : Resource(resource) { +} + +VideoFrame::VideoFrame(PassRef, PP_Resource resource) + : Resource(PASS_REF, resource) { +} + +VideoFrame::~VideoFrame() { +} + +PP_TimeDelta VideoFrame::GetTimestamp() const { + PP_TimeDelta timestamp = .0; + if (has_interface<PPB_VideoFrame_0_1>()) { + timestamp = get_interface<PPB_VideoFrame_0_1>()->GetTimestamp( + pp_resource()); + } + return timestamp; +} + +void VideoFrame::SetTimestamp(PP_TimeDelta timestamp) { + if (has_interface<PPB_VideoFrame_0_1>()) + get_interface<PPB_VideoFrame_0_1>()->SetTimestamp(pp_resource(), timestamp); +} + +PP_VideoFrame_Format VideoFrame::GetFormat() const { + if (has_interface<PPB_VideoFrame_0_1>()) + return get_interface<PPB_VideoFrame_0_1>()->GetFormat(pp_resource()); + return PP_VIDEOFRAME_FORMAT_UNKNOWN; +} + +bool VideoFrame::GetSize(Size* size) const { + if (has_interface<PPB_VideoFrame_0_1>()) + return PP_ToBool(get_interface<PPB_VideoFrame_0_1>()->GetSize( + pp_resource(), &size->pp_size())); + return false; +} + +void* VideoFrame::GetDataBuffer() { + if (has_interface<PPB_VideoFrame_0_1>()) + return get_interface<PPB_VideoFrame_0_1>()->GetDataBuffer(pp_resource()); + return NULL; +} + +uint32_t VideoFrame::GetDataBufferSize() const { + if (has_interface<PPB_VideoFrame_0_1>()) { + return get_interface<PPB_VideoFrame_0_1>()->GetDataBufferSize( + pp_resource()); + } + return 0; +} + +} // namespace pp diff --git a/ppapi/cpp/video_frame.h b/ppapi/cpp/video_frame.h new file mode 100644 index 0000000..0c3b3ea --- /dev/null +++ b/ppapi/cpp/video_frame.h @@ -0,0 +1,75 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef PPAPI_CPP_VIDEO_FRAME_H_ +#define PPAPI_CPP_VIDEO_FRAME_H_ + +#include "ppapi/c/ppb_video_frame.h" +#include "ppapi/cpp/resource.h" +#include "ppapi/cpp/size.h" + +namespace pp { + +class VideoFrame : public Resource { + public: + /// Default constructor for creating an is_null() + /// <code>VideoFrame</code> object. + VideoFrame(); + + /// The copy constructor for <code>VideoFrame</code>. + /// + /// @param[in] other A reference to a <code>VideoFrame</code>. + VideoFrame(const VideoFrame& other); + + VideoFrame(const Resource& resource); + + /// A constructor used when you have received a <code>PP_Resource</code> as a + /// return value that has had 1 ref added for you. + /// + /// @para[in] resource A <code>PPB_VideoFrame</code> resource. + VideoFrame(PassRef, PP_Resource resource); + + virtual ~VideoFrame(); + + /// Gets the timestamp of the video frame. + /// + /// @return A <code>PP_TimeDelta</code> containing the timestamp of the video + /// frame. Given in seconds since the start of the containing video stream. + PP_TimeDelta GetTimestamp() const; + + /// Sets the timestamp of the video frame. Given in seconds since the + /// start of the containing video stream. + /// + /// @param[in] timestamp A <code>PP_TimeDelta</code> containing the timestamp + /// of the video frame. Given in seconds since the start of the containing + /// video stream. + void SetTimestamp(PP_TimeDelta timestamp); + + /// Gets the format of the video frame. + /// + /// @return A <code>PP_VideoFrame_Format</code> containing the format of the + /// video frame. + PP_VideoFrame_Format GetFormat() const; + + /// Gets the size of the video frame. + /// + /// @param[out] size A <code>Size</code>. + /// + /// @return True on success or false on failure. + bool GetSize(Size* size) const; + + /// Gets the data buffer for video frame pixels. + /// + /// @return A pointer to the beginning of the data buffer. + void* GetDataBuffer(); + + /// Gets the size of data buffer. + /// + /// @return The size of the data buffer. + uint32_t GetDataBufferSize() const; +}; + +} // namespace pp + +#endif // PPAPI_CPP_VIDEO_FRAME_H_ diff --git a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c index ad7260b..5c41c6a 100644 --- a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c +++ b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c @@ -59,6 +59,7 @@ #include "ppapi/c/ppb_image_data.h" #include "ppapi/c/ppb_input_event.h" #include "ppapi/c/ppb_instance.h" +#include "ppapi/c/ppb_media_stream_video_track.h" #include "ppapi/c/ppb_message_loop.h" #include "ppapi/c/ppb_messaging.h" #include "ppapi/c/ppb_mouse_cursor.h" @@ -77,6 +78,7 @@ #include "ppapi/c/ppb_var_array.h" #include "ppapi/c/ppb_var_array_buffer.h" #include "ppapi/c/ppb_var_dictionary.h" +#include "ppapi/c/ppb_video_frame.h" #include "ppapi/c/ppb_view.h" #include "ppapi/c/ppb_websocket.h" #include "ppapi/c/ppp_graphics_3d.h" @@ -153,6 +155,7 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_WheelInputEvent_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_KeyboardInputEvent_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TouchInputEvent_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_IMEInputEvent_1_0; +static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_MediaStreamVideoTrack_0_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_MessageLoop_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Messaging_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_MouseLock_1_0; @@ -915,6 +918,45 @@ static void Pnacl_M13_PPB_IMEInputEvent_GetSelection(PP_Resource ime_event, uint /* Not generating wrapper methods for PPB_Instance_1_0 */ +/* Begin wrapper methods for PPB_MediaStreamVideoTrack_0_1 */ + +static PP_Bool Pnacl_M34_PPB_MediaStreamVideoTrack_IsMediaStreamVideoTrack(PP_Resource resource) { + const struct PPB_MediaStreamVideoTrack_0_1 *iface = Pnacl_WrapperInfo_PPB_MediaStreamVideoTrack_0_1.real_iface; + return iface->IsMediaStreamVideoTrack(resource); +} + +static int32_t Pnacl_M34_PPB_MediaStreamVideoTrack_Configure(PP_Resource video_track, uint32_t max_buffered_frames) { + const struct PPB_MediaStreamVideoTrack_0_1 *iface = Pnacl_WrapperInfo_PPB_MediaStreamVideoTrack_0_1.real_iface; + return iface->Configure(video_track, max_buffered_frames); +} + +static void Pnacl_M34_PPB_MediaStreamVideoTrack_GetId(struct PP_Var* _struct_result, PP_Resource video_track) { + const struct PPB_MediaStreamVideoTrack_0_1 *iface = Pnacl_WrapperInfo_PPB_MediaStreamVideoTrack_0_1.real_iface; + *_struct_result = iface->GetId(video_track); +} + +static PP_Bool Pnacl_M34_PPB_MediaStreamVideoTrack_HasEnded(PP_Resource video_track) { + const struct PPB_MediaStreamVideoTrack_0_1 *iface = Pnacl_WrapperInfo_PPB_MediaStreamVideoTrack_0_1.real_iface; + return iface->HasEnded(video_track); +} + +static int32_t Pnacl_M34_PPB_MediaStreamVideoTrack_GetFrame(PP_Resource video_track, PP_Resource* frame, struct PP_CompletionCallback* callback) { + const struct PPB_MediaStreamVideoTrack_0_1 *iface = Pnacl_WrapperInfo_PPB_MediaStreamVideoTrack_0_1.real_iface; + return iface->GetFrame(video_track, frame, *callback); +} + +static int32_t Pnacl_M34_PPB_MediaStreamVideoTrack_RecycleFrame(PP_Resource video_track, PP_Resource frame) { + const struct PPB_MediaStreamVideoTrack_0_1 *iface = Pnacl_WrapperInfo_PPB_MediaStreamVideoTrack_0_1.real_iface; + return iface->RecycleFrame(video_track, frame); +} + +static void Pnacl_M34_PPB_MediaStreamVideoTrack_Close(PP_Resource video_track) { + const struct PPB_MediaStreamVideoTrack_0_1 *iface = Pnacl_WrapperInfo_PPB_MediaStreamVideoTrack_0_1.real_iface; + iface->Close(video_track); +} + +/* End wrapper methods for PPB_MediaStreamVideoTrack_0_1 */ + /* Begin wrapper methods for PPB_MessageLoop_1_0 */ static PP_Resource Pnacl_M25_PPB_MessageLoop_Create(PP_Instance instance) { @@ -1508,6 +1550,8 @@ static void Pnacl_M29_PPB_VarDictionary_GetKeys(struct PP_Var* _struct_result, s /* End wrapper methods for PPB_VarDictionary_1_0 */ +/* Not generating wrapper methods for PPB_VideoFrame_0_1 */ + /* Not generating wrapper methods for PPB_View_1_0 */ /* Not generating wrapper methods for PPB_View_1_1 */ @@ -4256,6 +4300,16 @@ struct PPB_IMEInputEvent_1_0 Pnacl_Wrappers_PPB_IMEInputEvent_1_0 = { /* Not generating wrapper interface for PPB_Instance_1_0 */ +struct PPB_MediaStreamVideoTrack_0_1 Pnacl_Wrappers_PPB_MediaStreamVideoTrack_0_1 = { + .IsMediaStreamVideoTrack = (PP_Bool (*)(PP_Resource resource))&Pnacl_M34_PPB_MediaStreamVideoTrack_IsMediaStreamVideoTrack, + .Configure = (int32_t (*)(PP_Resource video_track, uint32_t max_buffered_frames))&Pnacl_M34_PPB_MediaStreamVideoTrack_Configure, + .GetId = (struct PP_Var (*)(PP_Resource video_track))&Pnacl_M34_PPB_MediaStreamVideoTrack_GetId, + .HasEnded = (PP_Bool (*)(PP_Resource video_track))&Pnacl_M34_PPB_MediaStreamVideoTrack_HasEnded, + .GetFrame = (int32_t (*)(PP_Resource video_track, PP_Resource* frame, struct PP_CompletionCallback callback))&Pnacl_M34_PPB_MediaStreamVideoTrack_GetFrame, + .RecycleFrame = (int32_t (*)(PP_Resource video_track, PP_Resource frame))&Pnacl_M34_PPB_MediaStreamVideoTrack_RecycleFrame, + .Close = (void (*)(PP_Resource video_track))&Pnacl_M34_PPB_MediaStreamVideoTrack_Close +}; + struct PPB_MessageLoop_1_0 Pnacl_Wrappers_PPB_MessageLoop_1_0 = { .Create = (PP_Resource (*)(PP_Instance instance))&Pnacl_M25_PPB_MessageLoop_Create, .GetForMainThread = (PP_Resource (*)(void))&Pnacl_M25_PPB_MessageLoop_GetForMainThread, @@ -4418,6 +4472,8 @@ struct PPB_VarDictionary_1_0 Pnacl_Wrappers_PPB_VarDictionary_1_0 = { .GetKeys = (struct PP_Var (*)(struct PP_Var dict))&Pnacl_M29_PPB_VarDictionary_GetKeys }; +/* Not generating wrapper interface for PPB_VideoFrame_0_1 */ + /* Not generating wrapper interface for PPB_View_1_0 */ /* Not generating wrapper interface for PPB_View_1_1 */ @@ -5246,6 +5302,12 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_IMEInputEvent_1_0 = { .real_iface = NULL }; +static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_MediaStreamVideoTrack_0_1 = { + .iface_macro = PPB_MEDIASTREAMVIDEOTRACK_INTERFACE_0_1, + .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_MediaStreamVideoTrack_0_1, + .real_iface = NULL +}; + static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_MessageLoop_1_0 = { .iface_macro = PPB_MESSAGELOOP_INTERFACE_1_0, .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_MessageLoop_1_0, @@ -5768,6 +5830,7 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = { &Pnacl_WrapperInfo_PPB_KeyboardInputEvent_1_0, &Pnacl_WrapperInfo_PPB_TouchInputEvent_1_0, &Pnacl_WrapperInfo_PPB_IMEInputEvent_1_0, + &Pnacl_WrapperInfo_PPB_MediaStreamVideoTrack_0_1, &Pnacl_WrapperInfo_PPB_MessageLoop_1_0, &Pnacl_WrapperInfo_PPB_Messaging_1_0, &Pnacl_WrapperInfo_PPB_MouseLock_1_0, diff --git a/ppapi/ppapi_sources.gypi b/ppapi/ppapi_sources.gypi index 793cbfc..eac545c 100644 --- a/ppapi/ppapi_sources.gypi +++ b/ppapi/ppapi_sources.gypi @@ -184,6 +184,8 @@ 'cpp/instance_handle.cc', 'cpp/instance_handle.h', 'cpp/logging.h', + 'cpp/media_stream_video_track.cc', + 'cpp/media_stream_video_track.h', 'cpp/message_loop.cc', 'cpp/message_loop.h', 'cpp/module.cc', @@ -229,6 +231,8 @@ 'cpp/var_array_buffer.h', 'cpp/var_dictionary.cc', 'cpp/var_dictionary.h', + 'cpp/video_frame.cc', + 'cpp/video_frame.h', 'cpp/view.cc', 'cpp/view.h', 'cpp/websocket.cc', diff --git a/ppapi/tests/all_c_includes.h b/ppapi/tests/all_c_includes.h index 52a42fb..dd7f648 100644 --- a/ppapi/tests/all_c_includes.h +++ b/ppapi/tests/all_c_includes.h @@ -79,6 +79,7 @@ #include "ppapi/c/ppb_image_data.h" #include "ppapi/c/ppb_input_event.h" #include "ppapi/c/ppb_instance.h" +#include "ppapi/c/ppb_media_stream_video_track.h" #include "ppapi/c/ppb_messaging.h" #include "ppapi/c/ppb_mouse_lock.h" #include "ppapi/c/ppb_net_address.h" @@ -95,6 +96,7 @@ #include "ppapi/c/ppb_var_array.h" #include "ppapi/c/ppb_var_array_buffer.h" #include "ppapi/c/ppb_var_dictionary.h" +#include "ppapi/c/ppb_video_frame.h" #include "ppapi/c/ppb_websocket.h" #include "ppapi/c/ppp.h" #include "ppapi/c/ppp_graphics_3d.h" diff --git a/ppapi/tests/all_cpp_includes.h b/ppapi/tests/all_cpp_includes.h index a72e29e..1a40d21 100644 --- a/ppapi/tests/all_cpp_includes.h +++ b/ppapi/tests/all_cpp_includes.h @@ -45,6 +45,7 @@ #include "ppapi/cpp/image_data.h" #include "ppapi/cpp/instance.h" #include "ppapi/cpp/logging.h" +#include "ppapi/cpp/media_stream_video_track.h" #include "ppapi/cpp/module.h" #include "ppapi/cpp/module_impl.h" #include "ppapi/cpp/mouse_lock.h" @@ -77,6 +78,7 @@ #include "ppapi/cpp/var_array.h" #include "ppapi/cpp/var_array_buffer.h" #include "ppapi/cpp/var_dictionary.h" +#include "ppapi/cpp/video_frame.h" #include "ppapi/cpp/websocket.h" #include "ppapi/utility/completion_callback_factory.h" #include "ppapi/utility/completion_callback_factory_thread_traits.h" |