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

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: Fix build warnings Created 6 years, 11 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
« no previous file with comments | « ppapi/cpp/media_stream_video_track.cc ('k') | ppapi/cpp/video_frame.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /// The copy constructor for <code>VideoFrame</code>.
21 ///
22 /// @param[in] other A reference to a <code>VideoFrame</code>.
23 VideoFrame(const VideoFrame& other);
24
25 VideoFrame(const Resource& resource);
26
27 /// A constructor used when you have received a <code>PP_Resource</code> as a
28 /// return value that has had 1 ref added for you.
29 ///
30 /// @para[in] resource A <code>PPB_VideoFrame</code> resource.
31 VideoFrame(PassRef, PP_Resource resource);
32
33 virtual ~VideoFrame();
34
35 /// Gets the timestamp of the video frame.
36 ///
37 /// @return A <code>PP_TimeDelta</code> containing the timestamp of the video
38 /// frame. Given in seconds since the start of the containing video stream.
39 PP_TimeDelta GetTimestamp() const;
40
41 /// Sets the timestamp of the video frame. Given in seconds since the
42 /// start of the containing video stream.
43 ///
44 /// @param[in] timestamp A <code>PP_TimeDelta</code> containing the timestamp
45 /// of the video frame. Given in seconds since the start of the containing
46 /// video stream.
47 void SetTimestamp(PP_TimeDelta timestamp);
48
49 /// Gets the format of the video frame.
50 ///
51 /// @return A <code>PP_VideoFrame_Format</code> containing the format of the
52 /// video frame.
53 PP_VideoFrame_Format GetFormat() const;
54
55 /// Gets the size of the video frame.
56 ///
57 /// @param[out] size A <code>Size</code>.
58 ///
59 /// @return True on success or false on failure.
60 bool GetSize(Size* size) const;
61
62 /// Gets the data buffer for video frame pixels.
63 ///
64 /// @return A pointer to the beginning of the data buffer.
65 void* GetDataBuffer();
66
67 /// Gets the size of data buffer.
68 ///
69 /// @return The size of the data buffer.
70 uint32_t GetDataBufferSize() const;
71 };
72
73 } // namespace pp
74
75 #endif // PPAPI_CPP_VIDEO_FRAME_H_
OLDNEW
« no previous file with comments | « ppapi/cpp/media_stream_video_track.cc ('k') | ppapi/cpp/video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698