summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ppapi/api/ppb_video_writer.idl6
-rw-r--r--ppapi/c/ppb_video_writer.h8
-rw-r--r--ppapi/cpp/video_reader.cc5
-rw-r--r--ppapi/cpp/video_reader.h6
-rw-r--r--ppapi/cpp/video_writer.cc6
-rw-r--r--ppapi/cpp/video_writer.h9
-rw-r--r--ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c4
7 files changed, 20 insertions, 24 deletions
diff --git a/ppapi/api/ppb_video_writer.idl b/ppapi/api/ppb_video_writer.idl
index e1a7757..cf92f3e 100644
--- a/ppapi/api/ppb_video_writer.idl
+++ b/ppapi/api/ppb_video_writer.idl
@@ -44,8 +44,8 @@ interface PPB_VideoWriter {
*
* @param[in] writer A <code>PP_Resource</code> corresponding to a video
* writer resource.
- * @param[in] stream_id A <code>PP_Var</code> holding a string uniquely
- * identifying the stream. This string is application defined.
+ * @param[out] stream_id A <code>PP_Var</code> holding a string uniquely
+ * identifying the stream. This string is generated by the host.
* @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
* completion of Open().
*
@@ -54,7 +54,7 @@ interface PPB_VideoWriter {
* Returns PP_ERROR_INPROGRESS if the writer has already opened a stream.
*/
int32_t Open([in] PP_Resource writer,
- [in] PP_Var stream_id,
+ [out] PP_Var stream_id,
[in] PP_CompletionCallback callback);
/**
diff --git a/ppapi/c/ppb_video_writer.h b/ppapi/c/ppb_video_writer.h
index 7f6681a..1aaa3ac 100644
--- a/ppapi/c/ppb_video_writer.h
+++ b/ppapi/c/ppb_video_writer.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_video_writer.idl modified Thu Apr 4 13:47:32 2013. */
+/* From ppb_video_writer.idl modified Fri Apr 5 15:46:57 2013. */
#ifndef PPAPI_C_PPB_VIDEO_WRITER_H_
#define PPAPI_C_PPB_VIDEO_WRITER_H_
@@ -62,8 +62,8 @@ struct PPB_VideoWriter_0_1 {
*
* @param[in] writer A <code>PP_Resource</code> corresponding to a video
* writer resource.
- * @param[in] stream_id A <code>PP_Var</code> holding a string uniquely
- * identifying the stream. This string is application defined.
+ * @param[out] stream_id A <code>PP_Var</code> holding a string uniquely
+ * identifying the stream. This string is generated by the host.
* @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
* completion of Open().
*
@@ -72,7 +72,7 @@ struct PPB_VideoWriter_0_1 {
* Returns PP_ERROR_INPROGRESS if the writer has already opened a stream.
*/
int32_t (*Open)(PP_Resource writer,
- struct PP_Var stream_id,
+ struct PP_Var* stream_id,
struct PP_CompletionCallback callback);
/**
* Puts a frame of video to the writer's open stream.
diff --git a/ppapi/cpp/video_reader.cc b/ppapi/cpp/video_reader.cc
index ac7fe79..9ae83bb 100644
--- a/ppapi/cpp/video_reader.cc
+++ b/ppapi/cpp/video_reader.cc
@@ -42,14 +42,13 @@ VideoReader::VideoReader(PassRef, PP_Resource resource)
: Resource(PASS_REF, resource) {
}
-int32_t VideoReader::Open(const std::string& stream_id,
+int32_t VideoReader::Open(const Var& stream_id,
const CompletionCallback& cc) {
if (has_interface<PPB_VideoReader_0_1>()) {
- Var id(stream_id);
int32_t result =
get_interface<PPB_VideoReader_0_1>()->Open(
pp_resource(),
- id.pp_var(), cc.pp_completion_callback());
+ stream_id.pp_var(), cc.pp_completion_callback());
return result;
}
return cc.MayForce(PP_ERROR_NOINTERFACE);
diff --git a/ppapi/cpp/video_reader.h b/ppapi/cpp/video_reader.h
index 5304a79..57e85a5c 100644
--- a/ppapi/cpp/video_reader.h
+++ b/ppapi/cpp/video_reader.h
@@ -44,13 +44,13 @@ class VideoReader : public Resource {
/// Opens a stream for reading video and associates it with the given id.
///
- /// @param[in] stream_id A string uniquely identifying the stream to read
- /// from.
+ /// @param[in] stream_id A <code>Var</code> uniquely identifying the stream
+ /// to read from.
/// @param[in] callback A <code>CompletionCallback</code> to be called upon
/// completion of Open.
///
/// @return A return code from <code>pp_errors.h</code>.
- int32_t Open(const std::string& stream_id,
+ int32_t Open(const Var& stream_id,
const CompletionCallback& cc);
/// Gets the next frame of video from the reader's stream.
diff --git a/ppapi/cpp/video_writer.cc b/ppapi/cpp/video_writer.cc
index d133cd6..372bfad 100644
--- a/ppapi/cpp/video_writer.cc
+++ b/ppapi/cpp/video_writer.cc
@@ -42,14 +42,12 @@ VideoWriter::VideoWriter(PassRef, PP_Resource resource)
: Resource(PASS_REF, resource) {
}
-int32_t VideoWriter::Open(const std::string& stream_id,
- const CompletionCallback& cc) {
+int32_t VideoWriter::Open(const CompletionCallbackWithOutput<Var>& cc) {
if (has_interface<PPB_VideoWriter_0_1>()) {
- Var id(stream_id);
int32_t result =
get_interface<PPB_VideoWriter_0_1>()->Open(
pp_resource(),
- id.pp_var(), cc.pp_completion_callback());
+ cc.output(), cc.pp_completion_callback());
return result;
}
return cc.MayForce(PP_ERROR_NOINTERFACE);
diff --git a/ppapi/cpp/video_writer.h b/ppapi/cpp/video_writer.h
index c840910..0b878c4 100644
--- a/ppapi/cpp/video_writer.h
+++ b/ppapi/cpp/video_writer.h
@@ -45,13 +45,12 @@ class VideoWriter : public Resource {
/// Opens a stream for writing video and associates it with the given id.
///
- /// @param[in] stream_id A string uniquely identifying the stream to write to.
- /// @param[in] callback A <code>CompletionCallback</code> to be called upon
- /// completion of Open.
+ /// @param[in] callback A <code>CompletionCallbackWithOutput</code> to be
+ /// called upon completion of Open which writes the stream id generated by
+ /// the host.
///
/// @return A return code from <code>pp_errors.h</code>.
- int32_t Open(const std::string& stream_id,
- const CompletionCallback& cc);
+ int32_t Open(const CompletionCallbackWithOutput<Var>& cc);
/// Puts the next frame of video to the writer's stream.
///
diff --git a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
index bdf4c60..51a27c4 100644
--- a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
+++ b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
@@ -1251,7 +1251,7 @@ PP_Bool Pnacl_M28_PPB_VideoWriter_IsVideoWriter(PP_Resource resource) {
}
static __attribute__((pnaclcall))
-int32_t Pnacl_M28_PPB_VideoWriter_Open(PP_Resource writer, struct PP_Var stream_id, struct PP_CompletionCallback callback) {
+int32_t Pnacl_M28_PPB_VideoWriter_Open(PP_Resource writer, struct PP_Var* stream_id, struct PP_CompletionCallback callback) {
const struct PPB_VideoWriter_0_1 *iface = Pnacl_WrapperInfo_PPB_VideoWriter_0_1.real_iface;
return iface->Open(writer, stream_id, callback);
}
@@ -4179,7 +4179,7 @@ struct PPB_VideoReader_0_1 Pnacl_Wrappers_PPB_VideoReader_0_1 = {
struct PPB_VideoWriter_0_1 Pnacl_Wrappers_PPB_VideoWriter_0_1 = {
.Create = (PP_Resource (*)(PP_Instance instance))&Pnacl_M28_PPB_VideoWriter_Create,
.IsVideoWriter = (PP_Bool (*)(PP_Resource resource))&Pnacl_M28_PPB_VideoWriter_IsVideoWriter,
- .Open = (int32_t (*)(PP_Resource writer, struct PP_Var stream_id, struct PP_CompletionCallback callback))&Pnacl_M28_PPB_VideoWriter_Open,
+ .Open = (int32_t (*)(PP_Resource writer, struct PP_Var* stream_id, struct PP_CompletionCallback callback))&Pnacl_M28_PPB_VideoWriter_Open,
.PutFrame = (int32_t (*)(PP_Resource writer, const struct PP_VideoFrame* frame))&Pnacl_M28_PPB_VideoWriter_PutFrame,
.Close = (void (*)(PP_Resource writer))&Pnacl_M28_PPB_VideoWriter_Close
};