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

Side by Side Diff: ppapi/cpp/video_frame.h

Issue 107083004: [PPAPI] API definition for video media stream artifacts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: update Created 6 years, 12 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef PPAPI_CPP_VIDEO_FRAME_H_
6 #define PPAPI_CPP_VIDEO_FRAME_H_
7
8 #include "ppapi/c/ppb_video_frame.h"
9 #include "ppapi/cpp/resource.h"
10 #include "ppapi/cpp/size.h"
11
12 namespace pp {
13
14 class VideoFrame : public Resource {
15 public:
16 /// Default constructor for creating an is_null()
17 /// <code>VideoFrame</code> object.
18 VideoFrame();
19
20 /// A constructor used when you have received a <code>PP_Resource</code> as a
21 /// return value that has had 1 ref added for you.
22 ///
23 /// @para[in] resource A <code>PPB_VideoFrame</code> resource.
24 VideoFrame(PassRef, PP_Resource resource);
25
26 virtual ~VideoFrame();
27
28 /// Gets timestamp of the video frame.
29 ///
30 /// @return A <code>PP_TimeDelta</code> containing timestamp of the video
31 /// frame. Given in seconds since the start of the containing video stream.
32 PP_TimeDelta GetTimestamp() const;
33
34 /// Sets the timestamp of the video frame. Given in seconds since the
35 /// start of the containing video stream.
36 ///
37 /// @param[in] timestamp A <code>PP_TimeDelta</code> containing the timestamp
38 /// of the video frame. Given in seconds since the start of the containing
39 /// video stream.
40 void SetTimestamp(PP_TimeDelta timestamp);
41
42 /// Gets format of the video frame.
43 ///
44 /// @return A <code>PP_VideoFrame_Format</code> containing the format of the
45 /// video frame.
46 PP_VideoFrame_Format GetFormat() const;
47
48 /// Gets size of the video frame.
49 ///
50 /// @param[out] size A <code>PP_Size</code>
yzshen1 2013/12/26 17:52:22 Please update the comment, it is not PP_Size here.
Peng 2013/12/26 18:33:41 Done.
51 ///
52 /// @return True if gets size successfully, otherwise false is returned.
yzshen1 2013/12/26 17:52:22 extra space before 'is'.
Peng 2013/12/26 18:33:41 Done.
53 bool GetSize(Size* size) const;
54
55 /// Gets data buffer for video frame pixels.
56 ///
57 /// @return A pointer to the beginning of data buffer.
58 void* GetDataBuffer();
59
60 /// Gets size of data buffer.
61 ///
62 /// @return The size of the data buffer.
63 uint32_t GetDataBufferSize() const;
64 };
65
66 } // namespace pp
67
68 #endif // PPAPI_CPP_VIDEO_FRAME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698