Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(554)

Side by Side Diff: content/renderer/pepper/video_decoder_shim.cc

Issue 1666653002: media: Remove SetCdmReadyCB and CdmReadyCB (part 1). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and fix compile errors Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/common/gpu/media/video_encode_accelerator_unittest.cc ('k') | media/base/audio_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698