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

Unified Diff: remoting/client/plugin/pepper_video_renderer_3d.cc

Issue 1207043002: Introduce a client minimum picture pool size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved constant to shared header, validate min_picture_size now in resource proxy as well as host co… Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/thunk/ppb_video_decoder_thunk.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/pepper_video_renderer_3d.cc
diff --git a/remoting/client/plugin/pepper_video_renderer_3d.cc b/remoting/client/plugin/pepper_video_renderer_3d.cc
index 4aec10f337fbfe81d21bd0c7a9f506534c317fb3..7aaede1625f33e447225fecdd6d0e706804b45f3 100644
--- a/remoting/client/plugin/pepper_video_renderer_3d.cc
+++ b/remoting/client/plugin/pepper_video_renderer_3d.cc
@@ -10,6 +10,7 @@
#include "base/stl_util.h"
#include "ppapi/c/pp_codecs.h"
#include "ppapi/c/ppb_opengles2.h"
+#include "ppapi/c/ppb_video_decoder.h"
#include "ppapi/cpp/instance.h"
#include "ppapi/lib/gl/include/GLES2/gl2.h"
#include "ppapi/lib/gl/include/GLES2/gl2ext.h"
@@ -18,6 +19,10 @@
namespace remoting {
+// The implementation here requires this minimum number of pictures from the
+// video decoder interface to work.
+const uint32_t kMinimumPictureCount = 3;
+
class PepperVideoRenderer3D::PendingPacket {
public:
PendingPacket(scoped_ptr<VideoPacket> packet, const base::Closure& done)
@@ -170,8 +175,13 @@ void PepperVideoRenderer3D::OnSessionConfig(
default:
NOTREACHED();
}
+
+ bool supports_video_decoder_1_1 =
+ pp::Module::Get()->GetBrowserInterface(
+ PPB_VIDEODECODER_INTERFACE_1_1) != NULL;
int32_t result = video_decoder_.Initialize(
graphics_, video_profile, PP_HARDWAREACCELERATION_WITHFALLBACK,
+ supports_video_decoder_1_1 ? kMinimumPictureCount : 0,
callback_factory_.NewCallback(&PepperVideoRenderer3D::OnInitialized));
CHECK_EQ(result, PP_OK_COMPLETIONPENDING)
<< "video_decoder_.Initialize() returned " << result;
« no previous file with comments | « ppapi/thunk/ppb_video_decoder_thunk.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698