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

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

Issue 1490613005: media config: expand is_encrypted to a struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ddorwin comments Created 4 years, 9 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 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 892
893 if (!yuv_converter_->Initialize()) 893 if (!yuv_converter_->Initialize())
894 return false; 894 return false;
895 895
896 media::VideoDecoderConfig video_decoder_config( 896 media::VideoDecoderConfig video_decoder_config(
897 codec, vda_config.profile, media::PIXEL_FORMAT_YV12, 897 codec, vda_config.profile, media::PIXEL_FORMAT_YV12,
898 media::COLOR_SPACE_UNSPECIFIED, 898 media::COLOR_SPACE_UNSPECIFIED,
899 gfx::Size(32, 24), // Small sizes that won't fail. 899 gfx::Size(32, 24), // Small sizes that won't fail.
900 gfx::Rect(32, 24), gfx::Size(32, 24), 900 gfx::Rect(32, 24), gfx::Size(32, 24),
901 // TODO(bbudge): Verify extra data isn't needed. 901 // TODO(bbudge): Verify extra data isn't needed.
902 media::EmptyExtraData(), false /* decryption */); 902 media::EmptyExtraData(), media::EncryptionScheme::Unencrypted());
903 903
904 media_task_runner_->PostTask( 904 media_task_runner_->PostTask(
905 FROM_HERE, 905 FROM_HERE,
906 base::Bind(&VideoDecoderShim::DecoderImpl::Initialize, 906 base::Bind(&VideoDecoderShim::DecoderImpl::Initialize,
907 base::Unretained(decoder_impl_.get()), video_decoder_config)); 907 base::Unretained(decoder_impl_.get()), video_decoder_config));
908 908
909 state_ = DECODING; 909 state_ = DECODING;
910 910
911 // Return success, even though we are asynchronous, to mimic 911 // Return success, even though we are asynchronous, to mimic
912 // media::VideoDecodeAccelerator. 912 // media::VideoDecodeAccelerator.
(...skipping 207 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

Powered by Google App Engine
This is Rietveld 408576698