| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/shared_impl/video_decoder_impl.h" | 5 #include "ppapi/shared_impl/video_decoder_impl.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "gpu/command_buffer/client/gles2_implementation.h" | 8 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
| 10 #include "ppapi/proxy/plugin_resource_tracker.h" | 10 #include "ppapi/proxy/plugin_resource_tracker.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 PP_CompletionCallback cc = it->second; | 82 PP_CompletionCallback cc = it->second; |
| 83 bitstream_buffer_callbacks_.erase(it); | 83 bitstream_buffer_callbacks_.erase(it); |
| 84 PP_RunCompletionCallback(&cc, PP_OK); | 84 PP_RunCompletionCallback(&cc, PP_OK); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void VideoDecoderImpl::FlushCommandBuffer() { | 87 void VideoDecoderImpl::FlushCommandBuffer() { |
| 88 if (gles2_impl_) | 88 if (gles2_impl_) |
| 89 gles2_impl_->Flush(); | 89 gles2_impl_->Flush(); |
| 90 } | 90 } |
| 91 | 91 |
| 92 bool VideoDecoderImpl::CopyConfigsToVector( | |
| 93 const PP_VideoConfigElement* configs_to_copy, | |
| 94 std::vector<PP_VideoConfigElement>* out_configs) { | |
| 95 // TODO(fischman/vrk): This is still broken. We need to get rid of the silly | |
| 96 // PP_VideoConfigElement vector in favor of a struct (see TODO in | |
| 97 // ppb_video_decoder_dev.h). | |
| 98 const PP_VideoConfigElement* current = configs_to_copy; | |
| 99 while (current && *current != PP_VIDEOATTR_DICTIONARY_TERMINATOR) { | |
| 100 out_configs->push_back(*current); | |
| 101 out_configs->push_back(*(current + 1)); | |
| 102 current += 2; | |
| 103 } | |
| 104 return true; | |
| 105 } | |
| 106 | |
| 107 } // namespace ppapi | 92 } // namespace ppapi |
| OLD | NEW |