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
3 // found in the LICENSE file.
5 #ifndef PPAPI_PROXY_VIDEO_DESTINATION_RESOURCE_H_
6 #define PPAPI_PROXY_VIDEO_DESTINATION_RESOURCE_H_
10 #include "ppapi/c/pp_var.h"
11 #include "ppapi/proxy/connection.h"
12 #include "ppapi/proxy/plugin_resource.h"
13 #include "ppapi/proxy/ppapi_proxy_export.h"
14 #include "ppapi/thunk/ppb_video_destination_private_api.h"
16 struct PP_VideoFrame_Private
;
20 class TrackedCallback
;
24 class PPAPI_PROXY_EXPORT VideoDestinationResource
25 : public PluginResource
,
26 public thunk::PPB_VideoDestination_Private_API
{
28 VideoDestinationResource(Connection connection
,
29 PP_Instance instance
);
30 ~VideoDestinationResource() override
;
32 // Resource overrides.
33 thunk::PPB_VideoDestination_Private_API
* AsPPB_VideoDestination_Private_API()
36 // PPB_VideoDestination_Private_API implementation.
38 const PP_Var
& stream_url
,
39 scoped_refptr
<TrackedCallback
> callback
) override
;
40 int32_t PutFrame(const PP_VideoFrame_Private
& frame
) override
;
41 void Close() override
;
44 void OnPluginMsgOpenComplete(
45 const ResourceMessageReplyParams
& params
);
47 scoped_refptr
<TrackedCallback
> open_callback_
;
50 DISALLOW_COPY_AND_ASSIGN(VideoDestinationResource
);
56 #endif // PPAPI_PROXY_VIDEO_DESTINATION_RESOURCE_H_