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

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

Issue 14192054: Rename PPAPI Video Stream APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Straighten out naming confusion, improve comments. Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/cpp/video_frame.cc ('k') | ppapi/cpp/video_reader.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_READER_H_
6 #define PPAPI_CPP_VIDEO_READER_H_
7
8 #include <string>
9
10 #include "ppapi/c/pp_time.h"
11 #include "ppapi/cpp/completion_callback.h"
12 #include "ppapi/cpp/pass_ref.h"
13 #include "ppapi/cpp/resource.h"
14
15 /// @file
16 /// This file defines the API to create and use video stream readers.
17
18 namespace pp {
19
20 class InstanceHandle;
21 class VideoFrame;
22
23 // VideoReader -----------------------------------------------------------------
24
25 /// The <code>VideoReader</code> class represents a video reader resource.
26 class VideoReader : public Resource {
27 public:
28 /// Default constructor for creating a <code>VideoReader</code> object.
29 VideoReader();
30
31 /// Constructor for creating a <code>VideoReader</code> for an instance.
32 explicit VideoReader(const InstanceHandle& instance);
33
34 /// The copy constructor for <code>VideoReader</code>.
35 ///
36 /// @param[in] other A reference to a <code>VideoReader</code>.
37 VideoReader(const VideoReader& other);
38
39 /// A constructor used when you have received a PP_Resource as a return
40 /// value that has had its reference count incremented for you.
41 ///
42 /// @param[in] resource A PP_Resource corresponding to a video reader.
43 VideoReader(PassRef, PP_Resource resource);
44
45 /// Opens a stream for reading video and associates it with the given id.
46 ///
47 /// @param[in] stream_id A <code>Var</code> uniquely identifying the stream
48 /// to read from.
49 /// @param[in] callback A <code>CompletionCallback</code> to be called upon
50 /// completion of Open.
51 ///
52 /// @return A return code from <code>pp_errors.h</code>.
53 int32_t Open(const Var& stream_id,
54 const CompletionCallback& cc);
55
56 /// Gets the next frame of video from the reader's stream.
57 ///
58 /// @param[in] callback A <code>CompletionCallbackWithOutput</code> to be
59 /// called upon completion of GetNextFrame.
60 ///
61 /// @return A return code from <code>pp_errors.h</code>.
62 int32_t GetFrame(const CompletionCallbackWithOutput<VideoFrame>& cc);
63
64 /// Closes the reader's current stream.
65 void Close();
66 };
67
68 } // namespace pp
69
70 #endif // PPAPI_CPP_VIDEO_READER_H_
OLDNEW
« no previous file with comments | « ppapi/cpp/video_frame.cc ('k') | ppapi/cpp/video_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698