| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/pepper/content_decryptor_delegate.h" | 5 #include "content/renderer/pepper/content_decryptor_delegate.h" |
| 6 | 6 |
| 7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "base/safe_numerics.h" | 10 #include "base/safe_numerics.h" |
| (...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 gfx::Rect(frame_size), | 836 gfx::Rect(frame_size), |
| 837 natural_size_, | 837 natural_size_, |
| 838 frame_info->strides[PP_DECRYPTEDFRAMEPLANES_Y], | 838 frame_info->strides[PP_DECRYPTEDFRAMEPLANES_Y], |
| 839 frame_info->strides[PP_DECRYPTEDFRAMEPLANES_U], | 839 frame_info->strides[PP_DECRYPTEDFRAMEPLANES_U], |
| 840 frame_info->strides[PP_DECRYPTEDFRAMEPLANES_V], | 840 frame_info->strides[PP_DECRYPTEDFRAMEPLANES_V], |
| 841 frame_data + frame_info->plane_offsets[PP_DECRYPTEDFRAMEPLANES_Y], | 841 frame_data + frame_info->plane_offsets[PP_DECRYPTEDFRAMEPLANES_Y], |
| 842 frame_data + frame_info->plane_offsets[PP_DECRYPTEDFRAMEPLANES_U], | 842 frame_data + frame_info->plane_offsets[PP_DECRYPTEDFRAMEPLANES_U], |
| 843 frame_data + frame_info->plane_offsets[PP_DECRYPTEDFRAMEPLANES_V], | 843 frame_data + frame_info->plane_offsets[PP_DECRYPTEDFRAMEPLANES_V], |
| 844 base::TimeDelta::FromMicroseconds( | 844 base::TimeDelta::FromMicroseconds( |
| 845 frame_info->tracking_info.timestamp), | 845 frame_info->tracking_info.timestamp), |
| 846 media::BindToLoop( | 846 media::BindToCurrentLoop( |
| 847 base::MessageLoopProxy::current(), | |
| 848 base::Bind(&BufferNoLongerNeeded, | 847 base::Bind(&BufferNoLongerNeeded, |
| 849 ppb_buffer, | 848 ppb_buffer, |
| 850 base::Bind(&ContentDecryptorDelegate::FreeBuffer, | 849 base::Bind(&ContentDecryptorDelegate::FreeBuffer, |
| 851 weak_this_, | 850 weak_this_, |
| 852 frame_info->tracking_info.buffer_id)))); | 851 frame_info->tracking_info.buffer_id)))); |
| 853 | 852 |
| 854 video_decode_cb.Run(media::Decryptor::kSuccess, decoded_frame); | 853 video_decode_cb.Run(media::Decryptor::kSuccess, decoded_frame); |
| 855 } | 854 } |
| 856 | 855 |
| 857 void ContentDecryptorDelegate::DeliverSamples( | 856 void ContentDecryptorDelegate::DeliverSamples( |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 frames->push_back(frame); | 1067 frames->push_back(frame); |
| 1069 | 1068 |
| 1070 cur += frame_size; | 1069 cur += frame_size; |
| 1071 bytes_left -= frame_size; | 1070 bytes_left -= frame_size; |
| 1072 } while (bytes_left > 0); | 1071 } while (bytes_left > 0); |
| 1073 | 1072 |
| 1074 return true; | 1073 return true; |
| 1075 } | 1074 } |
| 1076 | 1075 |
| 1077 } // namespace content | 1076 } // namespace content |
| OLD | NEW |