| 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 | 10 |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 #if !defined(MEDIA_DISABLE_LIBVPX) | 690 #if !defined(MEDIA_DISABLE_LIBVPX) |
| 691 if (config.codec() == media::kCodecVP9) { | 691 if (config.codec() == media::kCodecVP9) { |
| 692 decoder_.reset( | 692 decoder_.reset( |
| 693 new media::VpxVideoDecoder(base::ThreadTaskRunnerHandle::Get())); | 693 new media::VpxVideoDecoder(base::ThreadTaskRunnerHandle::Get())); |
| 694 } else | 694 } else |
| 695 #endif | 695 #endif |
| 696 | 696 |
| 697 #if !defined(MEDIA_DISABLE_FFMPEG) && !defined(DISABLE_FFMPEG_VIDEO_DECODERS) | 697 #if !defined(MEDIA_DISABLE_FFMPEG) && !defined(DISABLE_FFMPEG_VIDEO_DECODERS) |
| 698 { | 698 { |
| 699 scoped_ptr<media::FFmpegVideoDecoder> ffmpeg_video_decoder( | 699 scoped_ptr<media::FFmpegVideoDecoder> ffmpeg_video_decoder( |
| 700 new media::FFmpegVideoDecoder(base::ThreadTaskRunnerHandle::Get())); | 700 new media::FFmpegVideoDecoder()); |
| 701 ffmpeg_video_decoder->set_decode_nalus(true); | 701 ffmpeg_video_decoder->set_decode_nalus(true); |
| 702 decoder_ = ffmpeg_video_decoder.Pass(); | 702 decoder_ = ffmpeg_video_decoder.Pass(); |
| 703 } | 703 } |
| 704 #elif defined(MEDIA_DISABLE_LIBVPX) | 704 #elif defined(MEDIA_DISABLE_LIBVPX) |
| 705 OnInitDone(false); | 705 OnInitDone(false); |
| 706 return; | 706 return; |
| 707 #endif | 707 #endif |
| 708 | 708 |
| 709 // VpxVideoDecoder and FFmpegVideoDecoder support only one pending Decode() | 709 // VpxVideoDecoder and FFmpegVideoDecoder support only one pending Decode() |
| 710 // request. | 710 // request. |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |