OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PPAPI_CPP_VIDEO_READER_H_ | 5 #ifndef PPAPI_CPP_VIDEO_READER_H_ |
6 #define PPAPI_CPP_VIDEO_READER_H_ | 6 #define PPAPI_CPP_VIDEO_READER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ppapi/c/pp_time.h" | 10 #include "ppapi/c/pp_time.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 VideoReader(const VideoReader& other); | 37 VideoReader(const VideoReader& other); |
38 | 38 |
39 /// A constructor used when you have received a PP_Resource as a return | 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. | 40 /// value that has had its reference count incremented for you. |
41 /// | 41 /// |
42 /// @param[in] resource A PP_Resource corresponding to a video reader. | 42 /// @param[in] resource A PP_Resource corresponding to a video reader. |
43 VideoReader(PassRef, PP_Resource resource); | 43 VideoReader(PassRef, PP_Resource resource); |
44 | 44 |
45 /// Opens a stream for reading video and associates it with the given id. | 45 /// Opens a stream for reading video and associates it with the given id. |
46 /// | 46 /// |
47 /// @param[in] stream_id A string uniquely identifying the stream to read | 47 /// @param[in] stream_id A <code>Var</code> uniquely identifying the stream |
48 /// from. | 48 /// to read from. |
49 /// @param[in] callback A <code>CompletionCallback</code> to be called upon | 49 /// @param[in] callback A <code>CompletionCallback</code> to be called upon |
50 /// completion of Open. | 50 /// completion of Open. |
51 /// | 51 /// |
52 /// @return A return code from <code>pp_errors.h</code>. | 52 /// @return A return code from <code>pp_errors.h</code>. |
53 int32_t Open(const std::string& stream_id, | 53 int32_t Open(const Var& stream_id, |
54 const CompletionCallback& cc); | 54 const CompletionCallback& cc); |
55 | 55 |
56 /// Gets the next frame of video from the reader's stream. | 56 /// Gets the next frame of video from the reader's stream. |
57 /// | 57 /// |
58 /// @param[in] callback A <code>CompletionCallbackWithOutput</code> to be | 58 /// @param[in] callback A <code>CompletionCallbackWithOutput</code> to be |
59 /// called upon completion of GetNextFrame. | 59 /// called upon completion of GetNextFrame. |
60 /// | 60 /// |
61 /// @return A return code from <code>pp_errors.h</code>. | 61 /// @return A return code from <code>pp_errors.h</code>. |
62 int32_t GetFrame(const CompletionCallbackWithOutput<VideoFrame>& cc); | 62 int32_t GetFrame(const CompletionCallbackWithOutput<VideoFrame>& cc); |
63 | 63 |
64 /// Closes the reader's current stream. | 64 /// Closes the reader's current stream. |
65 void Close(); | 65 void Close(); |
66 }; | 66 }; |
67 | 67 |
68 } // namespace pp | 68 } // namespace pp |
69 | 69 |
70 #endif // PPAPI_CPP_VIDEO_READER_H_ | 70 #endif // PPAPI_CPP_VIDEO_READER_H_ |
OLD | NEW |