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

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

Issue 2058113002: Add 'cbcs' encryption scheme support in Android media. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 FROM_HERE, 862 FROM_HERE,
863 base::Bind(&VideoDecoderShim::DecoderImpl::Stop, 863 base::Bind(&VideoDecoderShim::DecoderImpl::Stop,
864 base::Owned(decoder_impl_.release()))); 864 base::Owned(decoder_impl_.release())));
865 } 865 }
866 866
867 bool VideoDecoderShim::Initialize(const Config& vda_config, Client* client) { 867 bool VideoDecoderShim::Initialize(const Config& vda_config, Client* client) {
868 DCHECK_EQ(client, host_); 868 DCHECK_EQ(client, host_);
869 DCHECK(RenderThreadImpl::current()); 869 DCHECK(RenderThreadImpl::current());
870 DCHECK_EQ(state_, UNINITIALIZED); 870 DCHECK_EQ(state_, UNINITIALIZED);
871 871
872 if (vda_config.is_encrypted) { 872 if (vda_config.is_encrypted()) {
873 NOTREACHED() << "Encrypted streams are not supported"; 873 NOTREACHED() << "Encrypted streams are not supported";
874 return false; 874 return false;
875 } 875 }
876 876
877 media::VideoCodec codec = media::kUnknownVideoCodec; 877 media::VideoCodec codec = media::kUnknownVideoCodec;
878 if (vda_config.profile <= media::H264PROFILE_MAX) 878 if (vda_config.profile <= media::H264PROFILE_MAX)
879 codec = media::kCodecH264; 879 codec = media::kCodecH264;
880 else if (vda_config.profile <= media::VP8PROFILE_MAX) 880 else if (vda_config.profile <= media::VP8PROFILE_MAX)
881 codec = media::kCodecVP8; 881 codec = media::kCodecVP8;
882 else if (vda_config.profile <= media::VP9PROFILE_MAX) 882 else if (vda_config.profile <= media::VP9PROFILE_MAX)
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 void VideoDecoderShim::DeleteTexture(uint32_t texture_id) { 1117 void VideoDecoderShim::DeleteTexture(uint32_t texture_id) {
1118 gpu::gles2::GLES2Interface* gles2 = context_provider_->ContextGL(); 1118 gpu::gles2::GLES2Interface* gles2 = context_provider_->ContextGL();
1119 gles2->DeleteTextures(1, &texture_id); 1119 gles2->DeleteTextures(1, &texture_id);
1120 } 1120 }
1121 1121
1122 void VideoDecoderShim::FlushCommandBuffer() { 1122 void VideoDecoderShim::FlushCommandBuffer() {
1123 context_provider_->ContextGL()->Flush(); 1123 context_provider_->ContextGL()->Flush();
1124 } 1124 }
1125 1125
1126 } // namespace content 1126 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698