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

Unified Diff: media/filters/gpu_video_decoder.cc

Issue 9416087: Add texture target field to video frame (for use by native textures). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (c) 2011 -> (c) 2012 Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/gpu_video_decoder.h ('k') | webkit/media/webvideoframe_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/gpu_video_decoder.cc
diff --git a/media/filters/gpu_video_decoder.cc b/media/filters/gpu_video_decoder.cc
index c839d0435946a0ad1ffe2bc172721759d5281ca8..461629593cf1f3de7956cc4143cf695254f4c895 100644
--- a/media/filters/gpu_video_decoder.cc
+++ b/media/filters/gpu_video_decoder.cc
@@ -48,6 +48,7 @@ GpuVideoDecoder::GpuVideoDecoder(
factories_(factories),
state_(kNormal),
demuxer_read_in_progress_(false),
+ decoder_texture_target_(0),
next_picture_buffer_id_(0),
next_bitstream_buffer_id_(0),
shutting_down_(false) {
@@ -326,7 +327,8 @@ void GpuVideoDecoder::ProvidePictureBuffers(uint32 count,
}
std::vector<uint32> texture_ids;
- if (!factories_->CreateTextures(count, size, &texture_ids)) {
+ if (!factories_->CreateTextures(
+ count, size, &texture_ids, &decoder_texture_target_)) {
NotifyError(VideoDecodeAccelerator::PLATFORM_FAILURE);
return;
}
@@ -382,8 +384,9 @@ void GpuVideoDecoder::PictureReady(const media::Picture& picture) {
base::TimeDelta duration;
GetBufferTimeData(picture.bitstream_buffer_id(), &timestamp, &duration);
+ DCHECK(decoder_texture_target_);
scoped_refptr<VideoFrame> frame(VideoFrame::WrapNativeTexture(
- pb.texture_id(), pb.size().width(),
+ pb.texture_id(), decoder_texture_target_, pb.size().width(),
pb.size().height(), timestamp, duration,
base::Bind(&GpuVideoDecoder::ReusePictureBuffer, this,
picture.picture_buffer_id())));
« no previous file with comments | « media/filters/gpu_video_decoder.h ('k') | webkit/media/webvideoframe_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698