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

Side by Side Diff: ppapi/cpp/video_encoder.cc

Issue 901733002: Pepper: Make C++ pp::VideoEncoder wrapper compilable on non-C++11 builds. (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
« no previous file with comments | « ppapi/cpp/video_encoder.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/cpp/video_encoder.h" 5 #include "ppapi/cpp/video_encoder.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/ppb_video_encoder.h" 8 #include "ppapi/c/ppb_video_encoder.h"
9 #include "ppapi/cpp/completion_callback.h" 9 #include "ppapi/cpp/completion_callback.h"
10 #include "ppapi/cpp/instance_handle.h" 10 #include "ppapi/cpp/instance_handle.h"
(...skipping 18 matching lines...) Expand all
29 if (has_interface<PPB_VideoEncoder_0_1>()) { 29 if (has_interface<PPB_VideoEncoder_0_1>()) {
30 PassRefFromConstructor( 30 PassRefFromConstructor(
31 get_interface<PPB_VideoEncoder_0_1>()->Create(instance.pp_instance())); 31 get_interface<PPB_VideoEncoder_0_1>()->Create(instance.pp_instance()));
32 } 32 }
33 } 33 }
34 34
35 VideoEncoder::VideoEncoder(const VideoEncoder& other) : Resource(other) { 35 VideoEncoder::VideoEncoder(const VideoEncoder& other) : Resource(other) {
36 } 36 }
37 37
38 int32_t VideoEncoder::GetSupportedProfiles(const CompletionCallbackWithOutput< 38 int32_t VideoEncoder::GetSupportedProfiles(const CompletionCallbackWithOutput<
39 std::vector<PP_VideoProfileDescription>>& cc) { 39 std::vector<PP_VideoProfileDescription> >& cc) {
40 if (has_interface<PPB_VideoEncoder_0_1>()) { 40 if (has_interface<PPB_VideoEncoder_0_1>()) {
41 return get_interface<PPB_VideoEncoder_0_1>()->GetSupportedProfiles( 41 return get_interface<PPB_VideoEncoder_0_1>()->GetSupportedProfiles(
42 pp_resource(), cc.output(), cc.pp_completion_callback()); 42 pp_resource(), cc.output(), cc.pp_completion_callback());
43 } 43 }
44 return cc.MayForce(PP_ERROR_NOINTERFACE); 44 return cc.MayForce(PP_ERROR_NOINTERFACE);
45 } 45 }
46 46
47 int32_t VideoEncoder::Initialize(const PP_VideoFrame_Format& input_format, 47 int32_t VideoEncoder::Initialize(const PP_VideoFrame_Format& input_format,
48 const PP_Size& input_visible_size, 48 const PP_Size& input_visible_size,
49 const PP_VideoProfile& output_profile, 49 const PP_VideoProfile& output_profile,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 } 120 }
121 121
122 void VideoEncoder::Close() { 122 void VideoEncoder::Close() {
123 if (has_interface<PPB_VideoEncoder_0_1>()) { 123 if (has_interface<PPB_VideoEncoder_0_1>()) {
124 get_interface<PPB_VideoEncoder_0_1>()->Close(pp_resource()); 124 get_interface<PPB_VideoEncoder_0_1>()->Close(pp_resource());
125 } 125 }
126 } 126 }
127 127
128 } // namespace pp 128 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/video_encoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698