summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/api/dev/ppp_video_decoder_dev.idl4
-rw-r--r--ppapi/c/dev/ppp_video_decoder_dev.h36
-rw-r--r--ppapi/cpp/dev/video_decoder_client_dev.cc12
-rw-r--r--ppapi/cpp/dev/video_decoder_client_dev.h6
-rw-r--r--ppapi/examples/gles2/gles2.cc4
-rw-r--r--ppapi/proxy/ppapi_messages.h4
-rw-r--r--ppapi/proxy/ppp_video_decoder_proxy.cc22
-rw-r--r--ppapi/proxy/ppp_video_decoder_proxy.h3
-rw-r--r--ppapi/tests/arch_dependent_sizes_32.h2
-rw-r--r--ppapi/tests/arch_dependent_sizes_64.h2
10 files changed, 32 insertions, 63 deletions
diff --git a/ppapi/api/dev/ppp_video_decoder_dev.idl b/ppapi/api/dev/ppp_video_decoder_dev.idl
index 529a7eb..2a6e419 100644
--- a/ppapi/api/dev/ppp_video_decoder_dev.idl
+++ b/ppapi/api/dev/ppp_video_decoder_dev.idl
@@ -7,7 +7,8 @@
* This file defines the <code>PPP_VideoDecoder_Dev</code> interface.
*/
label Chrome {
- M14 = 0.9
+ M14 = 0.9,
+ M18 = 0.10
};
/**
@@ -76,6 +77,7 @@ interface PPP_VideoDecoder_Dev {
* |instance| the plugin instance to which the callback is responding.
* |decoder| the PPB_VideoDecoder_Dev resource.
*/
+ [deprecate=0.10]
void EndOfStream(
[in] PP_Instance instance,
[in] PP_Resource decoder);
diff --git a/ppapi/c/dev/ppp_video_decoder_dev.h b/ppapi/c/dev/ppp_video_decoder_dev.h
index 8ad59f0..a06b582 100644
--- a/ppapi/c/dev/ppp_video_decoder_dev.h
+++ b/ppapi/c/dev/ppp_video_decoder_dev.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From dev/ppp_video_decoder_dev.idl modified Tue Oct 11 10:01:39 2011. */
+/* From dev/ppp_video_decoder_dev.idl modified Wed Jan 11 14:58:58 2012. */
#ifndef PPAPI_C_DEV_PPP_VIDEO_DECODER_DEV_H_
#define PPAPI_C_DEV_PPP_VIDEO_DECODER_DEV_H_
@@ -16,7 +16,8 @@
#include "ppapi/c/pp_stdint.h"
#define PPP_VIDEODECODER_DEV_INTERFACE_0_9 "PPP_VideoDecoder(Dev);0.9"
-#define PPP_VIDEODECODER_DEV_INTERFACE PPP_VIDEODECODER_DEV_INTERFACE_0_9
+#define PPP_VIDEODECODER_DEV_INTERFACE_0_10 "PPP_VideoDecoder(Dev);0.10"
+#define PPP_VIDEODECODER_DEV_INTERFACE PPP_VIDEODECODER_DEV_INTERFACE_0_10
/**
* @file
@@ -35,7 +36,7 @@
*
* See PPB_VideoDecoder_Dev for general usage tips.
*/
-struct PPP_VideoDecoder_Dev_0_9 {
+struct PPP_VideoDecoder_Dev_0_10 {
/**
* Callback function to provide buffers for the decoded output pictures. If
* succeeds plugin must provide buffers through AssignPictureBuffers function
@@ -80,16 +81,6 @@ struct PPP_VideoDecoder_Dev_0_9 {
PP_Resource decoder,
const struct PP_Picture_Dev* picture);
/**
- * Callback function to tell the plugin that decoder has decoded end of stream
- * marker and output all the pictures that should be displayed from the
- * stream.
- *
- * Parameters:
- * |instance| the plugin instance to which the callback is responding.
- * |decoder| the PPB_VideoDecoder_Dev resource.
- */
- void (*EndOfStream)(PP_Instance instance, PP_Resource decoder);
- /**
* Error handler callback for decoder to deliver information about detected
* errors to the plugin.
*
@@ -103,7 +94,24 @@ struct PPP_VideoDecoder_Dev_0_9 {
PP_VideoDecodeError_Dev error);
};
-typedef struct PPP_VideoDecoder_Dev_0_9 PPP_VideoDecoder_Dev;
+typedef struct PPP_VideoDecoder_Dev_0_10 PPP_VideoDecoder_Dev;
+
+struct PPP_VideoDecoder_Dev_0_9 {
+ void (*ProvidePictureBuffers)(PP_Instance instance,
+ PP_Resource decoder,
+ uint32_t req_num_of_bufs,
+ const struct PP_Size* dimensions);
+ void (*DismissPictureBuffer)(PP_Instance instance,
+ PP_Resource decoder,
+ int32_t picture_buffer_id);
+ void (*PictureReady)(PP_Instance instance,
+ PP_Resource decoder,
+ const struct PP_Picture_Dev* picture);
+ void (*EndOfStream)(PP_Instance instance, PP_Resource decoder);
+ void (*NotifyError)(PP_Instance instance,
+ PP_Resource decoder,
+ PP_VideoDecodeError_Dev error);
+};
/**
* @}
*/
diff --git a/ppapi/cpp/dev/video_decoder_client_dev.cc b/ppapi/cpp/dev/video_decoder_client_dev.cc
index 6186745..20cd329 100644
--- a/ppapi/cpp/dev/video_decoder_client_dev.cc
+++ b/ppapi/cpp/dev/video_decoder_client_dev.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -50,15 +50,6 @@ void PictureReady(PP_Instance instance,
static_cast<VideoDecoderClient_Dev*>(object)->PictureReady(decoder, *picture);
}
-void EndOfStream(PP_Instance instance,
- PP_Resource decoder) {
- void* object = pp::Instance::GetPerInstanceObject(
- instance, kPPPVideoDecoderInterface);
- if (!object)
- return;
- static_cast<VideoDecoderClient_Dev*>(object)->EndOfStream(decoder);
-}
-
void NotifyError(PP_Instance instance,
PP_Resource decoder,
PP_VideoDecodeError_Dev error) {
@@ -73,7 +64,6 @@ static PPP_VideoDecoder_Dev videodecoder_interface = {
&ProvidePictureBuffers,
&DismissPictureBuffer,
&PictureReady,
- &EndOfStream,
&NotifyError,
};
diff --git a/ppapi/cpp/dev/video_decoder_client_dev.h b/ppapi/cpp/dev/video_decoder_client_dev.h
index 5510b4c..7280736 100644
--- a/ppapi/cpp/dev/video_decoder_client_dev.h
+++ b/ppapi/cpp/dev/video_decoder_client_dev.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -36,10 +36,6 @@ class VideoDecoderClient_Dev {
virtual void PictureReady(PP_Resource decoder,
const PP_Picture_Dev& picture) = 0;
- // Callback to notify that decoder has decoded end of stream marker and has
- // outputted all displayable pictures.
- virtual void EndOfStream(PP_Resource decoder) = 0;
-
// Callback to notify about decoding errors.
virtual void NotifyError(PP_Resource decoder,
PP_VideoDecodeError_Dev error) = 0;
diff --git a/ppapi/examples/gles2/gles2.cc b/ppapi/examples/gles2/gles2.cc
index 9e0ea6c..a475230 100644
--- a/ppapi/examples/gles2/gles2.cc
+++ b/ppapi/examples/gles2/gles2.cc
@@ -66,7 +66,6 @@ class GLES2DemoInstance : public pp::Instance,
virtual void DismissPictureBuffer(PP_Resource decoder,
int32_t picture_buffer_id);
virtual void PictureReady(PP_Resource decoder, const PP_Picture_Dev& picture);
- virtual void EndOfStream(PP_Resource decoder);
virtual void NotifyError(PP_Resource decoder, PP_VideoDecodeError_Dev error);
private:
@@ -398,9 +397,6 @@ void GLES2DemoInstance::PictureReady(PP_Resource decoder,
assert(context_->SwapBuffers(cb) == PP_OK_COMPLETIONPENDING);
}
-void GLES2DemoInstance::EndOfStream(PP_Resource decoder) {
-}
-
void GLES2DemoInstance::NotifyError(PP_Resource decoder,
PP_VideoDecodeError_Dev error) {
LogError(this).s() << "Received error: " << error;
diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h
index 0b47a71..085be37 100644
--- a/ppapi/proxy/ppapi_messages.h
+++ b/ppapi/proxy/ppapi_messages.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -489,8 +489,6 @@ IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_DismissPictureBuffer,
IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_PictureReady,
ppapi::HostResource /* video_decoder */,
PP_Picture_Dev /* output picture */)
-IPC_MESSAGE_ROUTED1(PpapiMsg_PPPVideoDecoder_NotifyEndOfStream,
- ppapi::HostResource /* video_decoder */)
IPC_MESSAGE_ROUTED2(PpapiMsg_PPPVideoDecoder_NotifyError,
ppapi::HostResource /* video_decoder */,
PP_VideoDecodeError_Dev /* error */)
diff --git a/ppapi/proxy/ppp_video_decoder_proxy.cc b/ppapi/proxy/ppp_video_decoder_proxy.cc
index d0cb1f3..6330b11 100644
--- a/ppapi/proxy/ppp_video_decoder_proxy.cc
+++ b/ppapi/proxy/ppp_video_decoder_proxy.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -53,15 +53,6 @@ void PictureReady(PP_Instance instance, PP_Resource decoder,
API_ID_PPP_VIDEO_DECODER_DEV, decoder_resource, *picture));
}
-void EndOfStream(PP_Instance instance, PP_Resource decoder) {
- HostResource decoder_resource;
- decoder_resource.SetHostResource(instance, decoder);
-
- HostDispatcher::GetForInstance(instance)->Send(
- new PpapiMsg_PPPVideoDecoder_NotifyEndOfStream(
- API_ID_PPP_VIDEO_DECODER_DEV, decoder_resource));
-}
-
void NotifyError(PP_Instance instance, PP_Resource decoder,
PP_VideoDecodeError_Dev error) {
HostResource decoder_resource;
@@ -76,7 +67,6 @@ static const PPP_VideoDecoder_Dev video_decoder_interface = {
&ProvidePictureBuffers,
&DismissPictureBuffer,
&PictureReady,
- &EndOfStream,
&NotifyError
};
@@ -119,8 +109,6 @@ bool PPP_VideoDecoder_Proxy::OnMessageReceived(const IPC::Message& msg) {
OnMsgDismissPictureBuffer)
IPC_MESSAGE_HANDLER(PpapiMsg_PPPVideoDecoder_PictureReady,
OnMsgPictureReady)
- IPC_MESSAGE_HANDLER(PpapiMsg_PPPVideoDecoder_NotifyEndOfStream,
- OnMsgNotifyEndOfStream)
IPC_MESSAGE_HANDLER(PpapiMsg_PPPVideoDecoder_NotifyError,
OnMsgNotifyError)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -154,14 +142,6 @@ void PPP_VideoDecoder_Proxy::OnMsgPictureReady(
decoder.instance(), plugin_decoder, &picture);
}
-void PPP_VideoDecoder_Proxy::OnMsgNotifyEndOfStream(
- const HostResource& decoder) {
- PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()->
- PluginResourceForHostResource(decoder);
- ppp_video_decoder_impl_->EndOfStream(decoder.instance(),
- plugin_decoder);
-}
-
void PPP_VideoDecoder_Proxy::OnMsgNotifyError(
const HostResource& decoder, PP_VideoDecodeError_Dev error) {
PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()->
diff --git a/ppapi/proxy/ppp_video_decoder_proxy.h b/ppapi/proxy/ppp_video_decoder_proxy.h
index e12c668..c4ff4c3 100644
--- a/ppapi/proxy/ppp_video_decoder_proxy.h
+++ b/ppapi/proxy/ppp_video_decoder_proxy.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -35,7 +35,6 @@ class PPP_VideoDecoder_Proxy : public InterfaceProxy {
int32_t picture_id);
void OnMsgPictureReady(const ppapi::HostResource& decoder,
const PP_Picture_Dev& picture_buffer);
- void OnMsgNotifyEndOfStream(const ppapi::HostResource& decoder);
void OnMsgNotifyError(const ppapi::HostResource& decoder,
PP_VideoDecodeError_Dev error);
diff --git a/ppapi/tests/arch_dependent_sizes_32.h b/ppapi/tests/arch_dependent_sizes_32.h
index 4be5ad7..755907f 100644
--- a/ppapi/tests/arch_dependent_sizes_32.h
+++ b/ppapi/tests/arch_dependent_sizes_32.h
@@ -17,6 +17,6 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_CompletionCallback_Func, 4);
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_URLLoaderTrusted_StatusCallback, 4);
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_CompletionCallback, 12);
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PPB_VideoDecoder_Dev, 32);
-PP_COMPILE_ASSERT_SIZE_IN_BYTES(PPP_VideoDecoder_Dev, 20);
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PPP_VideoDecoder_Dev, 16);
#endif /* PPAPI_TESTS_ARCH_DEPENDENT_SIZES_32_H_ */
diff --git a/ppapi/tests/arch_dependent_sizes_64.h b/ppapi/tests/arch_dependent_sizes_64.h
index 68f4e05..bd30300 100644
--- a/ppapi/tests/arch_dependent_sizes_64.h
+++ b/ppapi/tests/arch_dependent_sizes_64.h
@@ -17,6 +17,6 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_CompletionCallback_Func, 8);
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_URLLoaderTrusted_StatusCallback, 8);
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_CompletionCallback, 24);
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PPB_VideoDecoder_Dev, 64);
-PP_COMPILE_ASSERT_SIZE_IN_BYTES(PPP_VideoDecoder_Dev, 40);
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PPP_VideoDecoder_Dev, 32);
#endif /* PPAPI_TESTS_ARCH_DEPENDENT_SIZES_64_H_ */