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

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

Issue 122383002: [WIP][PPAPI] Implement MediaStreamVideoTrackResource. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@io_stream_cl
Patch Set: Update Created 6 years, 11 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
« no previous file with comments | « ppapi/proxy/interface_list.cc ('k') | ppapi/proxy/media_stream_video_track_resource.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 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_MEDIA_STREAM_VIDEO_TRACK_RESOURCE_H_
6 #define PPAPI_PROXY_MEDIA_STREAM_VIDEO_TRACK_RESOURCE_H_
7
8 #include "ppapi/proxy/io_stream_resource.h"
9 #include "ppapi/proxy/plugin_resource.h"
10 #include "ppapi/proxy/ppapi_proxy_export.h"
11 #include "ppapi/shared_impl/proxy_lock.h"
12 #include "ppapi/thunk/ppb_media_stream_video_track_api.h"
13
14 namespace ppapi {
15 namespace proxy {
16
17 class VideoFrameResource;
18
19 class PPAPI_PROXY_EXPORT MediaStreamVideoTrackResource
20 : public IOStreamResource,
21 public ppapi::thunk::PPB_MediaStreamVideoTrack_API{
22 public:
23 MediaStreamVideoTrackResource(Connection connection,
24 PP_Instance instance,
25 int pending_renderer_id,
26 const std::string& id);
27
28 virtual ~MediaStreamVideoTrackResource();
29
30 // Resource implementation.
31 virtual thunk::PPB_MediaStreamVideoTrack_API* AsPPB_MediaStreamVideoTrack_API(
32 ) OVERRIDE;
33
34 // PPB_MediaStreamVideoTrack_API implementation.
35 virtual PP_Var GetId() OVERRIDE;
36 virtual PP_Bool HasEnded() OVERRIDE;
37 virtual int32_t Configure(uint32_t max_buffered_frames) OVERRIDE;
38 virtual int32_t GetFrame(
39 PP_Resource* frame,
40 const scoped_refptr<ppapi::TrackedCallback>& callback) OVERRIDE;
41 virtual int32_t RecycleFrame(PP_Resource frame) OVERRIDE;
42 virtual int32_t Close() OVERRIDE;
43
44 virtual void OnReplyReceived(const proxy::ResourceMessageReplyParams& params,
45 const IPC::Message& msg) OVERRIDE;
46
47 protected:
48 virtual void OnMoreBufferAvailable() OVERRIDE;
49
50 private:
51
52 PP_Resource CreateCurrentFrame();
53
54 std::string id_;
55
56 VideoFrameResource* current_frame_;
57
58 PP_Resource* get_frame_output_;
59 scoped_refptr<TrackedCallback> get_frame_callback_;
60
61 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrackResource);
62 };
63
64 } // namespace proxy
65 } // namespace ppapi
66
67 #endif // PPAPI_PROXY_MEDIA_STREAM_VIDEO_TRACK_RESOURCE_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/interface_list.cc ('k') | ppapi/proxy/media_stream_video_track_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698