blob: 84d83a56b1adeb8ed130360560ef9f60255e3dee [file] [log] [blame]
[email protected]c80a0ba2012-01-13 00:02:291// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]7ace8ad2011-08-06 03:23:582// 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_PROXY_PPP_VIDEO_DECODER_PROXY_H_
6#define PPAPI_PROXY_PPP_VIDEO_DECODER_PROXY_H_
7
8#include "ppapi/c/dev/ppp_video_decoder_dev.h"
9#include "ppapi/c/pp_instance.h"
[email protected]7ace8ad2011-08-06 03:23:5810#include "ppapi/proxy/interface_proxy.h"
[email protected]be0a84b2011-08-13 04:18:4411#include "ppapi/shared_impl/host_resource.h"
[email protected]7ace8ad2011-08-06 03:23:5812
13struct PP_Picture_Dev;
14struct PP_Size;
15
[email protected]4d2efd22011-08-18 21:58:0216namespace ppapi {
[email protected]7ace8ad2011-08-06 03:23:5817namespace proxy {
18
19class PPP_VideoDecoder_Proxy : public InterfaceProxy {
20 public:
[email protected]5c966022011-09-13 18:09:3721 PPP_VideoDecoder_Proxy(Dispatcher* dispatcher);
[email protected]7ace8ad2011-08-06 03:23:5822 virtual ~PPP_VideoDecoder_Proxy();
23
24 static const Info* GetInfo();
25
[email protected]7ace8ad2011-08-06 03:23:5826 // InterfaceProxy implementation.
27 virtual bool OnMessageReceived(const IPC::Message& msg);
28
29 private:
30 // Message handlers.
[email protected]be0a84b2011-08-13 04:18:4431 void OnMsgProvidePictureBuffers(const ppapi::HostResource& decoder,
[email protected]7ace8ad2011-08-06 03:23:5832 uint32_t req_num_of_buffers,
[email protected]08bab532012-06-08 19:39:4533 const PP_Size& dimensions,
34 uint32_t texture_target);
[email protected]be0a84b2011-08-13 04:18:4435 void OnMsgDismissPictureBuffer(const ppapi::HostResource& decoder,
[email protected]7ace8ad2011-08-06 03:23:5836 int32_t picture_id);
[email protected]be0a84b2011-08-13 04:18:4437 void OnMsgPictureReady(const ppapi::HostResource& decoder,
38 const PP_Picture_Dev& picture_buffer);
[email protected]be0a84b2011-08-13 04:18:4439 void OnMsgNotifyError(const ppapi::HostResource& decoder,
[email protected]7ace8ad2011-08-06 03:23:5840 PP_VideoDecodeError_Dev error);
41
[email protected]5c966022011-09-13 18:09:3742 // When this proxy is in the plugin side, this value caches the interface
43 // pointer so we don't have to retrieve it from the dispatcher each time.
44 // In the host, this value is always NULL.
45 const PPP_VideoDecoder_Dev* ppp_video_decoder_impl_;
46
[email protected]7ace8ad2011-08-06 03:23:5847 DISALLOW_COPY_AND_ASSIGN(PPP_VideoDecoder_Proxy);
48};
49
50} // namespace proxy
[email protected]4d2efd22011-08-18 21:58:0251} // namespace ppapi
[email protected]7ace8ad2011-08-06 03:23:5852
53#endif // PPAPI_PROXY_PPP_VIDEO_DECODER_PROXY_H_