| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 encoded_data_next_pos_to_decode_(0), | 239 encoded_data_next_pos_to_decode_(0), |
| 240 next_picture_id_(0), | 240 next_picture_id_(0), |
| 241 flushing_(false), | 241 flushing_(false), |
| 242 resetting_(false), | 242 resetting_(false), |
| 243 total_latency_(0.0), | 243 total_latency_(0.0), |
| 244 num_pictures_(0) { | 244 num_pictures_(0) { |
| 245 core_if_ = static_cast<const PPB_Core*>( | 245 core_if_ = static_cast<const PPB_Core*>( |
| 246 pp::Module::Get()->GetBrowserInterface(PPB_CORE_INTERFACE)); | 246 pp::Module::Get()->GetBrowserInterface(PPB_CORE_INTERFACE)); |
| 247 | 247 |
| 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_VP8MAIN; | 249 const PP_VideoProfile kBitstreamProfile = |
| 250 PP_VIDEOPROFILE_VP8PROFILE_UNSPECIFIED; |
| 250 #else | 251 #else |
| 251 const PP_VideoProfile kBitstreamProfile = PP_VIDEOPROFILE_H264MAIN; | 252 const PP_VideoProfile kBitstreamProfile = PP_VIDEOPROFILE_H264MAIN; |
| 252 #endif | 253 #endif |
| 253 | 254 |
| 254 assert(!decoder_->is_null()); | 255 assert(!decoder_->is_null()); |
| 255 decoder_->Initialize(graphics_3d, | 256 decoder_->Initialize(graphics_3d, |
| 256 kBitstreamProfile, | 257 kBitstreamProfile, |
| 257 PP_TRUE /* allow_software_fallback */, | 258 PP_TRUE /* allow_software_fallback */, |
| 258 callback_factory_.NewCallback(&Decoder::InitializeDone)); | 259 callback_factory_.NewCallback(&Decoder::InitializeDone)); |
| 259 } | 260 } |
| (...skipping 466 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 |