OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "content/renderer/pepper/video_decoder_shim.h" | 5 #include "content/renderer/pepper/video_decoder_shim.h" |
6 | 6 |
7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
8 #include <GLES2/gl2ext.h> | 8 #include <GLES2/gl2ext.h> |
9 #include <GLES2/gl2extchromium.h> | 9 #include <GLES2/gl2extchromium.h> |
10 #include <utility> | 10 #include <utility> |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 #elif defined(MEDIA_DISABLE_LIBVPX) | 703 #elif defined(MEDIA_DISABLE_LIBVPX) |
704 OnInitDone(false); | 704 OnInitDone(false); |
705 return; | 705 return; |
706 #endif | 706 #endif |
707 | 707 |
708 // VpxVideoDecoder and FFmpegVideoDecoder support only one pending Decode() | 708 // VpxVideoDecoder and FFmpegVideoDecoder support only one pending Decode() |
709 // request. | 709 // request. |
710 DCHECK_EQ(decoder_->GetMaxDecodeRequests(), 1); | 710 DCHECK_EQ(decoder_->GetMaxDecodeRequests(), 1); |
711 | 711 |
712 decoder_->Initialize( | 712 decoder_->Initialize( |
713 config, true /* low_delay */, media::SetCdmReadyCB(), | 713 config, true /* low_delay */, nullptr, |
714 base::Bind(&VideoDecoderShim::DecoderImpl::OnInitDone, | 714 base::Bind(&VideoDecoderShim::DecoderImpl::OnInitDone, |
715 weak_ptr_factory_.GetWeakPtr()), | 715 weak_ptr_factory_.GetWeakPtr()), |
716 base::Bind(&VideoDecoderShim::DecoderImpl::OnOutputComplete, | 716 base::Bind(&VideoDecoderShim::DecoderImpl::OnOutputComplete, |
717 weak_ptr_factory_.GetWeakPtr())); | 717 weak_ptr_factory_.GetWeakPtr())); |
718 } | 718 } |
719 | 719 |
720 void VideoDecoderShim::DecoderImpl::Decode( | 720 void VideoDecoderShim::DecoderImpl::Decode( |
721 uint32_t decode_id, | 721 uint32_t decode_id, |
722 scoped_refptr<media::DecoderBuffer> buffer) { | 722 scoped_refptr<media::DecoderBuffer> buffer) { |
723 DCHECK(decoder_); | 723 DCHECK(decoder_); |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 void VideoDecoderShim::DeleteTexture(uint32_t texture_id) { | 1120 void VideoDecoderShim::DeleteTexture(uint32_t texture_id) { |
1121 gpu::gles2::GLES2Interface* gles2 = context_provider_->ContextGL(); | 1121 gpu::gles2::GLES2Interface* gles2 = context_provider_->ContextGL(); |
1122 gles2->DeleteTextures(1, &texture_id); | 1122 gles2->DeleteTextures(1, &texture_id); |
1123 } | 1123 } |
1124 | 1124 |
1125 void VideoDecoderShim::FlushCommandBuffer() { | 1125 void VideoDecoderShim::FlushCommandBuffer() { |
1126 context_provider_->ContextGL()->Flush(); | 1126 context_provider_->ContextGL()->Flush(); |
1127 } | 1127 } |
1128 | 1128 |
1129 } // namespace content | 1129 } // namespace content |
OLD | NEW |