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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 gfx::Rect(frame_size), | 792 gfx::Rect(frame_size), |
793 natural_size_, | 793 natural_size_, |
794 frame_info->strides[PP_DECRYPTEDFRAMEPLANES_Y], | 794 frame_info->strides[PP_DECRYPTEDFRAMEPLANES_Y], |
795 frame_info->strides[PP_DECRYPTEDFRAMEPLANES_U], | 795 frame_info->strides[PP_DECRYPTEDFRAMEPLANES_U], |
796 frame_info->strides[PP_DECRYPTEDFRAMEPLANES_V], | 796 frame_info->strides[PP_DECRYPTEDFRAMEPLANES_V], |
797 frame_data + frame_info->plane_offsets[PP_DECRYPTEDFRAMEPLANES_Y], | 797 frame_data + frame_info->plane_offsets[PP_DECRYPTEDFRAMEPLANES_Y], |
798 frame_data + frame_info->plane_offsets[PP_DECRYPTEDFRAMEPLANES_U], | 798 frame_data + frame_info->plane_offsets[PP_DECRYPTEDFRAMEPLANES_U], |
799 frame_data + frame_info->plane_offsets[PP_DECRYPTEDFRAMEPLANES_V], | 799 frame_data + frame_info->plane_offsets[PP_DECRYPTEDFRAMEPLANES_V], |
800 base::TimeDelta::FromMicroseconds( | 800 base::TimeDelta::FromMicroseconds( |
801 frame_info->tracking_info.timestamp), | 801 frame_info->tracking_info.timestamp), |
802 media::BindToLoop( | 802 media::BindToCurrentLoop( |
803 base::MessageLoopProxy::current(), | |
804 base::Bind(&BufferNoLongerNeeded, | 803 base::Bind(&BufferNoLongerNeeded, |
805 ppb_buffer, | 804 ppb_buffer, |
806 base::Bind(&ContentDecryptorDelegate::FreeBuffer, | 805 base::Bind(&ContentDecryptorDelegate::FreeBuffer, |
807 weak_this_, | 806 weak_this_, |
808 frame_info->tracking_info.buffer_id)))); | 807 frame_info->tracking_info.buffer_id)))); |
809 | 808 |
810 video_decode_cb.Run(Decryptor::kSuccess, decoded_frame); | 809 video_decode_cb.Run(Decryptor::kSuccess, decoded_frame); |
811 } | 810 } |
812 | 811 |
813 void ContentDecryptorDelegate::DeliverSamples( | 812 void ContentDecryptorDelegate::DeliverSamples( |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1016 frames->push_back(frame); | 1015 frames->push_back(frame); |
1017 | 1016 |
1018 cur += frame_size; | 1017 cur += frame_size; |
1019 bytes_left -= frame_size; | 1018 bytes_left -= frame_size; |
1020 } while (bytes_left > 0); | 1019 } while (bytes_left > 0); |
1021 | 1020 |
1022 return true; | 1021 return true; |
1023 } | 1022 } |
1024 | 1023 |
1025 } // namespace content | 1024 } // namespace content |
OLD | NEW |