OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 <GLES2/gl2.h> | 5 #include <GLES2/gl2.h> |
6 #include <GLES2/gl2ext.h> | 6 #include <GLES2/gl2ext.h> |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include <iostream> | 10 #include <iostream> |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 #if defined USE_VP8_TESTDATA_INSTEAD_OF_H264 | 248 #if defined USE_VP8_TESTDATA_INSTEAD_OF_H264 |
249 const PP_VideoProfile kBitstreamProfile = PP_VIDEOPROFILE_VP8_ANY; | 249 const PP_VideoProfile kBitstreamProfile = PP_VIDEOPROFILE_VP8_ANY; |
250 #else | 250 #else |
251 const PP_VideoProfile kBitstreamProfile = PP_VIDEOPROFILE_H264MAIN; | 251 const PP_VideoProfile kBitstreamProfile = PP_VIDEOPROFILE_H264MAIN; |
252 #endif | 252 #endif |
253 | 253 |
254 assert(!decoder_->is_null()); | 254 assert(!decoder_->is_null()); |
255 decoder_->Initialize(graphics_3d, | 255 decoder_->Initialize(graphics_3d, |
256 kBitstreamProfile, | 256 kBitstreamProfile, |
257 PP_HARDWAREACCELERATION_WITHFALLBACK, | 257 PP_HARDWAREACCELERATION_WITHFALLBACK, |
| 258 0, |
258 callback_factory_.NewCallback(&Decoder::InitializeDone)); | 259 callback_factory_.NewCallback(&Decoder::InitializeDone)); |
259 } | 260 } |
260 | 261 |
261 Decoder::~Decoder() { | 262 Decoder::~Decoder() { |
262 delete decoder_; | 263 delete decoder_; |
263 } | 264 } |
264 | 265 |
265 void Decoder::InitializeDone(int32_t result) { | 266 void Decoder::InitializeDone(int32_t result) { |
266 assert(decoder_); | 267 assert(decoder_); |
267 assert(result == PP_OK); | 268 assert(result == PP_OK); |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 }; | 727 }; |
727 | 728 |
728 } // anonymous namespace | 729 } // anonymous namespace |
729 | 730 |
730 namespace pp { | 731 namespace pp { |
731 // Factory function for your specialization of the Module object. | 732 // Factory function for your specialization of the Module object. |
732 Module* CreateModule() { | 733 Module* CreateModule() { |
733 return new MyModule(); | 734 return new MyModule(); |
734 } | 735 } |
735 } // namespace pp | 736 } // namespace pp |
OLD | NEW |