summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp/media_stream_video_track.h
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/cpp/media_stream_video_track.h')
-rw-r--r--ppapi/cpp/media_stream_video_track.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/ppapi/cpp/media_stream_video_track.h b/ppapi/cpp/media_stream_video_track.h
index 6975986..5d03745 100644
--- a/ppapi/cpp/media_stream_video_track.h
+++ b/ppapi/cpp/media_stream_video_track.h
@@ -41,6 +41,10 @@ class MediaStreamVideoTrack : public Resource {
/// @param[in] resource A <code>PPB_MediaStreamVideoTrack</code> resource.
explicit MediaStreamVideoTrack(const Resource& resource);
+ /// Constructs a <code>MediaStreamVideoTrack</code> that outputs given frames
+ /// to a new video track, which will be consumed by Javascript.
+ explicit MediaStreamVideoTrack(const InstanceHandle& instance);
+
/// A constructor used when you have received a <code>PP_Resource</code> as a
/// return value that has had 1 ref added for you.
///
@@ -134,6 +138,17 @@ class MediaStreamVideoTrack : public Resource {
/// After calling <code>Close()</code>, no new frames will be received.
void Close();
+ // Gets a free frame for output. The frame is allocated by
+ // <code>Configure()</code>. The caller should fill it with frame data, and
+ // then use |PutFrame()| to send the frame back.
+ int32_t GetEmptyFrame(
+ const CompletionCallbackWithOutput<VideoFrame>& callback);
+
+ // Sends a frame returned by |GetEmptyFrame()| to the output track.
+ // After this function, the |frame| should not be used anymore and the
+ // caller should release the reference that it holds.
+ int32_t PutFrame(const VideoFrame& frame);
+
/// 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.