Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: ppapi/proxy/video_encoder_resource.h

Issue 887223009: ppapi: VideoEncoder: Add proxy boilerplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
bbudge 2015/02/05 18:40:52 nit: I think we're dropping the (c) copyright symb
llandwerlin-old 2015/02/05 22:17:36 Done.
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_VIDEO_ENCODER_RESOURCE_API_H_
bbudge 2015/02/05 18:40:52 Guard name should be PPAPI_PROXY_VIDEO_ENCODER_RES
llandwerlin-old 2015/02/05 22:17:36 Done.
6 #define PPAPI_PROXY_VIDEO_ENCODER_RESOURCE_API_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "ppapi/proxy/connection.h"
10 #include "ppapi/proxy/plugin_resource.h"
11 #include "ppapi/shared_impl/resource.h"
12 #include "ppapi/thunk/ppb_video_encoder_api.h"
13
14 namespace ppapi {
15
16 class TrackedCallback;
17
18 namespace proxy {
19
20 class PPAPI_PROXY_EXPORT VideoEncoderResource
21 : public PluginResource,
22 public thunk::PPB_VideoEncoder_API {
23 public:
24 VideoEncoderResource(Connection connection, PP_Instance instance);
25 ~VideoEncoderResource() override;
26
27 thunk::PPB_VideoEncoder_API* AsPPB_VideoEncoder_API() override;
28
29 private:
30 // PPB_VideoEncoder_API implementation.
31 int32_t GetSupportedProfiles(
32 const PP_ArrayOutput& output,
33 const scoped_refptr<TrackedCallback>& callback) override;
34 int32_t Initialize(PP_VideoFrame_Format input_format,
35 const PP_Size* input_visible_size,
36 PP_VideoProfile output_profile,
37 uint32_t initial_bitrate,
38 PP_HardwareAcceleration acceleration,
39 const scoped_refptr<TrackedCallback>& callback) override;
40 int32_t GetFramesRequired() override;
41 int32_t GetFrameCodedSize(PP_Size* size) override;
42 int32_t GetVideoFrame(
43 PP_Resource* video_frame,
44 const scoped_refptr<TrackedCallback>& callback) override;
45 int32_t Encode(PP_Resource video_frame,
46 PP_Bool force_keyframe,
47 const scoped_refptr<TrackedCallback>& callback) override;
48 int32_t GetBitstreamBuffer(
49 PP_BitstreamBuffer* picture,
50 const scoped_refptr<TrackedCallback>& callback) override;
51 void RecycleBitstreamBuffer(const PP_BitstreamBuffer* picture) override;
52 void RequestEncodingParametersChange(uint32_t bitrate,
53 uint32_t framerate) override;
54 void Close() override;
55
56 DISALLOW_COPY_AND_ASSIGN(VideoEncoderResource);
57 };
58
59 } // namespace proxy
60 } // namespace ppapi
61
62 #endif // PPAPI_PROXY_VIDEO_ENCODER_RESOURCE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698