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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 11269017: Plumb through cropped output size for VideoFrame (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Created 8 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/plugins/ppapi/ppapi_plugin_instance.h" 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 2557 matching lines...) Expand 10 before | Expand all | Expand 10 after
2568 const uint8* frame_data = static_cast<uint8*>(mapper.data()); 2568 const uint8* frame_data = static_cast<uint8*>(mapper.data());
2569 gfx::Size frame_size(frame_info->width, frame_info->height); 2569 gfx::Size frame_size(frame_info->width, frame_info->height);
2570 2570
2571 DCHECK(frame_info->format == PP_DECRYPTEDFRAMEFORMAT_YV12); 2571 DCHECK(frame_info->format == PP_DECRYPTEDFRAMEFORMAT_YV12);
2572 const media::VideoFrame::Format format = media::VideoFrame::YV12; 2572 const media::VideoFrame::Format format = media::VideoFrame::YV12;
2573 2573
2574 // TODO(tomfinegan): Find a way to take ownership of the shared memory 2574 // TODO(tomfinegan): Find a way to take ownership of the shared memory
2575 // managed by the PPB_Buffer_Dev, and avoid the extra copy. 2575 // managed by the PPB_Buffer_Dev, and avoid the extra copy.
2576 scoped_refptr<media::VideoFrame> decoded_frame( 2576 scoped_refptr<media::VideoFrame> decoded_frame(
2577 media::VideoFrame::CreateFrame( 2577 media::VideoFrame::CreateFrame(
2578 format, frame_size, frame_size, 2578 format, frame_size, gfx::Rect(frame_size), frame_size,
2579 base::TimeDelta::FromMicroseconds( 2579 base::TimeDelta::FromMicroseconds(
2580 frame_info->tracking_info.timestamp))); 2580 frame_info->tracking_info.timestamp)));
2581 2581
2582 media::CopyYPlane( 2582 media::CopyYPlane(
2583 frame_data + frame_info->plane_offsets[PP_DECRYPTEDFRAMEPLANES_Y], 2583 frame_data + frame_info->plane_offsets[PP_DECRYPTEDFRAMEPLANES_Y],
2584 frame_info->strides[PP_DECRYPTEDFRAMEPLANES_Y], 2584 frame_info->strides[PP_DECRYPTEDFRAMEPLANES_Y],
2585 frame_info->height, 2585 frame_info->height,
2586 decoded_frame.get()); 2586 decoded_frame.get());
2587 2587
2588 media::CopyUPlane( 2588 media::CopyUPlane(
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
2989 screen_size_for_fullscreen_ = gfx::Size(); 2989 screen_size_for_fullscreen_ = gfx::Size();
2990 WebElement element = container_->element(); 2990 WebElement element = container_->element();
2991 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2991 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2992 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2992 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2993 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2993 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2994 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2994 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2995 } 2995 }
2996 2996
2997 } // namespace ppapi 2997 } // namespace ppapi
2998 } // namespace webkit 2998 } // namespace webkit
OLDNEW
« webkit/media/webvideoframe_impl.cc ('K') | « webkit/media/webvideoframe_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698