blob: 9e3eab684811944039f41acfdba1438ddfb2b798 [file] [log] [blame]
[email protected]7ace8ad2011-08-06 03:23:581// Copyright (c) 2011 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_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
16namespace pp {
17namespace proxy {
18
19class PPP_VideoDecoder_Proxy : public InterfaceProxy {
20 public:
21 PPP_VideoDecoder_Proxy(Dispatcher* dispatcher, const void* target_interface);
22 virtual ~PPP_VideoDecoder_Proxy();
23
24 static const Info* GetInfo();
25
26 const PPP_VideoDecoder_Dev* ppp_video_decoder_target() const {
27 return static_cast<const PPP_VideoDecoder_Dev*>(target_interface());
28 }
29
30 // InterfaceProxy implementation.
31 virtual bool OnMessageReceived(const IPC::Message& msg);
32
33 private:
34 // Message handlers.
[email protected]be0a84b2011-08-13 04:18:4435 void OnMsgProvidePictureBuffers(const ppapi::HostResource& decoder,
[email protected]7ace8ad2011-08-06 03:23:5836 uint32_t req_num_of_buffers,
37 const PP_Size& dimensions);
[email protected]be0a84b2011-08-13 04:18:4438 void OnMsgDismissPictureBuffer(const ppapi::HostResource& decoder,
[email protected]7ace8ad2011-08-06 03:23:5839 int32_t picture_id);
[email protected]be0a84b2011-08-13 04:18:4440 void OnMsgPictureReady(const ppapi::HostResource& decoder,
41 const PP_Picture_Dev& picture_buffer);
42 void OnMsgNotifyEndOfStream(const ppapi::HostResource& decoder);
43 void OnMsgNotifyError(const ppapi::HostResource& decoder,
[email protected]7ace8ad2011-08-06 03:23:5844 PP_VideoDecodeError_Dev error);
45
46 DISALLOW_COPY_AND_ASSIGN(PPP_VideoDecoder_Proxy);
47};
48
49} // namespace proxy
50} // namespace pp
51
52#endif // PPAPI_PROXY_PPP_VIDEO_DECODER_PROXY_H_